Skip to content

Commit

Permalink
Changes fro Grants branch
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed May 29, 2024
1 parent 37f6272 commit 100f921
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 42 deletions.
43 changes: 14 additions & 29 deletions .github/workflows/ci_build_scm_ubuntu_22.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ jobs:
sp_ROOT: /home/runner/NCEPLIBS-sp
w3emc_ROOT: /home/runner/myw3emc
SCM_ROOT: /home/runner/work/ccpp-scm/ccpp-scm
intel_ROOT: /home/runner/intel
suites: SCM_GFS_v15p2,SCM_GFS_v16,SCM_GFS_v17_p8,SCM_HRRR,SCM_RRFS_v1beta,SCM_RAP,SCM_WoFS_v0,SCM_GFS_v15p2_ps,SCM_GFS_v16_ps,SCM_GFS_v17_p8_ps,SCM_HRRR_ps,SCM_RRFS_v1beta_ps,SCM_RAP_ps,SCM_WoFS_v0_ps
CC: mpicc
FC: mpif90

# Workflow steps
steps:
Expand Down Expand Up @@ -57,34 +58,6 @@ jobs:
#######################################################################################
# Install FORTRAN dependencies
#######################################################################################
- name: Environment for ifort compiler
if: contains(matrix.fortran-compiler, 'ifort')
run: |
echo "CC=icx" >> $GITHUB_ENV
echo "FC=ifort" >> $GITHUB_ENV
echo "NFVERSION=v4.4.4" >> $GITHUB_ENV
- name: Cache Intel compilers
id: cache-intel-compilers
if: contains(matrix.fortran-compiler, 'ifort')
uses: actions/cache@v2
with:
path: /home/runner/intel
key: intel-${{ runner.os }}-compilers-b

# https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html
# List of packages from Docker file at
# https://github.com/intel/oneapi-containers/blob/master/images/docker/hpckit-devel-ubuntu18.04/Dockerfile
- name: Install Intel compilers and libraries
if: contains(matrix.fortran-compiler, 'ifort') && steps.cache-intel-compilers.outputs.cache-hit != 'true'
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
sudo apt-get install intel-hpckit-getting-started intel-oneapi-clck intel-oneapi-common-licensing intel-oneapi-common-vars
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-compiler-fortran intel-oneapi-itac
- name: Cache bacio library v2.4.1
id: cache-bacio-fortran
uses: actions/cache@v3
Expand Down Expand Up @@ -141,6 +114,18 @@ jobs:
sudo apt-get update
sudo apt-get install libnetcdf-dev
- name: Install open mpi
run: |
wget https://github.com/open-mpi/ompi/archive/refs/tags/v4.1.6.tar.gz
tar -xvf v4.1.6.tar.gz
cd ompi-4.1.6
./autogen.pl
./configure --prefix=/home/runner/ompi-4.1.6
make -j4
make install
echo "LD_LIBRARY_PATH=/home/runner/ompi-4.1.6/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=/home/runner/ompi-4.1.6/bin:$PATH" >> $GITHUB_ENV
- name: Cache NetCDF Fortran library
id: cache-netcdf-fortran
uses: actions/cache@v3
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/ci_run_scm_rts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
suites_ps: SCM_GFS_v15p2_ps,SCM_GFS_v16_ps,SCM_GFS_v17_p8_ps,SCM_HRRR_ps,SCM_RRFS_v1beta_ps,SCM_RAP_ps,SCM_WoFS_v0_ps,SCM_RRFS_v1_ps,SCM_GFS_v17_HR3_ps,SCM_GFS_v17_HR3_RRTMGP_ps
dir_rt: /home/runner/work/ccpp-scm/ccpp-scm/test/artifact-${{matrix.build-type}}
dir_bl: /home/runner/work/ccpp-scm/ccpp-scm/test/BL-${{matrix.build-type}}
CC: mpicc
FC: mpif90

# Workflow steps
steps:
Expand Down Expand Up @@ -59,18 +61,6 @@ jobs:
#######################################################################################
# Install FORTRAN dependencies
#######################################################################################
- name: Environment for gfortran compiler
if: contains(matrix.fortran-compiler, 'gnu')
run: |
echo "FC=gfortran-11" >> $GITHUB_ENV
echo "CC=gcc-11" >> $GITHUB_ENV
- name: Environment for ifort compiler
if: contains(matrix.fortran-compiler, 'intel')
run: |
echo "CC=icx" >> $GITHUB_ENV
echo "FC=ifort" >> $GITHUB_ENV
- name: Cache bacio library v2.4.1
id: cache-bacio-fortran
uses: actions/cache@v3
Expand Down Expand Up @@ -125,6 +115,18 @@ jobs:
- name: Install NetCDF C library
run: sudo apt-get install libnetcdf-dev

- name: Install open mpi
run: |
wget https://github.com/open-mpi/ompi/archive/refs/tags/v4.1.6.tar.gz
tar -xvf v4.1.6.tar.gz
cd ompi-4.1.6
./autogen.pl
./configure --prefix=/home/runner/ompi-4.1.6
make -j4
make install
echo "LD_LIBRARY_PATH=/home/runner/ompi-4.1.6/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=/home/runner/ompi-4.1.6/bin:$PATH" >> $GITHUB_ENV
- name: Cache NetCDF Fortran library
id: cache-netcdf-fortran
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion scm/src/run_scm.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def launch_executable(use_gdb, gdb, ignore_error = False):
if use_gdb:
cmd = '(cd {scm_run} && {gdb} {executable})'.format(scm_run=SCM_RUN, gdb=gdb, executable=EXECUTABLE)
else:
cmd = '(cd {scm_run} && time srun -A gmtb -n 1 {executable})'.format(scm_run=SCM_RUN, executable=EXECUTABLE)
cmd = '(cd {scm_run} && time mpirun -n 1 {executable})'.format(scm_run=SCM_RUN, executable=EXECUTABLE)
logging.info('Passing control to "{0}"'.format(cmd))
time.sleep(1)
# This will abort in 'execute' in the event of an error if ignore_error = False
Expand Down

0 comments on commit 100f921

Please sign in to comment.