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

Updates for Singularity: Add site option #484

Merged
merged 5 commits into from
Jul 3, 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
4 changes: 2 additions & 2 deletions gcm_run.j
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ setenv GEOSBIN @GEOSBIN
setenv GEOSETC @GEOSETC
setenv GEOSUTIL @GEOSSRC

@NATIVE_BUILD source $GEOSBIN/g5_modules
@NATIVE_BUILD setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${BASEDIR}/${ARCH}/lib:${GEOSDIR}/lib
source $GEOSBIN/g5_modules
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${BASEDIR}/${ARCH}/lib:${GEOSDIR}/lib

setenv RUN_CMD "$GEOSBIN/esma_mpirun -np "

Expand Down
23 changes: 22 additions & 1 deletion gcm_setup
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ endif
set LINKX = FALSE
set EXE_VERB = "copied"
set USING_SINGULARITY = FALSE
set USER_SITE = ""

while ( $#argv > 0 )
set arg = $argv[1]
Expand All @@ -70,6 +71,22 @@ while ( $#argv > 0 )
case --[Cc][Oo][Ll][Oo][Rr]:
goto SETCOLOR

# Testing with singularity found we need the ability to override
# the SITE variable below because images might be built on, say,
# AWS and thus "block" us from running at NCCS.
#
# So, we make a --site flag that allows us to override the SITE
# variable
case --site:
set USER_SITE = $1
# if USER_SITE is empty, then we error out
if ( "$USER_SITE" == "" ) then
echo "ERROR: --site flag requires a site name"
exit 1
endif
shift argv
breaksw

# Symlink GEOSgcm.x
case --link:
set LINKX = TRUE
Expand Down Expand Up @@ -100,7 +117,11 @@ end

setenv NODE `uname -n`
setenv ARCH `uname -s`
setenv SITE `awk '{print $2}' $ETCDIR/SITE.rc`
if ($USER_SITE == "") then
setenv SITE `awk '{print $2}' $ETCDIR/SITE.rc`
else
setenv SITE $USER_SITE
endif

#######################################################################
# Test for Compiler and MPI Setup
Expand Down
23 changes: 22 additions & 1 deletion geoschemchem_setup
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ endif
set LINKX = FALSE
set EXE_VERB = "copied"
set USING_SINGULARITY = FALSE
set USER_SITE = ""

while ( $#argv > 0 )
set arg = $argv[1]
Expand All @@ -70,6 +71,22 @@ while ( $#argv > 0 )
case --[Cc][Oo][Ll][Oo][Rr]:
goto SETCOLOR

# Testing with singularity found we need the ability to override
# the SITE variable below because images might be built on, say,
# AWS and thus "block" us from running at NCCS.
#
# So, we make a --site flag that allows us to override the SITE
# variable
case --site:
set USER_SITE = $1
# if USER_SITE is empty, then we error out
if ( "$USER_SITE" == "" ) then
echo "ERROR: --site flag requires a site name"
exit 1
endif
shift argv
breaksw

# Symlink GEOSgcm.x
case --link:
set LINKX = TRUE
Expand Down Expand Up @@ -100,7 +117,11 @@ end

setenv NODE `uname -n`
setenv ARCH `uname -s`
setenv SITE `awk '{print $2}' $ETCDIR/SITE.rc`
if ($USER_SITE == "") then
setenv SITE `awk '{print $2}' $ETCDIR/SITE.rc`
else
setenv SITE $USER_SITE
endif

#######################################################################
# Test for Compiler and MPI Setup
Expand Down
23 changes: 22 additions & 1 deletion gmichem_setup
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ endif
set LINKX = FALSE
set EXE_VERB = "copied"
set USING_SINGULARITY = FALSE
set USER_SITE = ""

while ( $#argv > 0 )
set arg = $argv[1]
Expand All @@ -70,6 +71,22 @@ while ( $#argv > 0 )
case --[Cc][Oo][Ll][Oo][Rr]:
goto SETCOLOR

# Testing with singularity found we need the ability to override
# the SITE variable below because images might be built on, say,
# AWS and thus "block" us from running at NCCS.
#
# So, we make a --site flag that allows us to override the SITE
# variable
case --site:
set USER_SITE = $1
# if USER_SITE is empty, then we error out
if ( "$USER_SITE" == "" ) then
echo "ERROR: --site flag requires a site name"
exit 1
endif
shift argv
breaksw

# Symlink GEOSgcm.x
case --link:
set LINKX = TRUE
Expand Down Expand Up @@ -100,7 +117,11 @@ end

setenv NODE `uname -n`
setenv ARCH `uname -s`
setenv SITE `awk '{print $2}' $ETCDIR/SITE.rc`
if ($USER_SITE == "") then
setenv SITE `awk '{print $2}' $ETCDIR/SITE.rc`
else
setenv SITE $USER_SITE
endif

#######################################################################
# Test for Compiler and MPI Setup
Expand Down
23 changes: 22 additions & 1 deletion stratchem_setup
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ endif
set LINKX = FALSE
set EXE_VERB = "copied"
set USING_SINGULARITY = FALSE
set USER_SITE = ""

while ( $#argv > 0 )
set arg = $argv[1]
Expand All @@ -70,6 +71,22 @@ while ( $#argv > 0 )
case --[Cc][Oo][Ll][Oo][Rr]:
goto SETCOLOR

# Testing with singularity found we need the ability to override
# the SITE variable below because images might be built on, say,
# AWS and thus "block" us from running at NCCS.
#
# So, we make a --site flag that allows us to override the SITE
# variable
case --site:
set USER_SITE = $1
# if USER_SITE is empty, then we error out
if ( "$USER_SITE" == "" ) then
echo "ERROR: --site flag requires a site name"
exit 1
endif
shift argv
breaksw

# Symlink GEOSgcm.x
case --link:
set LINKX = TRUE
Expand Down Expand Up @@ -100,7 +117,11 @@ end

setenv NODE `uname -n`
setenv ARCH `uname -s`
setenv SITE `awk '{print $2}' $ETCDIR/SITE.rc`
if ($USER_SITE == "") then
setenv SITE `awk '{print $2}' $ETCDIR/SITE.rc`
else
setenv SITE $USER_SITE
endif

#######################################################################
# Test for Compiler and MPI Setup
Expand Down