Skip to content

Commit

Permalink
Updated hpc-stack modules and compiler flags for building SRW release…
Browse files Browse the repository at this point in the history
…/public-v2 on MacOS (#263)

* Updated versions of hpc-stack modules and compiler flags for building SRW release/public-v2

* 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 "_".

* Corrections to the modulefiles for the MacOS

Modulefiles load software libraries and activate python virtual environment

* correction in build_macos_gnu

* correction in build_macos_gnu

Co-authored-by: Natalie Perlin <Natalie@Natalies-MacBook-Air.local>
Co-authored-by: Jesse McFarland <jesse@mcfarland.sh>
Co-authored-by: Natalie Perlin <perlin.natalie@gmail.com>
  • Loading branch information
4 people authored May 26, 2022
1 parent 4bf237b commit 07516e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
19 changes: 11 additions & 8 deletions modulefiles/build_macos_gnu
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#%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 "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
Expand Down Expand Up @@ -51,11 +52,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

Expand All @@ -64,7 +65,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++"
Expand All @@ -79,5 +80,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 "
# export the environment variable LDFLAGS from the command line
# after loading the current module:
# export LDFLAGS="-L$MPI_ROOT/lib"
4 changes: 2 additions & 2 deletions modulefiles/wflow_macos
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 07516e7

Please sign in to comment.