From ba818eb4d3b36ee247812152b417c9dc1921b8b4 Mon Sep 17 00:00:00 2001 From: Natalie Perlin Date: Thu, 19 May 2022 09:19:29 -0400 Subject: [PATCH 1/5] Updated versions of hpc-stack modules and compiler flags for building SRW release/public-v2 --- modulefiles/build_macos_gnu | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/modulefiles/build_macos_gnu b/modulefiles/build_macos_gnu index 7947b2a343..0d5b63e4c0 100644 --- a/modulefiles/build_macos_gnu +++ b/modulefiles/build_macos_gnu @@ -1,21 +1,21 @@ #%Module proc ModulesHelp { } { - puts stderr "This module loads libraries for building SRW on" - puts stderr "macOS Big Sur (Darwin20) using GNU 11.2 + openmpi/4.2.1" + puts stderr "This module loads libraries for building SRW on MacOS" + puts stderr "M1/arm64 and Intel/x86_64 platforms, Darwin 19,20,21 " } -module-whatis "Loads libraries needed for building SRW on Hera" +module-whatis "Loads libraries needed for building SRW on MacOS" if { [module-info mode load] } { system "ulimit -S -s unlimited;" } # This path should point to your HPCstack installation directory -setenv HPCstack "/Users/username/hpc-stack/install" +setenv HPCstack "/Users/username/HPC-stack/install-1.2.0" # This path should point to your SRW Application directory -setenv SRW "/Users/username/ufs-srweather-app" +setenv SRW "/Users/username/SRW/ufs-srweather-app" # Load HPC stack module use $env(HPCstack)/modulefiles/stack @@ -51,11 +51,11 @@ module load yafyaml/v0.5.1 module load mapl/2.12.2-esmf-8_2_0 module load gfsio/1.4.1 module load landsfcutil/2.4.1 -module load nemsio/2.5.4 +module load nemsio/2.5.2 module load nemsiogfs/2.5.3 module load sfcio/1.4.1 module load sigio/2.3.2 -module load w3emc/2.9.2 +module load w3emc/2.7.3 module load wgrib2/2.0.8 module list @@ -79,5 +79,7 @@ setenv CMAKE_Fortran_COMPILER $env(MPI_FC) setenv CMAKE_Platform macos.gnu setenv CMAKE_Fortran_COMPILER_ID "GNU" -setenv LDFLAGS "-L$env(MPI_ROOT)/lib" setenv FFLAGS "-DNO_QUAD_PRECISION -fallow-argument-mismatch " +# set the environmental variable LDFLAGS in the shell +# after loading the present module: +# export LDFLAGS="-L$MPI_ROOT/lib" From d0c0c69c9cb46bc58d99f5b5e546b482118d79f8 Mon Sep 17 00:00:00 2001 From: Jesse McFarland Date: Wed, 25 May 2022 10:14:27 -0700 Subject: [PATCH 2/5] Fix artifact creation for branches with / in name (#275) The slash in branch names such as release/.* and feature/.* is interpreted as a directory separator. This change replaces the "/" character with a "_". --- .cicd/Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cicd/Jenkinsfile b/.cicd/Jenkinsfile index 158b2963ee..095eecb200 100644 --- a/.cicd/Jenkinsfile +++ b/.cicd/Jenkinsfile @@ -98,7 +98,8 @@ pipeline { } environment { - BUILD_VERSION = "${env.SRW_PLATFORM}-${env.SRW_COMPILER}-${env.BRANCH_NAME}-${env.BUILD_NUMBER}" + BRANCH_NAME_ESCAPED = env.BRANCH_NAME.replace('/', '_') + BUILD_VERSION = "${env.SRW_PLATFORM}-${env.SRW_COMPILER}-${env.BRANCH_NAME_ESCAPED}-${env.BUILD_NUMBER}" BUILD_NAME = "ufs-srweather-app_${env.BUILD_VERSION}" } From a01d5e1e85edb421a835cfe36b6448bf3a17d78b Mon Sep 17 00:00:00 2001 From: Natalie Perlin Date: Thu, 26 May 2022 09:04:58 -0400 Subject: [PATCH 3/5] Corrections to the modulefiles for the MacOS Modulefiles load software libraries and activate python virtual environment --- modulefiles/build_macos_gnu | 22 +++++++++++++--------- modulefiles/wflow_macos | 4 ++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/modulefiles/build_macos_gnu b/modulefiles/build_macos_gnu index 7947b2a343..8cee6b1b77 100644 --- a/modulefiles/build_macos_gnu +++ b/modulefiles/build_macos_gnu @@ -1,18 +1,20 @@ #%Module proc ModulesHelp { } { - puts stderr "This module loads libraries for building SRW on" - puts stderr "macOS Big Sur (Darwin20) using GNU 11.2 + openmpi/4.2.1" + puts stderr "This module loads libraries for building SRW on MacOS" + puts stderr "Option 1: M1/arm64 platform, OS BigSur,Monterey (Darwin 20,21) " + puts stderr "Option 2: Intel/x86_64 platform, OS BigSur (Darwin 19) " + puts stderr " } -module-whatis "Loads libraries needed for building SRW on Hera" +module-whatis "Loads libraries needed for building SRW on MacOS" if { [module-info mode load] } { - system "ulimit -S -s unlimited;" + puts "ulimit -S -s unlimited;" } # This path should point to your HPCstack installation directory -setenv HPCstack "/Users/username/hpc-stack/install" +setenv HPCstack "/Users/username/HPC-stack/install" # This path should point to your SRW Application directory setenv SRW "/Users/username/ufs-srweather-app" @@ -51,11 +53,11 @@ module load yafyaml/v0.5.1 module load mapl/2.12.2-esmf-8_2_0 module load gfsio/1.4.1 module load landsfcutil/2.4.1 -module load nemsio/2.5.4 +module load nemsio/2.5.2 module load nemsiogfs/2.5.3 module load sfcio/1.4.1 module load sigio/2.3.2 -module load w3emc/2.9.2 +module load w3emc/2.7.3 module load wgrib2/2.0.8 module list @@ -64,7 +66,7 @@ setenv CC "/opt/homebrew/bin/gcc" setenv FC "/opt/homebrew/bin/gfortran" setenv CXX "/opt/homebrew/bin/g++" -# Option 2 compiler paths: +# Option 2 compiler paths (uncomment): #setenv CC "/usr/local/bin/gcc" #setenv FC "/usr/local/bin/gfortran" #setenv CXX "/usr/local/bin/g++" @@ -79,5 +81,7 @@ setenv CMAKE_Fortran_COMPILER $env(MPI_FC) setenv CMAKE_Platform macos.gnu setenv CMAKE_Fortran_COMPILER_ID "GNU" -setenv LDFLAGS "-L$env(MPI_ROOT)/lib" setenv FFLAGS "-DNO_QUAD_PRECISION -fallow-argument-mismatch " +# set the environmental variable LDFLAGS from the command line +# after loading the current module: +# export LDFLAGS="-L$MPI_ROOT/lib" diff --git a/modulefiles/wflow_macos b/modulefiles/wflow_macos index 7481b36911..5cf2c05984 100644 --- a/modulefiles/wflow_macos +++ b/modulefiles/wflow_macos @@ -5,7 +5,7 @@ proc ModulesHelp { } { put stderr "macOS" } -module-whatis "Loads libraries needed for running SRW on macOS" +module-whatis "This module activates python environment for running SRW on macOS" setenv CMAKE_Platform macos @@ -14,7 +14,7 @@ setenv CMAKE_Platform macos # setenv VENV "/Users/username/venv/regional_workflow" if { [module-info mode load] } { - system "source $env(VENV)/bin/activate;" + puts "source $env(VENV)/bin/activate;" } # Uncomment if Rocoto workflow manager is used From 64ce53d98c9392b62b94ba0e7ba4133b3e33bb54 Mon Sep 17 00:00:00 2001 From: Natalie Perlin Date: Thu, 26 May 2022 09:15:43 -0400 Subject: [PATCH 4/5] correction in build_macos_gnu --- modulefiles/build_macos_gnu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modulefiles/build_macos_gnu b/modulefiles/build_macos_gnu index 7ee0cbcd18..d4a4d66d96 100644 --- a/modulefiles/build_macos_gnu +++ b/modulefiles/build_macos_gnu @@ -13,7 +13,7 @@ if { [module-info mode load] } { } # This path should point to your HPCstack installation directory -setenv HPCstack "/Users/username/HPC-stack/install" +setenv HPCstack "/Users/username/hpc-stack/install" # This path should point to your SRW Application directory setenv SRW "/Users/username/SRW/ufs-srweather-app" From a7c098d05122ea049a8855bea2646206ff130922 Mon Sep 17 00:00:00 2001 From: Natalie Perlin Date: Thu, 26 May 2022 09:27:15 -0400 Subject: [PATCH 5/5] correction in build_macos_gnu --- modulefiles/build_macos_gnu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modulefiles/build_macos_gnu b/modulefiles/build_macos_gnu index d4a4d66d96..4e0c670b70 100644 --- a/modulefiles/build_macos_gnu +++ b/modulefiles/build_macos_gnu @@ -16,7 +16,7 @@ if { [module-info mode load] } { setenv HPCstack "/Users/username/hpc-stack/install" # This path should point to your SRW Application directory -setenv SRW "/Users/username/SRW/ufs-srweather-app" +setenv SRW "/Users/username/ufs-srweather-app" # Load HPC stack module use $env(HPCstack)/modulefiles/stack