Skip to content

Commit

Permalink
Bug fix with macos modulefiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielabdi-noaa committed May 19, 2022
1 parent 4de0ad2 commit 9a356ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
14 changes: 12 additions & 2 deletions modulefiles/build_macos_gnu
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ proc ModulesHelp { } {
module-whatis "Loads libraries needed for building SRW on Hera"

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 @@ -79,5 +79,15 @@ 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 "

#leave setting LDFLAGS to user because MPI_ROOT does not have
#valid value before this modulefile is fully loaded.
set shell [module-info shelltype]
if {$shell == "sh"} {
puts stderr {Please execute this command:
> export LDFLAGS=-L$MPI_ROOT/lib}
} else {
puts stderr {Please execute this command:
> setenv LDFLAGS -L$MPI_ROOT/lib}
}
5 changes: 4 additions & 1 deletion modulefiles/wflow_macos
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ 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;"
}
if { [module-info mode remove] } {
puts "deactivate;"
}

# Uncomment if Rocoto workflow manager is used
Expand Down

0 comments on commit 9a356ce

Please sign in to comment.