Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade modules to spack-stack/1.5.1 on non-production machines. #19

Merged
merged 15 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 21 additions & 22 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaults:
shell: bash -leo pipefail {0}

env:
cache_key: gcc4 # The number (#) following the cache_key "gcc" is to flush Action cache.
cache_key: gcc
CC: gcc-10
FC: gfortran-10
CXX: g++-10
Expand All @@ -24,71 +24,70 @@ env:

# The jobs are split into:
# 1. a dependency build step (setup), and
# 2. a GSI-utils build step (build)
# 2. a GSI-utils build step (gsi-utils)
# The setup is run once and the environment is cached,
# so each build of GSI-utils can reuse the cached dependencies to save time (and compute).
# so each subsequent build of GSI-utils can reuse the cached dependencies to save time (and compute).

jobs:
setup:
runs-on: ubuntu-latest

steps:
- name: checkout # This is for getting spack.yaml
uses: actions/checkout@v3
with:
path: gsi-utils

# Cache spack, compiler and dependencies
- name: cache-env
id: cache-env
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}

- name: checkout-gsiutils # This is for getting spack.yaml
if: steps.cache-env.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
path: GSI-utils
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }}

# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
spack env create gsiutils-env GSI-utils/ci/spack.yaml
spack env create gsiutils-env gsi-utils/ci/spack.yaml
spack env activate gsiutils-env
spack compiler find
spack external find
spack add mpich@3.4.2
spack concretize
spack install -v --fail-fast
spack install -v --fail-fast --dirty
spack clean --all

build:
gsi-monitor:
needs: setup
runs-on: ubuntu-latest

steps:
- name: checkout-gsiutils
uses: actions/checkout@v2
- name: checkout
uses: actions/checkout@v3
with:
path: GSI-utils
path: gsi-utils

- name: cache-env
id: cache-env
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
spack
~/.spack
key: spack-${{ runner.os }}-${{ env.cache_key }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }}

- name: build-gsiutils
- name: build
run: |
source spack/share/spack/setup-env.sh
spack env activate gsiutils-env
export CC=mpicc
export FC=mpif90
cd GSI-utils
cd gsi-utils
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_UTIL_ALL=ON ..
make -j2 VERBOSE=1
Expand Down
48 changes: 23 additions & 25 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defaults:

# Set I_MPI_CC/F90 so Intel MPI wrapper uses icc/ifort instead of gcc/gfortran
env:
cache_key: intel5 # The number (#) following the cache_key "intel" is to flush Action cache.
cache_key: intel
CC: icc
FC: ifort
CXX: icpc
Expand All @@ -27,15 +27,20 @@ env:

# The jobs are split into:
# 1. a dependency build step (setup), and
# 2. a GSI-utils build step (build)
# 2. a GSI-utils build step (gsi-utils)
# The setup is run once and the environment is cached,
# so each build of GSI-utils can reuse the cached dependencies to save time (and compute).
# so each subsequent build of gsi-utils can reuse the cached dependencies to save time (and compute).

jobs:
setup:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- name: checkout # This is for getting spack.yaml
uses: actions/checkout@v3
with:
path: gsi-utils

# Cache spack, compiler and dependencies
- name: cache-env
id: cache-env
Expand All @@ -45,53 +50,46 @@ jobs:
spack
~/.spack
/opt/intel
key: spack-${{ runner.os }}-${{ env.cache_key }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }}

- name: install-intel-compilers
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile

- name: checkout-gsiutils # This is for getting spack.yaml
if: steps.cache-env.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
path: GSI-utils

# Install dependencies using Spack
- name: install-dependencies-with-spack
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
source spack/share/spack/setup-env.sh
spack env create gsiutils-env GSI-utils/ci/spack.yaml
spack env create gsiutils-env gsi-utils/ci/spack.yaml
spack env activate gsiutils-env
sudo mv /usr/local/ /usr/local_mv
spack compiler find
spack external find
spack add intel-oneapi-mpi
spack concretize
spack install --dirty --fail-fast -v
spack clean --all

build:
gsi-utils:
needs: setup
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- name: checkout-gsiutils
uses: actions/checkout@v2
with:
path: GSI-utils

- name: install-intel
run: |
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile

- name: checkout-gsiutils
uses: actions/checkout@v3
with:
path: gsi-utils

- name: cache-env
id: cache-env
uses: actions/cache@v3
Expand All @@ -100,15 +98,15 @@ jobs:
spack
~/.spack
/opt/intel
key: spack-${{ runner.os }}-${{ env.cache_key }}
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('gsi-utils/ci/spack.yaml') }}

- name: build-gsiutils
- name: build
run: |
source spack/share/spack/setup-env.sh
spack env activate gsiutils-env
export CC=mpiicc
export FC=mpiifort
cd GSI-utils
cd gsi-utils
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_UTIL_ALL=ON ..
make -j2 VERBOSE=1
Expand Down
17 changes: 9 additions & 8 deletions ci/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@
spack:
packages:
all:
compiler: [intel, gcc]
compiler: [intel, gcc@10:10]
specs:
- netcdf-c@4.7.4
- netcdf-fortran@4.5.3
- netcdf-c@4.9.2
- netcdf-fortran@4.6.0
- bufr@11.7.0
- bacio@2.4.1
- w3emc@2.9.2
- w3emc@2.10.0
- sp@2.3.3
- ip@3.3.3
- ip@4.3.0
- sigio@2.3.2
- sfcio@1.4.1
- nemsio@2.5.2
- nemsio@2.5.4
- wrf-io@1.2.0
- crtm@2.3.0
- crtm@2.4.0
- ncio@1.1.2
- gsi-ncdiag@1.0.0
- gsi-ncdiag@1.1.2
- cmake@3.20.1
view: true
concretizer:
unify: true
32 changes: 0 additions & 32 deletions modulefiles/gsiutils_cheyenne.gnu.lua

This file was deleted.

26 changes: 0 additions & 26 deletions modulefiles/gsiutils_cheyenne.intel.lua

This file was deleted.

21 changes: 11 additions & 10 deletions modulefiles/gsiutils_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@ help([[
Load common modules to build GSI utilities on all machines
]])

local netcdf_ver=os.getenv("netcdf_ver") or "4.7.4"
local netcdf_c_ver=os.getenv("netcdf_c_ver") or "4.9.2"
local netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0"

local bufr_ver=os.getenv("bufr_ver") or "11.7.0"
local bacio_ver=os.getenv("bacio_ver") or "2.4.1"
local w3emc_ver=os.getenv("w3emc_ver") or "2.9.1"
local w3emc_ver=os.getenv("w3emc_ver") or "2.10.0"
local sp_ver=os.getenv("sp_ver") or "2.3.3"
local ip_ver=os.getenv("ip_ver") or "3.3.3"
local ip_ver=os.getenv("ip_ver") or "4.3.0"
local sigio_ver=os.getenv("sigio_ver") or "2.3.2"
local sfcio_ver=os.getenv("sfcio_ver") or "1.4.1"
local nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
local nemsio_ver=os.getenv("nemsio_ver") or "2.5.4"
local wrf_io_ver=os.getenv("wrf_io_ver") or "1.2.0"
local ncio_ver=os.getenv("ncio_ver") or "1.1.2"
local crtm_ver=os.getenv("crtm_ver") or "2.3.0"
local ncdiag_ver=os.getenv("ncdiag_ver") or "1.0.0"
local crtm_ver=os.getenv("crtm_ver") or "2.4.0"
local ncdiag_ver=os.getenv("ncdiag_ver") or "1.1.2"

load(pathJoin("netcdf", netcdf_ver))
load(pathJoin("netcdf-c", netcdf_c_ver))
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))

load(pathJoin("bufr", bufr_ver))
load(pathJoin("bacio", bacio_ver))
Expand All @@ -27,8 +29,7 @@ load(pathJoin("ip", ip_ver))
load(pathJoin("sigio", sigio_ver))
load(pathJoin("sfcio", sfcio_ver))
load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("wrf_io", wrf_io_ver))
load(pathJoin("wrf-io", wrf_io_ver))
load(pathJoin("ncio", ncio_ver))
load(pathJoin("crtm", crtm_ver))
load(pathJoin("ncdiag", ncdiag_ver))

load(pathJoin("gsi-ncdiag", ncdiag_ver))
23 changes: 12 additions & 11 deletions modulefiles/gsiutils_hera.gnu.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
help([[
]])

prepend_path("MODULEPATH", "/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core")
--Needed for openmpi build
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")

local hpc_ver=os.getenv("hpc_ver") or "1.1.0"
local hpc_gnu_ver=os.getenv("hpc_gnu_ver") or "9.2.0"
local hpc_mpich_ver=os.getenv("hpc_mpich_ver") or "3.3.2"
local cmake_ver=os.getenv("cmake_ver") or "3.20.1"
local prod_util_ver=os.getenv("prod_util_ver") or "1.2.2"
local python_ver=os.getenv("python_ver") or "3.10.8"
local stack_intel_ver=os.getenv("stack_gcc_ver") or "9.2.0"
local stack_impi_ver=os.getenv("stack_openmpi_ver") or "4.1.5"
local cmake_ver=os.getenv("cmake_ver") or "3.23.1"
local openblas_ver=os.getenv("cmake_ver") or "0.3.19"

load(pathJoin("hpc", hpc_ver))
load(pathJoin("hpc-gnu", hpc_gnu_ver))
load(pathJoin("hpc-mpich", hpc_mpich_ver))
load(pathJoin("stack-gcc", stack_gcc_ver))
load(pathJoin("stack-openmpi", stack_openmpi_ver))
load(pathJoin("python", python_ver))
load(pathJoin("cmake", cmake_ver))

load("gsiutils_common")

load(pathJoin("prod_util", prod_util_ver))

pushenv("MKLROOT", "/apps/oneapi/mkl/2022.0.2")
load(pathJoin("openblas", openblas_ver))

whatis("Description: GSI utilities environment on Hera with GNU Compilers")
Loading