Skip to content
Snippets Groups Projects

Tested the c++ codes run on GPUs and fixed unit tests associated with them

Open Pradipta Samanta requested to merge fix-cpp-codes-gpu into feature-add-cpp-codes
1 file
+ 35
6
Compare changes
  • Side-by-side
  • Inline
+ 35
6
@@ -15,8 +15,11 @@ stages:
RED: '\033[0;31m'
variables:
ACCOUNT: "ka1125"
SCHEDULER_PARAMETERS: "--account=$ACCOUNT --partition=shared"
ACCOUNT_CPU: "ka1125"
ACCOUNT_GPU: "bk1341"
SLURM_OPTIONS_CPU: "--account=$ACCOUNT_CPU --partition=shared"
SLURM_OPTIONS_GPU: "--account=$ACCOUNT_GPU --partition=gpu --gpus=1"
SLURM_NTASKS: "--ntasks=1"
GIT_CONFIG_COUNT: 1
GIT_CONFIG_KEY_0: url.https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.dkrz.de/.insteadOf
GIT_CONFIG_VALUE_0: "git@gitlab.dkrz.de:"
@@ -25,6 +28,8 @@ gcc11:
stage: build_and_test
extends:
- .default
variables:
SCHEDULER_PARAMETERS: "$SLURM_OPTIONS_CPU $SLURM_NTASKS"
script:
- module load git gcc/11.2.0-gcc-11.2.0
- mkdir gcc112
@@ -40,6 +45,8 @@ intel22:
stage: build_and_test
extends:
- .default
variables:
SCHEDULER_PARAMETERS: "$SLURM_OPTIONS_CPU $SLURM_NTASKS"
script:
- module load git gcc/11.2.0-gcc-11.2.0 intel-oneapi-compilers/2022.0.1-gcc-11.2.0
- mkdir intel22
@@ -55,11 +62,12 @@ nvhpc_cpu:
stage: build_and_test
extends:
- .default
variables:
SCHEDULER_PARAMETERS: "$SLURM_OPTIONS_CPU $SLURM_NTASKS"
script:
- module load git gcc/11.2.0-gcc-11.2.0 nvhpc/22.5-gcc-11.2.0
- mkdir nvhpc_cpu
- cd nvhpc_cpu
- export LD_LIBRARY_PATH=/sw/spack-levante/gcc-11.2.0-bcn7mb/lib64:$LD_LIBRARY_PATH
- /sw/spack-levante/cmake-3.23.1-q5kzz6/bin/cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=nvc -DCMAKE_Fortran_COMPILER=nvfortran
- make VERBOSE=1
- make test
@@ -71,21 +79,40 @@ nvhpc_gpu:
stage: build_and_test
extends:
- .default
variables:
SCHEDULER_PARAMETERS: "$SLURM_OPTIONS_GPU $SLURM_NTASKS --mem=16000"
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: always
- when: manual
script:
- module load git gcc/11.2.0-gcc-11.2.0 nvhpc/22.5-gcc-11.2.0
- module load git gcc/11.2.0-gcc-11.2.0 nvhpc/24.7-gcc-11.2.0
- mkdir nvhpc_gpu
- cd nvhpc_gpu
- export LD_LIBRARY_PATH=/sw/spack-levante/gcc-11.2.0-bcn7mb/lib64:$LD_LIBRARY_PATH
- /sw/spack-levante/cmake-3.23.1-q5kzz6/bin/cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=nvc -DCMAKE_Fortran_COMPILER=nvfortran -DIM_ENABLE_GPU=nvidia-sm80 -DIM_ENABLE_OPENACC=ON
- make VERBOSE=1
- make test
tags:
- levante, hpc, dkrz
needs: ["Check License", "Check Typo", "Check Style", "Check OpenACC Style", "Check CMake Style"]
needs:
- job: Check License
optional: true
- job: Check Typo
optional: true
- job: Check Style
optional: true
- job: Check OpenACC Style
optional: true
- job: Check CMake Style
optional: true
OpenMP_gcc:
stage: build_and_test_OpenMP
extends:
- .default
variables:
SCHEDULER_PARAMETERS: "$SLURM_OPTIONS_CPU $SLURM_NTASKS"
script:
- module load git gcc/11.2.0-gcc-11.2.0
- mkdir openmp_gcc
@@ -101,6 +128,8 @@ OpenMP_intel:
stage: build_and_test_OpenMP
extends:
- .default
variables:
SCHEDULER_PARAMETERS: "$SLURM_OPTIONS_CPU $SLURM_NTASKS"
script:
- module load git gcc/11.2.0-gcc-11.2.0 intel-oneapi-compilers/2022.0.1-gcc-11.2.0
- mkdir openmp_intel
@@ -229,7 +258,7 @@ Prepare Changelog:
artifacts:
paths:
- release_notes.md
needs: ["gcc11", "intel22", "nvhpc_cpu", "nvhpc_gpu"]
needs: ["gcc11", "intel22", "nvhpc_cpu"]
Release:
stage: release
Loading