From 2c81c84be0a689f13007bb99f00f1823461d4f4f Mon Sep 17 00:00:00 2001 From: Tracy Date: Thu, 4 Apr 2024 18:27:20 +0000 Subject: [PATCH] Update hera module for rocky8, remove shell setup scripts --- scm/etc/Cheyenne_setup_gnu.csh | 55 ------------------------------ scm/etc/Cheyenne_setup_gnu.sh | 47 ------------------------- scm/etc/Cheyenne_setup_intel.csh | 55 ------------------------------ scm/etc/Cheyenne_setup_intel.sh | 47 ------------------------- scm/etc/Desktop_setup_gfortran.csh | 51 --------------------------- scm/etc/Desktop_setup_gfortran.sh | 47 ------------------------- scm/etc/Hera_setup_intel.csh | 47 ------------------------- scm/etc/Hera_setup_intel.sh | 39 --------------------- scm/etc/modules/hera_gnu.lua | 4 +-- scm/etc/modules/hera_intel.lua | 4 +-- 10 files changed, 4 insertions(+), 392 deletions(-) delete mode 100755 scm/etc/Cheyenne_setup_gnu.csh delete mode 100755 scm/etc/Cheyenne_setup_gnu.sh delete mode 100755 scm/etc/Cheyenne_setup_intel.csh delete mode 100755 scm/etc/Cheyenne_setup_intel.sh delete mode 100755 scm/etc/Desktop_setup_gfortran.csh delete mode 100755 scm/etc/Desktop_setup_gfortran.sh delete mode 100755 scm/etc/Hera_setup_intel.csh delete mode 100755 scm/etc/Hera_setup_intel.sh diff --git a/scm/etc/Cheyenne_setup_gnu.csh b/scm/etc/Cheyenne_setup_gnu.csh deleted file mode 100755 index c37acbdc2..000000000 --- a/scm/etc/Cheyenne_setup_gnu.csh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/tcsh - -echo "Setting environment variables for CCPP-SCM on Cheyenne with gcc/gfortran" - -set called=($_) - -if ( "$called" != "") then ### called by source - set MYSCRIPT=`readlink -f -n $called[2]` -else ### called by direct execution of the script - set MYSCRIPT=`readlink -f -n '$0'` -endif -set MYDIR=`dirname $MYSCRIPT` -set MYDIR=`cd $MYDIR && pwd -P` - -setenv SCM_ROOT $MYDIR/../.. - -#start with a "clean" environment; activate and deactivate ncar_pylib in order to successfully deactivate previously activated environment without errors -module load ncarenv/1.3 -conda deactivate -module purge - -#load the modules in order to compile the CCPP SCM -echo "Loading gnu and netcdf modules..." -module load ncarenv/1.3 -module load gnu/11.2.0 -module load mpt/2.25 -module load ncarcompilers/0.5.0 -module load netcdf - -echo "Setting up NCEPLIBS" -module use /glade/work/epicufsrt/contrib/hpc-stack/gnu11.2.0/modulefiles/stack -module load hpc/1.2.0 -module load hpc-gnu/11.2.0 -module load hpc-mpt/2.25 -setenv bacio_ROOT /glade/work/epicufsrt/contrib/hpc-stack/gnu11.2.0/gnu-11.2.0/bacio/2.4.1 -setenv sp_ROOT /glade/work/epicufsrt/contrib/hpc-stack/gnu11.2.0/gnu-11.2.0/sp/2.3.3 -setenv w3emc_ROOT /glade/work/epicufsrt/contrib/hpc-stack/gnu11.2.0/gnu-11.2.0/w3emc/2.9.2 - -echo "Setting CC/CXX/FC environment variables" -setenv CC gcc -setenv CXX g++ -setenv FC gfortran - -echo "Loading cmake" -module load cmake/3.16.4 -setenv CMAKE_C_COMPILER gcc -setenv CMAKE_CXX_COMPILER g++ -setenv CMAKE_Fortran_COMPILER gfortran -setenv CMAKE_Platform cheyenne.gnu - -echo "Setting up python environment for running and plotting." -module load conda/latest - -conda activate /glade/p/ral/jntp/GMTB/CCPP_SCM/conda/ccpp-scm - diff --git a/scm/etc/Cheyenne_setup_gnu.sh b/scm/etc/Cheyenne_setup_gnu.sh deleted file mode 100755 index e1a190fcc..000000000 --- a/scm/etc/Cheyenne_setup_gnu.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -echo "Setting environment variables for CCPP-SCM on Cheyenne with gcc/gfortran" - -MYDIR=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P) - -export SCM_ROOT=$MYDIR/../.. - -#start with a "clean" environment; activate and deactivate ncar_pylib in order to successfully deactivate previously activated environment without errors -module load ncarenv/1.3 -conda deactivate -module purge - -#load the modules in order to compile the CCPP SCM -echo "Loading gnu and netcdf modules..." -module load ncarenv/1.3 -module load gnu/11.2.0 -module load mpt/2.25 -module load ncarcompilers/0.5.0 -module load netcdf - -echo "Setting up NCEPLIBS" -module use /glade/work/epicufsrt/contrib/hpc-stack/gnu11.2.0/modulefiles/stack -module load hpc/1.2.0 -module load hpc-gnu/11.2.0 -module load hpc-mpt/2.25 -export bacio_ROOT=/glade/work/epicufsrt/contrib/hpc-stack/gnu11.2.0/gnu-11.2.0/bacio/2.4.1 -export sp_ROOT=/glade/work/epicufsrt/contrib/hpc-stack/gnu11.2.0/gnu-11.2.0/sp/2.3.3 -export w3emc_ROOT=/glade/work/epicufsrt/contrib/hpc-stack/gnu11.2.0/gnu-11.2.0/w3emc/2.9.2 - -echo "Setting CC/CXX/FC environment variables" -export CC=gcc -export CXX=g++ -export FC=gfortran - -echo "Loading cmake" -module load cmake/3.22.0 -export CMAKE_C_COMPILER=gcc -export CMAKE_CXX_COMPILER=g++ -export CMAKE_Fortran_COMPILER=gfortran -export CMAKE_Platform=cheyenne.gnu - -echo "Setting up python environment for running and plotting." -module load conda/latest - -conda activate /glade/p/ral/jntp/GMTB/CCPP_SCM/conda/ccpp-scm - diff --git a/scm/etc/Cheyenne_setup_intel.csh b/scm/etc/Cheyenne_setup_intel.csh deleted file mode 100755 index d8bc17890..000000000 --- a/scm/etc/Cheyenne_setup_intel.csh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/tcsh - -echo "Setting environment variables for CCPP-SCM on Cheyenne with icc/ifort" - -set called=($_) - -if ( "$called" != "") then ### called by source - set MYSCRIPT=`readlink -f -n $called[2]` -else ### called by direct execution of the script - set MYSCRIPT=`readlink -f -n '$0'` -endif -set MYDIR=`dirname $MYSCRIPT` -set MYDIR=`cd $MYDIR && pwd -P` - -setenv SCM_ROOT $MYDIR/../.. - -#start with a "clean" environment; activate and deactivate ncar_pylib in order to successfully deactivate previously activated environment without errors -module load ncarenv/1.3 -conda deactivate -module purge - -#load the modules in order to compile the CCPP SCM -echo "Loading intel and netcdf modules..." -module load ncarenv/1.3 -module load intel/2022.1 -module load mpt/2.25 -module load ncarcompilers/0.5.0 -module load netcdf - -echo "Setting up NCEPLIBS" -module use /glade/work/epicufsrt/contrib/hpc-stack/intel2022.1/modulefiles/stack -module load hpc/1.2.0 -module load hpc-intel/2022.1 -module load hpc-mpt/2.25 -setenv bacio_ROOT /glade/work/epicufsrt/contrib/hpc-stack/intel2022.1/intel-2022.1/bacio/2.4.1 -setenv sp_ROOT /glade/work/epicufsrt/contrib/hpc-stack/intel2022.1/intel-2022.1/sp/2.3.3 -setenv w3emc_ROOT /glade/work/epicufsrt/contrib/hpc-stack/intel2022.1/intel-2022.1/w3emc/2.9.2 - -echo "Setting CC/CXX/FC environment variables" -setenv CC icc -setenv CXX icpc -setenv FC ifort - -echo "Loading cmake" -module load cmake/3.22.0 -setenv CMAKE_C_COMPILER icc -setenv CMAKE_CXX_COMPILER icpc -setenv CMAKE_Fortran_COMPILER ifort -setenv CMAKE_Platform cheyenne.intel - -echo "Setting up python environment for running and plotting." -module load conda/latest - -conda activate /glade/p/ral/jntp/GMTB/CCPP_SCM/conda/ccpp-scm - diff --git a/scm/etc/Cheyenne_setup_intel.sh b/scm/etc/Cheyenne_setup_intel.sh deleted file mode 100755 index 71727e034..000000000 --- a/scm/etc/Cheyenne_setup_intel.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -echo "Setting environment variables for CCPP-SCM on Cheyenne with icc/ifort" - -MYDIR=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P) - -export SCM_ROOT=$MYDIR/../.. - -#start with a "clean" environment; activate and deactivate ncar_pylib in order to successfully deactivate previously activated environment without errors -module load ncarenv/1.3 -conda deactivate -module purge - -#load the modules in order to compile the CCPP SCM -echo "Loading intel and netcdf modules..." -module load ncarenv/1.3 -module load intel/2022.1 -module load mpt/2.25 -module load ncarcompilers/0.5.0 -module load netcdf - -echo "Setting up NCEPLIBS" -module use /glade/work/epicufsrt/contrib/hpc-stack/intel2022.1/modulefiles/stack -module load hpc/1.2.0 -module load hpc-intel/2022.1 -module load hpc-mpt/2.25 -export bacio_ROOT=/glade/work/epicufsrt/contrib/hpc-stack/intel2022.1/intel-2022.1/bacio/2.4.1 -export sp_ROOT=/glade/work/epicufsrt/contrib/hpc-stack/intel2022.1/intel-2022.1/sp/2.3.3 -export w3emc_ROOT=/glade/work/epicufsrt/contrib/hpc-stack/intel2022.1/intel-2022.1/w3emc/2.9.2 - -echo "Setting CC/CXX/FC environment variables" -export CC=icc -export CXX=icpc -export FC=ifort - -echo "Loading cmake" -module load cmake/3.22.0 -export CMAKE_C_COMPILER=icc -export CMAKE_CXX_COMPILER=icpc -export CMAKE_Fortran_COMPILER=ifort -export CMAKE_Platform=cheyenne.intel - -echo "Setting up python environment for running and plotting." -module load conda/latest - -conda activate /glade/p/ral/jntp/GMTB/CCPP_SCM/conda/ccpp-scm - diff --git a/scm/etc/Desktop_setup_gfortran.csh b/scm/etc/Desktop_setup_gfortran.csh deleted file mode 100755 index d038405f4..000000000 --- a/scm/etc/Desktop_setup_gfortran.csh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/tcsh - -echo "Setting environment variables for CCPP-SCM on Desktop (MacOS) with gcc/gfortran" - -set called=($_) - -if ( "$called" != "") then ### called by source - set MYSCRIPT=`readlink -f -n $called[2]` -else ### called by direct execution of the script - set MYSCRIPT=`readlink -f -n '$0'` -endif -set MYDIR=`dirname $MYSCRIPT` -set MYDIR=`cd $MYDIR && pwd -P` - -setenv SCM_ROOT $MYDIR/../.. - -echo "Setting CC/CXX/FC environment variables" -setenv CC /opt/local/bin/gcc-mp-10 -setenv CXX /opt/local/bin/g++-mp-10 -setenv FC gfortran-mp-10 - -echo "Setting location of NETCDF" -setenv NETCDF /opt/local -setenv LDFLAGS "-I${NETCDF}/include -L${NETCDF}/lib -Wl,-rpath,${NETCDF}/lib" - -echo "Setting location of NCEPLIBS libraries" -setenv BACIO_LIB4 /Users/$USER/NCEPLIBS/lib/libbacio_v2.2.0_4.a -setenv SP_LIBd /Users/$USER/NCEPLIBS/lib/libsp_v2.1.0_d.a -setenv W3NCO_LIBd /Users/$USER/NCEPLIBS/lib/libw3nco_v2.1.0_d.a - -#check to see if CMake is installed locally -echo "Checking if CMake is installed" -cmake --version - -if ( $? != 0 ) then - echo "CMake not found; installing CMake" - pip install cmake -else - echo "CMake is installed" -endif - -#check to see if f90nml is installed locally -echo "Checking if f90nml python module is installed" -python -c "import f90nml" - -if ( $? != 0 ) then - echo "Not found; installing f90nml" - pip install --no-cache-dir f90nml==0.19 -else - echo "f90nml is installed" -endif diff --git a/scm/etc/Desktop_setup_gfortran.sh b/scm/etc/Desktop_setup_gfortran.sh deleted file mode 100755 index 37485a163..000000000 --- a/scm/etc/Desktop_setup_gfortran.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -echo "Setting environment variables for CCPP-SCM on Desktop (MacOS) with gcc/gfortran" - -if [[ $(uname -s) == Darwin ]]; then - MYDIR=$(cd "$(dirname "$(greadlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P) -else - MYDIR=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P) -fi - -export SCM_ROOT=$MYDIR/../.. - -echo "Setting CC/CXX/FC environment variables" -export CC=/opt/local/bin/gcc-mp-10 -export CXX=/opt/local/bin/g++-mp-10 -export FC=gfortran-mp-10 - -echo "Setting location of NETCDF" -export NETCDF=/opt/local -export LDFLAGS="-I${NETCDF}/include -L${NETCDF}/lib -Wl,-rpath,${NETCDF}/lib" - -echo "Setting location of NCEPLIBS libraries" -export BACIO_LIB4=/Users/$USER/NCEPLIBS/lib/libbacio_v2.2.0_4.a -export SP_LIBd=/Users/$USER/NCEPLIBS/lib/libsp_v2.1.0_d.a -export W3NCO_LIBd=/Users/$USER/NCEPLIBS/lib/libw3nco_v2.1.0_d.a - -#check to see if CMake is installed locally -echo "Checking if CMake is installed" -cmake --version - -if [ $? -ne 0 ]; then - echo "CMake not found; installing CMake" - pip install cmake -else - echo "CMake is installed" -fi - -#check to see if f90nml is installed locally -echo "Checking if f90nml python module is installed" -python -c "import f90nml" - -if [ $? -ne 0 ]; then - echo "Not found; installing f90nml" - pip install --no-cache-dir f90nml==0.19 -else - echo "f90nml is installed" -fi diff --git a/scm/etc/Hera_setup_intel.csh b/scm/etc/Hera_setup_intel.csh deleted file mode 100755 index 369f6e3af..000000000 --- a/scm/etc/Hera_setup_intel.csh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/tcsh - -echo "Setting environment variables for CCPP-SCM on Hera with icc/ifort" - -set called=($_) - -if ( "$called" != "") then ### called by source - set MYSCRIPT=`readlink -f -n $called[2]` -else ### called by direct execution of the script - set MYSCRIPT=`readlink -f -n '$0'` -endif -set MYDIR=`dirname $MYSCRIPT` -set MYDIR=`cd $MYDIR && pwd -P` - -setenv SCM_ROOT $MYDIR/../.. - -#load the modules in order to compile the CCPP SCM -echo "Loading intel and netcdf modules..." -module purge -module load intel/2022.1.2 -module load impi/2022.1.2 -module use /scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/modulefiles/stack -module load hpc/1.2.0 -module load hpc-intel/2022.1.2 -module load hpc-impi/2022.1.2 -module load netcdf - -echo "Setting up NCEPLIBS" -setenv bacio_ROOT /scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/intel-2022.1.2/bacio/2.4.1 -setenv sp_ROOT /scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/intel-2022.1.2/sp/2.3.3 -setenv w3emc_ROOT /scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/intel-2022.1.2/w3emc/2.9.2 - -echo "Setting CC/CXX/FC environment variables" -setenv CC icc -setenv CXX icpc -setenv FC ifort - -echo "Loading cmake" -module load cmake/3.20.1 -setenv CMAKE_C_COMPILER icc -setenv CMAKE_CXX_COMPILER icpc -setenv CMAKE_Fortran_COMPILER ifort -setenv CMAKE_Platform hera.intel - -echo "Loading the SCM python environment" -source /scratch1/BMC/gmtb/SCM_anaconda/etc/profile.d/conda.csh -conda activate pyccpp diff --git a/scm/etc/Hera_setup_intel.sh b/scm/etc/Hera_setup_intel.sh deleted file mode 100755 index 5d760260b..000000000 --- a/scm/etc/Hera_setup_intel.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -echo "Setting environment variables for CCPP-SCM on Hera with icc/ifort" - -MYDIR=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P) - -export SCM_ROOT=$MYDIR/../.. - -#load the modules in order to compile the CCPP SCM -echo "Loading intel and netcdf modules..." -module purge -module load intel/2022.1.2 -module load impi/2022.1.2 -module use /scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/modulefiles/stack -module load hpc/1.2.0 -module load hpc-intel/2022.1.2 -module load hpc-impi/2022.1.2 -module load netcdf - -echo "Setting up NCEPLIBS" -export bacio_ROOT=/scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/intel-2022.1.2/bacio/2.4.1 -export sp_ROOT=/scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/intel-2022.1.2/sp/2.3.3 -export w3emc_ROOT=/scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/intel-2022.1.2/w3emc/2.9.2 - -echo "Setting CC/CXX/FC environment variables" -export CC=icc -export CXX=icpc -export FC=ifort - -echo "Loading cmake" -module load cmake/3.20.1 -export CMAKE_C_COMPILER=icc -export CMAKE_CXX_COMPILER=icpc -export CMAKE_Fortran_COMPILER=ifort -export CMAKE_Platform=hera.intel - -echo "Loading the SCM python environment" -. "/scratch1/BMC/gmtb/SCM_anaconda/etc/profile.d/conda.sh" -conda activate pyccpp diff --git a/scm/etc/modules/hera_gnu.lua b/scm/etc/modules/hera_gnu.lua index 23867c4ac..7d45752fa 100644 --- a/scm/etc/modules/hera_gnu.lua +++ b/scm/etc/modules/hera_gnu.lua @@ -7,10 +7,10 @@ whatis([===[Loads libraries needed for building the CCPP SCM on Hera with GNU co prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles") -load("cmake/3.20.1") +load("cmake/3.28.1") load("miniconda/3.9.12") -prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core") +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.0/envs/unified-env-rocky8/install/modulefiles/Core") load("stack-gcc/9.2.0") load("stack-openmpi/4.1.5") diff --git a/scm/etc/modules/hera_intel.lua b/scm/etc/modules/hera_intel.lua index d84db665c..a97464934 100644 --- a/scm/etc/modules/hera_intel.lua +++ b/scm/etc/modules/hera_intel.lua @@ -6,10 +6,10 @@ the NOAA RDHPC machine Hera using Intel-2021.5.0 whatis([===[Loads libraries needed for building the CCPP SCM on Hera with Intel compilers ]===]) prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles") -load("cmake/3.20.1") +load("cmake/3.28.1") load("miniconda/3.9.12") -prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core") +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.0/envs/unified-env-rocky8/install/modulefiles/Core") load("stack-intel/2021.5.0") load("stack-intel-oneapi-mpi/2021.5.1")