1- name : CI test to build the CCPP-SCM on ubuntu v22.04
1+ name : build the CCPP-SCM with Nvidia
22
33on : [pull_request,workflow_dispatch]
44
55jobs :
66
77 build_scm :
88 # The type of runner that the job will run on
9- runs-on : ubuntu-22.04
9+ runs-on : ubuntu-latest
1010 strategy :
1111 fail-fast : false
1212 matrix :
1313 fortran-compiler : [nvfortran]
14- build-type : [Release]#, Debug]
15- enable-gpu-acc : [False, True]
16- py-version : [3.7.13, 3.9.12 ]
14+ build-type : [Release] # , Debug]
15+ enable-gpu-acc : [False] # , True] # GPUs aren't available for testing
16+ py-version : [3.11.7 ]
1717
1818 # Environmental variables
1919 env :
@@ -74,13 +74,13 @@ jobs:
7474 with :
7575 python-version : ${{matrix.py-version}}
7676
77- - name : Add conda to system path
78- run : |
79- echo $CONDA/bin >> $GITHUB_PATH
77+ # - name: Add conda to system path
78+ # run: |
79+ # echo $CONDA/bin >> $GITHUB_PATH
8080
81- - name : Install NetCDF Python libraries
82- run : |
83- conda install --yes -c conda-forge h5py>=3.4 netCDF4 f90nml
81+ # - name: Install NetCDF Python libraries
82+ # run: |
83+ # conda install --yes -c conda-forge h5py>=3.4 netCDF4 f90nml
8484
8585 # ######################################################################################
8686 # Install Nvidia.
@@ -90,35 +90,41 @@ jobs:
9090 env :
9191 NVCOMPILERS : /home/runner/hpc_sdk
9292 NVARCH : Linux_x86_64
93+ NVYEAR : 2025
94+ NVVERSION : 25.1
95+ CUDA_VERSION : 12.6
96+ NVVERSION_PACKED : 251 # Manually take NVVERSION and remove . because funcationality not in actions
9397 NVHPC_SILENT : true
9498 NVHPC_INSTALL_DIR : /home/runner/hpc_sdk
9599 NVHPC_INSTALL_TYPE : network
96100 NVHPC_INSTALL_LOCAL_DIR : /home/runner/hpc_sdk
97101 run : |
98102 mkdir /home/runner/hpc_sdk && cd /home/runner/hpc_sdk
99- wget -q https://developer.download.nvidia.com/hpc-sdk/24.1/nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz
100- tar xpzf nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz
101- nvhpc_2024_241_Linux_x86_64_cuda_12.3/install
102- export PATH=${PATH}:${NVCOMPILERS}/${NVARCH}/24.1/compilers/bin
103- export MANPATH=${MANPATH}:${NVCOMPILERS}/${NVARCH}/24.1/compilers/man
103+ wget -q https://developer.download.nvidia.com/hpc-sdk/${NVVERSION}/nvhpc_${NVYEAR}_${NVVERSION_PACKED}_Linux_x86_64_cuda_${CUDA_VERSION}.tar.gz
104+ tar xpzf nvhpc_${NVYEAR}_${NVVERSION_PACKED}_Linux_x86_64_cuda_${CUDA_VERSION}.tar.gz
105+ ls
106+ nvhpc_${NVYEAR}_${NVVERSION_PACKED}_Linux_x86_64_cuda_${CUDA_VERSION}/install
107+ export PATH=${PATH}:${NVCOMPILERS}/${NVARCH}/${NVVERSION}/compilers/bin
108+ export MANPATH=${MANPATH}:${NVCOMPILERS}/${NVARCH}/${NVVERSION}/compilers/man
104109 echo "The nvfortran installed is:"
105110 nvfortran --version
106111 echo "The path to nvfortran is:"
107112 command -v nvfortran
108113 echo "Removing tarball"
109- rm nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz
110-
111- - name : Set environment for Nvidia compiler.
112- run : |
113- echo "CC=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvc" >> $GITHUB_ENV
114- echo "FC=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvfortran" >> $GITHUB_ENV
115- echo "CMAKE_C_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvc" >> $GITHUB_ENV
116- echo "CMAKE_Fortran_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvfortran" >> $GITHUB_ENV
114+ rm nvhpc_${NVYEAR}_${NVVERSION_PACKED}_Linux_x86_64_cuda_${CUDA_VERSION}.tar.gz
115+ echo "CC=/home/runner/hpc_sdk/Linux_x86_64/${NVVERSION}/compilers/bin/nvc" >> $GITHUB_ENV
116+ echo "FC=/home/runner/hpc_sdk/Linux_x86_64/${NVVERSION}/compilers/bin/nvfortran" >> $GITHUB_ENV
117+ echo "CMAKE_C_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/${NVVERSION}/compilers/bin/nvc" >> $GITHUB_ENV
118+ echo "CMAKE_Fortran_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/${NVVERSION}/compilers/bin/nvfortran" >> $GITHUB_ENV
117119
118120 # ######################################################################################
119121 # Install FORTRAN dependencies
120122 # ######################################################################################
121123
124+ - name : Check space (pre dependency install)
125+ run : |
126+ df -h
127+
122128 - name : Install Curl and zlib
123129 run : |
124130 sudo apt-get update
@@ -142,6 +148,8 @@ jobs:
142148 ./configure --prefix=${HDF5_ROOT}
143149 make -j
144150 make install
151+ cd ..
152+ rm -rf hdf5-hdf5-1_14_1-2 hdf5-1_14_1-2.tar.gz
145153
146154 - name : Setup HDF5 Paths
147155 run : |
@@ -175,6 +183,8 @@ jobs:
175183 run : |
176184 cd ${HOME}/openmpi-4.1.6
177185 sudo make install -j
186+ cd ..
187+ rm -rf openmpi-4.1.6 openmpi-4.1.6.tar.gz
178188
179189 - name : Setup OpenMPI Paths
180190 run : |
@@ -213,6 +223,8 @@ jobs:
213223 CPPFLAGS="-I/home/runner/hdf5/include" LDFLAGS="-L/home/runner/hdf5/lib" ./configure --prefix=${NETCDF}
214224 make
215225 make install
226+ cd ..
227+ rm -rf netcdf-c-4.7.4 v4.7.4.tar.gz
216228
217229 - name : Install NetCDF Fortran library
218230 if : steps.cache-netcdf.outputs.cache-hit != 'true'
@@ -223,6 +235,8 @@ jobs:
223235 FCFLAGS="-fPIC" FFLAGS="-fPIC" CPPFLAGS="-I/home/runner/hdf5/include -I/home/runner/netcdf/include" LDFLAGS="-L/home/runner/hdf5/lib -L/home/runner/netcdf/lib" ./configure --prefix=${NETCDF}
224236 make
225237 make install
238+ cd ..
239+ rm -rf netcdf-fortran-4.6.1 v4.6.1.tar.gz
226240
227241 - name : Cache bacio library v2.4.1
228242 id : cache-bacio-fortran
@@ -240,6 +254,8 @@ jobs:
240254 make -j
241255 make install
242256 echo "bacio_DIR=/home/runner/bacio/lib/cmake/bacio" >> $GITHUB_ENV
257+ cd ../../
258+ rm -rf bacio
243259
244260 - name : Cache SP-library v2.3.3
245261 id : cache-sp-fortran
@@ -257,6 +273,8 @@ jobs:
257273 make -j
258274 make install
259275 echo "sp_DIR=/home/runner/NCEPLIBS-sp/lib/cmake/sp" >> $GITHUB_ENV
276+ cd ../../
277+ rm -rf NCEPLIBS-sp
260278
261279 - name : Cache w3emc library v2.9.2
262280 id : cache-w3emc-fortran
@@ -274,6 +292,12 @@ jobs:
274292 make -j
275293 make install
276294 echo "w3emc_DIR=/home/runner/myw3emc/lib/cmake/w3emc" >> $GITHUB_ENV
295+ cd ../../
296+ rm -rf NCEPLIBS-w3emc
297+
298+ - name : Check space (pre SCM build)
299+ run : |
300+ df -h
277301
278302 # ######################################################################################
279303 # Build and run SCM regression tests (ccpp-scm/test/rt_test_cases.py)
@@ -290,16 +314,20 @@ jobs:
290314 cd ${SCM_ROOT}/scm/bin
291315 make -j
292316
293- - name : Download data for SCM
294- if : contains(matrix.enable-gpu-acc, 'False')
317+ - name : Check space (post SCM build)
295318 run : |
296- cd ${SCM_ROOT}
297- ./contrib/get_all_static_data.sh
298- ./contrib/get_thompson_tables.sh
299- ./contrib/get_aerosol_climo.sh
319+ df -h
300320
301- - name : Run SCM RTs (w/o GPU)
302- if : contains(matrix.enable-gpu-acc, 'False')
303- run : |
304- cd ${SCM_ROOT}/scm/bin
305- ./run_scm.py --file /home/runner/work/ccpp-scm/ccpp-scm/test/rt_test_cases.py --runtime_mult 0.1 -v
321+ # - name: Download data for SCM
322+ # if: contains(matrix.enable-gpu-acc, 'False')
323+ # run: |
324+ # cd ${SCM_ROOT}
325+ # ./contrib/get_all_static_data.sh
326+ # ./contrib/get_thompson_tables.sh
327+ # ./contrib/get_aerosol_climo.sh
328+
329+ # - name: Run SCM RTs (w/o GPU)
330+ # if: contains(matrix.enable-gpu-acc, 'False')
331+ # run: |
332+ # cd ${SCM_ROOT}/scm/bin
333+ # ./run_scm.py --file /home/runner/work/ccpp-scm/ccpp-scm/test/rt_test_cases.py --runtime_mult 0.1 -v
0 commit comments