From 50d809aa9ae8569f588ed94100fb3d875e549448 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 16 May 2023 09:48:28 -0400 Subject: [PATCH 1/4] Remove Rome detection at NAS, fixes for AWS and unknown --- gcm_setup | 148 ++++++++++++++++++++++++--------------------- geoschemchem_setup | 102 +++++++++++++++++-------------- gmichem_setup | 148 ++++++++++++++++++++++++--------------------- stratchem_setup | 148 ++++++++++++++++++++++++--------------------- 4 files changed, 293 insertions(+), 253 deletions(-) diff --git a/gcm_setup b/gcm_setup index 6fa050e6..e7e45490 100755 --- a/gcm_setup +++ b/gcm_setup @@ -401,47 +401,27 @@ if ( $SITE == 'NCCS' ) then else if ( $SITE == 'NAS' ) then - set BUILT_ON_ROME = @BUILT_ON_ROME@ - - if ( $BUILT_ON_ROME == "TRUE") then - - echo "Enter the ${C1}Processor Type${CN} you wish to run on:" - echo " ${C2}rom (AMD Rome) (default)${CN}" - echo " " - echo " NOTE GEOS is non-zero-diff when running on AMD Rome" - echo " compared to the other Intel nodes." - echo " " - set MODEL = `echo $<` - set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` - if ( .$MODEL == .) then - set MODEL = 'rom' - endif - - if( $MODEL != 'rom' ) goto ASKPROC - else - - echo "Enter the ${C1}Processor Type${CN} you wish to run on:" - echo " ${C2}has (Haswell)${CN}" - echo " ${C2}bro (Broadwell)${CN}" - echo " ${C2}sky (Skylake)${CN} (default)" - echo " ${C2}cas (Cascade Lake)${CN}" - echo " " - echo " NOTE 1: Due to how FV3 is compiled by default, Sandy Bridge" - echo " and Ivy Bridge are not supported by current GEOS" - echo " " - echo " NOTE 2: Due to OS differences, if you want to run on the AMD" - echo " Rome nodes at NAS, you must recompile on the Rome nodes" - echo " " - set MODEL = `echo $<` - set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` - if ( .$MODEL == .) then - set MODEL = 'sky' - endif + echo "Enter the ${C1}Processor Type${CN} you wish to run on:" + echo " ${C2}has (Haswell)${CN}" + echo " ${C2}bro (Broadwell)${CN}" + echo " ${C2}sky (Skylake)${CN} (default)" + echo " ${C2}cas (Cascade Lake)${CN}" + echo " ${C2}rom (AMD Rome)${CN}" + echo " " + echo " NOTE Due to how FV3 is compiled by default, Sandy Bridge" + echo " and Ivy Bridge are not supported by current GEOS" + echo " " + set MODEL = `echo $<` + set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` + if ( .$MODEL == .) then + set MODEL = 'sky' + endif - if( $MODEL != 'has' & \ - $MODEL != 'bro' & \ - $MODEL != 'sky' & \ - $MODEL != 'cas' ) goto ASKPROC + if( $MODEL != 'has' & \ + $MODEL != 'bro' & \ + $MODEL != 'sky' & \ + $MODEL != 'cas' & \ + $MODEL != 'rom' ) goto ASKPROC endif @@ -472,8 +452,44 @@ else if ( $SITE == 'NAS' ) then set NCPUS_PER_NODE = 128 endif +else if( $SITE == 'AWS' ) then + + # Because we do not know the name of the model or the number of CPUs + # per node. We ask the user to set these variables in the script + + # AWS users must set the MODEL and NCPUS_PER_NODE + set MODEL = USER_MUST_SET + set NCPUS_PER_NODE = USER_MUST_SET + + # Above we need a user to set the MODEL and NCPUS_PER_NODE + # variables. Here we check that they have been set. If not, + # we ask the user to set them + # -------------------------------------------------------- + + if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then + echo "ERROR: We have detected you are on AWS. As we do not have" + echo " official nodes yet, we ask you to edit $0" + echo " and set the MODEL and NCPUS_PER_NODE variables" + echo " in the script $0." + echo " Look for the section that says:" + echo " " + echo " # AWS users must set the MODEL and NCPUS_PER_NODE" + exit 1 + endif + else set MODEL = 'UNKNOWN' + # As we do not know how many CPUs per node, we detect the number + # of CPUs per node by looking at the number of CPUs. This is different + # on Linux and macOS + if ( $ARCH == 'Linux' ) then + set NCPUS_PER_NODE = `grep -c ^processor /proc/cpuinfo` + else if ( $ARCH == 'Darwin' ) then + set NCPUS_PER_NODE = `sysctl -n hw.ncpu` + else + echo "ERROR: Unknown architecture $ARCH" + exit 1 + endif endif ####################################################################### @@ -1619,29 +1635,29 @@ else if( $SITE == 'NCCS' ) then setenv COUPLEDIR /discover/nobackup/projects/gmao/ssd/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/GWD_RIDGE # Location of GWD_RIDGE files else if( $SITE == 'AWS' ) then - setenv BATCH_CMD "sbatch" # SLURM Batch command - setenv BATCH_GROUP DELETE # SLURM Syntax for account name - setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime - setenv BATCH_JOBNAME "SBATCH --job-name=" # SLURM Syntax for job name - setenv BATCH_OUTPUTNAME "SBATCH --output=" # SLURM Syntax for job output name - setenv BATCH_JOINOUTERR "DELETE" # SLURM joins out and err by default - setenv RUN_FT "06:00:00" # Wallclock Time for gcm_forecast.j - setenv RUN_T "12:00:00" # Wallclock Time for gcm_run.j - setenv POST_T "8:00:00" # Wallclock Time for gcm_post.j - setenv PLOT_T "12:00:00" # Wallclock Time for gcm_plot.j - setenv ARCHIVE_T "1:00:00" # Wallclock Time for gcm_archive.j - setenv RUN_Q DELETE # batch queue name for gcm_run.j - setenv RUN_P "SBATCH --ntasks=${MODEL_NPES}" # PE Configuration for gcm_run.j - setenv RUN_FP "SBATCH --ntasks=${MODEL_NPES}" # PE Configuration for gcm_forecast.j - setenv POST_Q NULL # batch queue name for gcm_post.j - setenv PLOT_Q NULL # batch queue name for gcm_plot.j - setenv MOVE_Q NULL # batch queue name for gcm_moveplot.j - setenv ARCHIVE_Q NULL # batch queue name for gcm_archive.j - setenv POST_P "SBATCH --ntasks=${POST_NPES}" # PE Configuration for gcm_post.j - setenv PLOT_P "SBATCH --nodes=4 --ntasks=4" # PE Configuration for gcm_plot.j - setenv ARCHIVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_archive.j - setenv CONVERT_P "SBATCH --ntasks=${CNV_NPES}" # PE Configuration for gcm_convert.j - setenv MOVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_moveplot.j + setenv BATCH_CMD "sbatch" # SLURM Batch command + setenv BATCH_GROUP DELETE # SLURM Syntax for account name + setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime + setenv BATCH_JOBNAME "SBATCH --job-name=" # SLURM Syntax for job name + setenv BATCH_OUTPUTNAME "SBATCH --output=" # SLURM Syntax for job output name + setenv BATCH_JOINOUTERR "DELETE" # SLURM joins out and err by default + setenv RUN_FT "06:00:00" # Wallclock Time for gcm_forecast.j + setenv RUN_T "12:00:00" # Wallclock Time for gcm_run.j + setenv POST_T "8:00:00" # Wallclock Time for gcm_post.j + setenv PLOT_T "12:00:00" # Wallclock Time for gcm_plot.j + setenv ARCHIVE_T "1:00:00" # Wallclock Time for gcm_archive.j + setenv RUN_Q "SBATCH --constraint=${MODEL}" # batch queue name for gcm_run.j + setenv RUN_P "SBATCH --nodes=${NODES} --ntasks-per-node=${NCPUS_PER_NODE}" # PE Configuration for gcm_run.j + setenv RUN_FP "SBATCH --nodes=${NODES} --ntasks-per-node=${NCPUS_PER_NODE}" # PE Configuration for gcm_forecast.j + setenv POST_Q NULL # batch queue name for gcm_post.j + setenv PLOT_Q NULL # batch queue name for gcm_plot.j + setenv MOVE_Q NULL # batch queue name for gcm_moveplot.j + setenv ARCHIVE_Q NULL # batch queue name for gcm_archive.j + setenv POST_P "SBATCH --ntasks=${POST_NPES}" # PE Configuration for gcm_post.j + setenv PLOT_P "SBATCH --nodes=4 --ntasks=4" # PE Configuration for gcm_plot.j + setenv ARCHIVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_archive.j + setenv CONVERT_P "SBATCH --ntasks=${CNV_NPES}" # PE Configuration for gcm_convert.j + setenv MOVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_moveplot.j setenv BCSDIR /ford1/share/gmao_SIteam/ModelData/bcs/${LSM_BCS}/${LSM_BCS}_${OCEAN_TAG} # location of Boundary Conditions setenv REPLAY_ANA_EXPID REPLAY_UNSUPPORTED # Default Analysis Experiment for REPLAY @@ -1654,11 +1670,6 @@ else if( $SITE == 'AWS' ) then setenv COUPLEDIR /ford1/share/gmao_SIteam/ModelData/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /ford1/share/gmao_SIteam/ModelData/GWD_RIDGE # Location of GWD_RIDGE files - # By default on AWS, just ignore IOSERVER for now until testing - set USE_IOSERVER = 0 - set NUM_OSERVER_NODES = 0 - set NUM_BACKEND_PES = 0 - set NCPUS_PER_NODE = 0 else # These are defaults for the desktop setenv BATCH_CMD "sbatch" # SLURM Batch command @@ -1703,7 +1714,6 @@ else set USE_IOSERVER = 0 set NUM_OSERVER_NODES = 0 set NUM_BACKEND_PES = 0 - set NCPUS_PER_NODE = 0 endif ####################################################################### diff --git a/geoschemchem_setup b/geoschemchem_setup index c14cb1c1..e8558fec 100755 --- a/geoschemchem_setup +++ b/geoschemchem_setup @@ -401,47 +401,27 @@ if ( $SITE == 'NCCS' ) then else if ( $SITE == 'NAS' ) then - set BUILT_ON_ROME = @BUILT_ON_ROME@ - - if ( $BUILT_ON_ROME == "TRUE") then - - echo "Enter the ${C1}Processor Type${CN} you wish to run on:" - echo " ${C2}rom (AMD Rome) (default)${CN}" - echo " " - echo " NOTE GEOS is non-zero-diff when running on AMD Rome" - echo " compared to the other Intel nodes." - echo " " - set MODEL = `echo $<` - set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` - if ( .$MODEL == .) then - set MODEL = 'rom' - endif - - if( $MODEL != 'rom' ) goto ASKPROC - else - - echo "Enter the ${C1}Processor Type${CN} you wish to run on:" - echo " ${C2}has (Haswell)${CN}" - echo " ${C2}bro (Broadwell)${CN}" - echo " ${C2}sky (Skylake)${CN} (default)" - echo " ${C2}cas (Cascade Lake)${CN}" - echo " " - echo " NOTE 1: Due to how FV3 is compiled by default, Sandy Bridge" - echo " and Ivy Bridge are not supported by current GEOS" - echo " " - echo " NOTE 2: Due to OS differences, if you want to run on the AMD" - echo " Rome nodes at NAS, you must recompile on the Rome nodes" - echo " " - set MODEL = `echo $<` - set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` - if ( .$MODEL == .) then - set MODEL = 'sky' - endif + echo "Enter the ${C1}Processor Type${CN} you wish to run on:" + echo " ${C2}has (Haswell)${CN}" + echo " ${C2}bro (Broadwell)${CN}" + echo " ${C2}sky (Skylake)${CN} (default)" + echo " ${C2}cas (Cascade Lake)${CN}" + echo " ${C2}rom (AMD Rome)${CN}" + echo " " + echo " NOTE Due to how FV3 is compiled by default, Sandy Bridge" + echo " and Ivy Bridge are not supported by current GEOS" + echo " " + set MODEL = `echo $<` + set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` + if ( .$MODEL == .) then + set MODEL = 'sky' + endif - if( $MODEL != 'has' & \ - $MODEL != 'bro' & \ - $MODEL != 'sky' & \ - $MODEL != 'cas' ) goto ASKPROC + if( $MODEL != 'has' & \ + $MODEL != 'bro' & \ + $MODEL != 'sky' & \ + $MODEL != 'cas' & \ + $MODEL != 'rom' ) goto ASKPROC endif @@ -472,8 +452,44 @@ else if ( $SITE == 'NAS' ) then set NCPUS_PER_NODE = 128 endif +else if( $SITE == 'AWS' ) then + + # Because we do not know the name of the model or the number of CPUs + # per node. We ask the user to set these variables in the script + + # AWS users must set the MODEL and NCPUS_PER_NODE + set MODEL = USER_MUST_SET + set NCPUS_PER_NODE = USER_MUST_SET + + # Above we need a user to set the MODEL and NCPUS_PER_NODE + # variables. Here we check that they have been set. If not, + # we ask the user to set them + # -------------------------------------------------------- + + if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then + echo "ERROR: We have detected you are on AWS. As we do not have" + echo " official nodes yet, we ask you to edit $0" + echo " and set the MODEL and NCPUS_PER_NODE variables" + echo " in the script $0." + echo " Look for the section that says:" + echo " " + echo " # AWS users must set the MODEL and NCPUS_PER_NODE" + exit 1 + endif + else set MODEL = 'UNKNOWN' + # As we do not know how many CPUs per node, we detect the number + # of CPUs per node by looking at the number of CPUs. This is different + # on Linux and macOS + if ( $ARCH == 'Linux' ) then + set NCPUS_PER_NODE = `grep -c ^processor /proc/cpuinfo` + else if ( $ARCH == 'Darwin' ) then + set NCPUS_PER_NODE = `sysctl -n hw.ncpu` + else + echo "ERROR: Unknown architecture $ARCH" + exit 1 + endif endif ####################################################################### @@ -1684,11 +1700,6 @@ else if( $SITE == 'AWS' ) then setenv COUPLEDIR /ford1/share/gmao_SIteam/ModelData/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /ford1/share/gmao_SIteam/ModelData/GWD_RIDGE # Location of GWD_RIDGE files - # By default on AWS, just ignore IOSERVER for now until testing - set USE_IOSERVER = 0 - set NUM_OSERVER_NODES = 0 - set NUM_BACKEND_PES = 0 - set NCPUS_PER_NODE = 0 else # These are defaults for the desktop setenv BATCH_CMD "sbatch" # SLURM Batch command @@ -1733,7 +1744,6 @@ else set USE_IOSERVER = 0 set NUM_OSERVER_NODES = 0 set NUM_BACKEND_PES = 0 - set NCPUS_PER_NODE = 0 endif ####################################################################### diff --git a/gmichem_setup b/gmichem_setup index 23b56fb2..802cafb5 100755 --- a/gmichem_setup +++ b/gmichem_setup @@ -401,47 +401,27 @@ if ( $SITE == 'NCCS' ) then else if ( $SITE == 'NAS' ) then - set BUILT_ON_ROME = @BUILT_ON_ROME@ - - if ( $BUILT_ON_ROME == "TRUE") then - - echo "Enter the ${C1}Processor Type${CN} you wish to run on:" - echo " ${C2}rom (AMD Rome) (default)${CN}" - echo " " - echo " NOTE GEOS is non-zero-diff when running on AMD Rome" - echo " compared to the other Intel nodes." - echo " " - set MODEL = `echo $<` - set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` - if ( .$MODEL == .) then - set MODEL = 'rom' - endif - - if( $MODEL != 'rom' ) goto ASKPROC - else - - echo "Enter the ${C1}Processor Type${CN} you wish to run on:" - echo " ${C2}has (Haswell)${CN}" - echo " ${C2}bro (Broadwell)${CN}" - echo " ${C2}sky (Skylake)${CN} (default)" - echo " ${C2}cas (Cascade Lake)${CN}" - echo " " - echo " NOTE 1: Due to how FV3 is compiled by default, Sandy Bridge" - echo " and Ivy Bridge are not supported by current GEOS" - echo " " - echo " NOTE 2: Due to OS differences, if you want to run on the AMD" - echo " Rome nodes at NAS, you must recompile on the Rome nodes" - echo " " - set MODEL = `echo $<` - set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` - if ( .$MODEL == .) then - set MODEL = 'sky' - endif + echo "Enter the ${C1}Processor Type${CN} you wish to run on:" + echo " ${C2}has (Haswell)${CN}" + echo " ${C2}bro (Broadwell)${CN}" + echo " ${C2}sky (Skylake)${CN} (default)" + echo " ${C2}cas (Cascade Lake)${CN}" + echo " ${C2}rom (AMD Rome)${CN}" + echo " " + echo " NOTE Due to how FV3 is compiled by default, Sandy Bridge" + echo " and Ivy Bridge are not supported by current GEOS" + echo " " + set MODEL = `echo $<` + set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` + if ( .$MODEL == .) then + set MODEL = 'sky' + endif - if( $MODEL != 'has' & \ - $MODEL != 'bro' & \ - $MODEL != 'sky' & \ - $MODEL != 'cas' ) goto ASKPROC + if( $MODEL != 'has' & \ + $MODEL != 'bro' & \ + $MODEL != 'sky' & \ + $MODEL != 'cas' & \ + $MODEL != 'rom' ) goto ASKPROC endif @@ -472,8 +452,44 @@ else if ( $SITE == 'NAS' ) then set NCPUS_PER_NODE = 128 endif +else if( $SITE == 'AWS' ) then + + # Because we do not know the name of the model or the number of CPUs + # per node. We ask the user to set these variables in the script + + # AWS users must set the MODEL and NCPUS_PER_NODE + set MODEL = USER_MUST_SET + set NCPUS_PER_NODE = USER_MUST_SET + + # Above we need a user to set the MODEL and NCPUS_PER_NODE + # variables. Here we check that they have been set. If not, + # we ask the user to set them + # -------------------------------------------------------- + + if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then + echo "ERROR: We have detected you are on AWS. As we do not have" + echo " official nodes yet, we ask you to edit $0" + echo " and set the MODEL and NCPUS_PER_NODE variables" + echo " in the script $0." + echo " Look for the section that says:" + echo " " + echo " # AWS users must set the MODEL and NCPUS_PER_NODE" + exit 1 + endif + else set MODEL = 'UNKNOWN' + # As we do not know how many CPUs per node, we detect the number + # of CPUs per node by looking at the number of CPUs. This is different + # on Linux and macOS + if ( $ARCH == 'Linux' ) then + set NCPUS_PER_NODE = `grep -c ^processor /proc/cpuinfo` + else if ( $ARCH == 'Darwin' ) then + set NCPUS_PER_NODE = `sysctl -n hw.ncpu` + else + echo "ERROR: Unknown architecture $ARCH" + exit 1 + endif endif # Per previous gmichem_setup, reduce cores-per-node by 1 @@ -1811,29 +1827,29 @@ else if( $SITE == 'NCCS' ) then setenv COUPLEDIR /discover/nobackup/projects/gmao/ssd/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/GWD_RIDGE # Location of GWD_RIDGE files else if( $SITE == 'AWS' ) then - setenv BATCH_CMD "sbatch" # SLURM Batch command - setenv BATCH_GROUP DELETE # SLURM Syntax for account name - setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime - setenv BATCH_JOBNAME "SBATCH --job-name=" # SLURM Syntax for job name - setenv BATCH_OUTPUTNAME "SBATCH --output=" # SLURM Syntax for job output name - setenv BATCH_JOINOUTERR "DELETE" # SLURM joins out and err by default - setenv RUN_FT "06:00:00" # Wallclock Time for gcm_forecast.j - setenv RUN_T "12:00:00" # Wallclock Time for gcm_run.j - setenv POST_T "8:00:00" # Wallclock Time for gcm_post.j - setenv PLOT_T "12:00:00" # Wallclock Time for gcm_plot.j - setenv ARCHIVE_T "1:00:00" # Wallclock Time for gcm_archive.j - setenv RUN_Q DELETE # batch queue name for gcm_run.j - setenv RUN_P "SBATCH --ntasks=${MODEL_NPES}" # PE Configuration for gcm_run.j - setenv RUN_FP "SBATCH --ntasks=${MODEL_NPES}" # PE Configuration for gcm_forecast.j - setenv POST_Q NULL # batch queue name for gcm_post.j - setenv PLOT_Q NULL # batch queue name for gcm_plot.j - setenv MOVE_Q NULL # batch queue name for gcm_moveplot.j - setenv ARCHIVE_Q NULL # batch queue name for gcm_archive.j - setenv POST_P "SBATCH --ntasks=${POST_NPES}" # PE Configuration for gcm_post.j - setenv PLOT_P "SBATCH --nodes=4 --ntasks=4" # PE Configuration for gcm_plot.j - setenv ARCHIVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_archive.j - setenv CONVERT_P "SBATCH --ntasks=${CNV_NPES}" # PE Configuration for gcm_convert.j - setenv MOVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_moveplot.j + setenv BATCH_CMD "sbatch" # SLURM Batch command + setenv BATCH_GROUP DELETE # SLURM Syntax for account name + setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime + setenv BATCH_JOBNAME "SBATCH --job-name=" # SLURM Syntax for job name + setenv BATCH_OUTPUTNAME "SBATCH --output=" # SLURM Syntax for job output name + setenv BATCH_JOINOUTERR "DELETE" # SLURM joins out and err by default + setenv RUN_FT "06:00:00" # Wallclock Time for gcm_forecast.j + setenv RUN_T "12:00:00" # Wallclock Time for gcm_run.j + setenv POST_T "8:00:00" # Wallclock Time for gcm_post.j + setenv PLOT_T "12:00:00" # Wallclock Time for gcm_plot.j + setenv ARCHIVE_T "1:00:00" # Wallclock Time for gcm_archive.j + setenv RUN_Q "SBATCH --constraint=${MODEL}" # batch queue name for gcm_run.j + setenv RUN_P "SBATCH --nodes=${NODES} --ntasks-per-node=${NCPUS_PER_NODE}" # PE Configuration for gcm_run.j + setenv RUN_FP "SBATCH --nodes=${NODES} --ntasks-per-node=${NCPUS_PER_NODE}" # PE Configuration for gcm_forecast.j + setenv POST_Q NULL # batch queue name for gcm_post.j + setenv PLOT_Q NULL # batch queue name for gcm_plot.j + setenv MOVE_Q NULL # batch queue name for gcm_moveplot.j + setenv ARCHIVE_Q NULL # batch queue name for gcm_archive.j + setenv POST_P "SBATCH --ntasks=${POST_NPES}" # PE Configuration for gcm_post.j + setenv PLOT_P "SBATCH --nodes=4 --ntasks=4" # PE Configuration for gcm_plot.j + setenv ARCHIVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_archive.j + setenv CONVERT_P "SBATCH --ntasks=${CNV_NPES}" # PE Configuration for gcm_convert.j + setenv MOVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_moveplot.j setenv BCSDIR /ford1/share/gmao_SIteam/ModelData/bcs/${LSM_BCS}/${LSM_BCS}_${OCEAN_TAG} # location of Boundary Conditions setenv REPLAY_ANA_EXPID REPLAY_UNSUPPORTED # Default Analysis Experiment for REPLAY @@ -1846,11 +1862,6 @@ else if( $SITE == 'AWS' ) then setenv COUPLEDIR /ford1/share/gmao_SIteam/ModelData/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /ford1/share/gmao_SIteam/ModelData/GWD_RIDGE # Location of GWD_RIDGE files - # By default on AWS, just ignore IOSERVER for now until testing - set USE_IOSERVER = 0 - set NUM_OSERVER_NODES = 0 - set NUM_BACKEND_PES = 0 - set NCPUS_PER_NODE = 0 else # These are defaults for the desktop setenv BATCH_CMD "sbatch" # SLURM Batch command @@ -1895,7 +1906,6 @@ else set USE_IOSERVER = 0 set NUM_OSERVER_NODES = 0 set NUM_BACKEND_PES = 0 - set NCPUS_PER_NODE = 0 endif # If SST and SEAICE files are not in the standard location: diff --git a/stratchem_setup b/stratchem_setup index c1450985..41bbe62f 100755 --- a/stratchem_setup +++ b/stratchem_setup @@ -401,47 +401,27 @@ if ( $SITE == 'NCCS' ) then else if ( $SITE == 'NAS' ) then - set BUILT_ON_ROME = @BUILT_ON_ROME@ - - if ( $BUILT_ON_ROME == "TRUE") then - - echo "Enter the ${C1}Processor Type${CN} you wish to run on:" - echo " ${C2}rom (AMD Rome) (default)${CN}" - echo " " - echo " NOTE GEOS is non-zero-diff when running on AMD Rome" - echo " compared to the other Intel nodes." - echo " " - set MODEL = `echo $<` - set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` - if ( .$MODEL == .) then - set MODEL = 'rom' - endif - - if( $MODEL != 'rom' ) goto ASKPROC - else - - echo "Enter the ${C1}Processor Type${CN} you wish to run on:" - echo " ${C2}has (Haswell)${CN}" - echo " ${C2}bro (Broadwell)${CN}" - echo " ${C2}sky (Skylake)${CN} (default)" - echo " ${C2}cas (Cascade Lake)${CN}" - echo " " - echo " NOTE 1: Due to how FV3 is compiled by default, Sandy Bridge" - echo " and Ivy Bridge are not supported by current GEOS" - echo " " - echo " NOTE 2: Due to OS differences, if you want to run on the AMD" - echo " Rome nodes at NAS, you must recompile on the Rome nodes" - echo " " - set MODEL = `echo $<` - set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` - if ( .$MODEL == .) then - set MODEL = 'sky' - endif + echo "Enter the ${C1}Processor Type${CN} you wish to run on:" + echo " ${C2}has (Haswell)${CN}" + echo " ${C2}bro (Broadwell)${CN}" + echo " ${C2}sky (Skylake)${CN} (default)" + echo " ${C2}cas (Cascade Lake)${CN}" + echo " ${C2}rom (AMD Rome)${CN}" + echo " " + echo " NOTE Due to how FV3 is compiled by default, Sandy Bridge" + echo " and Ivy Bridge are not supported by current GEOS" + echo " " + set MODEL = `echo $<` + set MODEL = `echo $MODEL | tr "[:upper:]" "[:lower:]"` + if ( .$MODEL == .) then + set MODEL = 'sky' + endif - if( $MODEL != 'has' & \ - $MODEL != 'bro' & \ - $MODEL != 'sky' & \ - $MODEL != 'cas' ) goto ASKPROC + if( $MODEL != 'has' & \ + $MODEL != 'bro' & \ + $MODEL != 'sky' & \ + $MODEL != 'cas' & \ + $MODEL != 'rom' ) goto ASKPROC endif @@ -472,8 +452,44 @@ else if ( $SITE == 'NAS' ) then set NCPUS_PER_NODE = 128 endif +else if( $SITE == 'AWS' ) then + + # Because we do not know the name of the model or the number of CPUs + # per node. We ask the user to set these variables in the script + + # AWS users must set the MODEL and NCPUS_PER_NODE + set MODEL = USER_MUST_SET + set NCPUS_PER_NODE = USER_MUST_SET + + # Above we need a user to set the MODEL and NCPUS_PER_NODE + # variables. Here we check that they have been set. If not, + # we ask the user to set them + # -------------------------------------------------------- + + if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then + echo "ERROR: We have detected you are on AWS. As we do not have" + echo " official nodes yet, we ask you to edit $0" + echo " and set the MODEL and NCPUS_PER_NODE variables" + echo " in the script $0." + echo " Look for the section that says:" + echo " " + echo " # AWS users must set the MODEL and NCPUS_PER_NODE" + exit 1 + endif + else set MODEL = 'UNKNOWN' + # As we do not know how many CPUs per node, we detect the number + # of CPUs per node by looking at the number of CPUs. This is different + # on Linux and macOS + if ( $ARCH == 'Linux' ) then + set NCPUS_PER_NODE = `grep -c ^processor /proc/cpuinfo` + else if ( $ARCH == 'Darwin' ) then + set NCPUS_PER_NODE = `sysctl -n hw.ncpu` + else + echo "ERROR: Unknown architecture $ARCH" + exit 1 + endif endif ####################################################################### @@ -1634,29 +1650,29 @@ else if( $SITE == 'NCCS' ) then setenv COUPLEDIR /discover/nobackup/projects/gmao/ssd/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/GWD_RIDGE # Location of GWD_RIDGE files else if( $SITE == 'AWS' ) then - setenv BATCH_CMD "sbatch" # SLURM Batch command - setenv BATCH_GROUP DELETE # SLURM Syntax for account name - setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime - setenv BATCH_JOBNAME "SBATCH --job-name=" # SLURM Syntax for job name - setenv BATCH_OUTPUTNAME "SBATCH --output=" # SLURM Syntax for job output name - setenv BATCH_JOINOUTERR "DELETE" # SLURM joins out and err by default - setenv RUN_FT "06:00:00" # Wallclock Time for gcm_forecast.j - setenv RUN_T "12:00:00" # Wallclock Time for gcm_run.j - setenv POST_T "8:00:00" # Wallclock Time for gcm_post.j - setenv PLOT_T "12:00:00" # Wallclock Time for gcm_plot.j - setenv ARCHIVE_T "1:00:00" # Wallclock Time for gcm_archive.j - setenv RUN_Q DELETE # batch queue name for gcm_run.j - setenv RUN_P "SBATCH --ntasks=${MODEL_NPES}" # PE Configuration for gcm_run.j - setenv RUN_FP "SBATCH --ntasks=${MODEL_NPES}" # PE Configuration for gcm_forecast.j - setenv POST_Q NULL # batch queue name for gcm_post.j - setenv PLOT_Q NULL # batch queue name for gcm_plot.j - setenv MOVE_Q NULL # batch queue name for gcm_moveplot.j - setenv ARCHIVE_Q NULL # batch queue name for gcm_archive.j - setenv POST_P "SBATCH --ntasks=${POST_NPES}" # PE Configuration for gcm_post.j - setenv PLOT_P "SBATCH --nodes=4 --ntasks=4" # PE Configuration for gcm_plot.j - setenv ARCHIVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_archive.j - setenv CONVERT_P "SBATCH --ntasks=${CNV_NPES}" # PE Configuration for gcm_convert.j - setenv MOVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_moveplot.j + setenv BATCH_CMD "sbatch" # SLURM Batch command + setenv BATCH_GROUP DELETE # SLURM Syntax for account name + setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime + setenv BATCH_JOBNAME "SBATCH --job-name=" # SLURM Syntax for job name + setenv BATCH_OUTPUTNAME "SBATCH --output=" # SLURM Syntax for job output name + setenv BATCH_JOINOUTERR "DELETE" # SLURM joins out and err by default + setenv RUN_FT "06:00:00" # Wallclock Time for gcm_forecast.j + setenv RUN_T "12:00:00" # Wallclock Time for gcm_run.j + setenv POST_T "8:00:00" # Wallclock Time for gcm_post.j + setenv PLOT_T "12:00:00" # Wallclock Time for gcm_plot.j + setenv ARCHIVE_T "1:00:00" # Wallclock Time for gcm_archive.j + setenv RUN_Q "SBATCH --constraint=${MODEL}" # batch queue name for gcm_run.j + setenv RUN_P "SBATCH --nodes=${NODES} --ntasks-per-node=${NCPUS_PER_NODE}" # PE Configuration for gcm_run.j + setenv RUN_FP "SBATCH --nodes=${NODES} --ntasks-per-node=${NCPUS_PER_NODE}" # PE Configuration for gcm_forecast.j + setenv POST_Q NULL # batch queue name for gcm_post.j + setenv PLOT_Q NULL # batch queue name for gcm_plot.j + setenv MOVE_Q NULL # batch queue name for gcm_moveplot.j + setenv ARCHIVE_Q NULL # batch queue name for gcm_archive.j + setenv POST_P "SBATCH --ntasks=${POST_NPES}" # PE Configuration for gcm_post.j + setenv PLOT_P "SBATCH --nodes=4 --ntasks=4" # PE Configuration for gcm_plot.j + setenv ARCHIVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_archive.j + setenv CONVERT_P "SBATCH --ntasks=${CNV_NPES}" # PE Configuration for gcm_convert.j + setenv MOVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_moveplot.j setenv BCSDIR /ford1/share/gmao_SIteam/ModelData/bcs/${LSM_BCS}/${LSM_BCS}_${OCEAN_TAG} # location of Boundary Conditions setenv REPLAY_ANA_EXPID REPLAY_UNSUPPORTED # Default Analysis Experiment for REPLAY @@ -1669,11 +1685,6 @@ else if( $SITE == 'AWS' ) then setenv COUPLEDIR /ford1/share/gmao_SIteam/ModelData/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /ford1/share/gmao_SIteam/ModelData/GWD_RIDGE # Location of GWD_RIDGE files - # By default on AWS, just ignore IOSERVER for now until testing - set USE_IOSERVER = 0 - set NUM_OSERVER_NODES = 0 - set NUM_BACKEND_PES = 0 - set NCPUS_PER_NODE = 0 else # These are defaults for the desktop setenv BATCH_CMD "sbatch" # SLURM Batch command @@ -1718,7 +1729,6 @@ else set USE_IOSERVER = 0 set NUM_OSERVER_NODES = 0 set NUM_BACKEND_PES = 0 - set NCPUS_PER_NODE = 0 endif ####################################################################### From 95f4cafdb7e08b55945045e3546e79e94bb4aeb9 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 16 May 2023 09:55:22 -0400 Subject: [PATCH 2/4] Don't forget Azure --- gcm_setup | 12 +++++----- geoschemchem_setup | 58 +++++++++++++++++++++++----------------------- gmichem_setup | 12 +++++----- stratchem_setup | 12 +++++----- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/gcm_setup b/gcm_setup index e7e45490..ee14e6e1 100755 --- a/gcm_setup +++ b/gcm_setup @@ -452,12 +452,12 @@ else if ( $SITE == 'NAS' ) then set NCPUS_PER_NODE = 128 endif -else if( $SITE == 'AWS' ) then +else if( $SITE == 'AWS' | $SITE == 'Azure' ) then # Because we do not know the name of the model or the number of CPUs # per node. We ask the user to set these variables in the script - # AWS users must set the MODEL and NCPUS_PER_NODE + # AWS and Azure users must set the MODEL and NCPUS_PER_NODE set MODEL = USER_MUST_SET set NCPUS_PER_NODE = USER_MUST_SET @@ -467,13 +467,13 @@ else if( $SITE == 'AWS' ) then # -------------------------------------------------------- if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then - echo "ERROR: We have detected you are on AWS. As we do not have" - echo " official nodes yet, we ask you to edit $0" + echo "ERROR: We have detected you are on $SITE. As we do not have" + echo " official fixed node info yet, we ask you to edit $0" echo " and set the MODEL and NCPUS_PER_NODE variables" echo " in the script $0." echo " Look for the section that says:" echo " " - echo " # AWS users must set the MODEL and NCPUS_PER_NODE" + echo " # AWS and Azure users must set the MODEL and NCPUS_PER_NODE" exit 1 endif @@ -1634,7 +1634,7 @@ else if( $SITE == 'NCCS' ) then setenv WRKDIR /discover/nobackup/$LOGNAME # user work directory setenv COUPLEDIR /discover/nobackup/projects/gmao/ssd/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/GWD_RIDGE # Location of GWD_RIDGE files -else if( $SITE == 'AWS' ) then +else if( $SITE == 'AWS' | $SITE == 'Azure' ) then setenv BATCH_CMD "sbatch" # SLURM Batch command setenv BATCH_GROUP DELETE # SLURM Syntax for account name setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime diff --git a/geoschemchem_setup b/geoschemchem_setup index e8558fec..e8558f66 100755 --- a/geoschemchem_setup +++ b/geoschemchem_setup @@ -452,12 +452,12 @@ else if ( $SITE == 'NAS' ) then set NCPUS_PER_NODE = 128 endif -else if( $SITE == 'AWS' ) then +else if( $SITE == 'AWS' | $SITE == 'Azure' ) then # Because we do not know the name of the model or the number of CPUs # per node. We ask the user to set these variables in the script - # AWS users must set the MODEL and NCPUS_PER_NODE + # AWS and Azure users must set the MODEL and NCPUS_PER_NODE set MODEL = USER_MUST_SET set NCPUS_PER_NODE = USER_MUST_SET @@ -467,13 +467,13 @@ else if( $SITE == 'AWS' ) then # -------------------------------------------------------- if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then - echo "ERROR: We have detected you are on AWS. As we do not have" - echo " official nodes yet, we ask you to edit $0" + echo "ERROR: We have detected you are on $SITE. As we do not have" + echo " official fixed node info yet, we ask you to edit $0" echo " and set the MODEL and NCPUS_PER_NODE variables" echo " in the script $0." echo " Look for the section that says:" echo " " - echo " # AWS users must set the MODEL and NCPUS_PER_NODE" + echo " # AWS and Azure users must set the MODEL and NCPUS_PER_NODE" exit 1 endif @@ -1664,30 +1664,30 @@ else if( $SITE == 'NCCS' ) then setenv WRKDIR /discover/nobackup/$LOGNAME # user work directory setenv COUPLEDIR /discover/nobackup/projects/gmao/ssd/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/GWD_RIDGE # Location of GWD_RIDGE files -else if( $SITE == 'AWS' ) then - setenv BATCH_CMD "sbatch" # SLURM Batch command - setenv BATCH_GROUP DELETE # SLURM Syntax for account name - setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime - setenv BATCH_JOBNAME "SBATCH --job-name=" # SLURM Syntax for job name - setenv BATCH_OUTPUTNAME "SBATCH --output=" # SLURM Syntax for job output name - setenv BATCH_JOINOUTERR "DELETE" # SLURM joins out and err by default - setenv RUN_FT "06:00:00" # Wallclock Time for gcm_forecast.j - setenv RUN_T "12:00:00" # Wallclock Time for gcm_run.j - setenv POST_T "8:00:00" # Wallclock Time for gcm_post.j - setenv PLOT_T "12:00:00" # Wallclock Time for gcm_plot.j - setenv ARCHIVE_T "1:00:00" # Wallclock Time for gcm_archive.j - setenv RUN_Q DELETE # batch queue name for gcm_run.j - setenv RUN_P "SBATCH --ntasks=${MODEL_NPES}" # PE Configuration for gcm_run.j - setenv RUN_FP "SBATCH --ntasks=${MODEL_NPES}" # PE Configuration for gcm_forecast.j - setenv POST_Q NULL # batch queue name for gcm_post.j - setenv PLOT_Q NULL # batch queue name for gcm_plot.j - setenv MOVE_Q NULL # batch queue name for gcm_moveplot.j - setenv ARCHIVE_Q NULL # batch queue name for gcm_archive.j - setenv POST_P "SBATCH --ntasks=${POST_NPES}" # PE Configuration for gcm_post.j - setenv PLOT_P "SBATCH --nodes=4 --ntasks=4" # PE Configuration for gcm_plot.j - setenv ARCHIVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_archive.j - setenv CONVERT_P "SBATCH --ntasks=${CNV_NPES}" # PE Configuration for gcm_convert.j - setenv MOVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_moveplot.j +else if( $SITE == 'AWS' | $SITE == 'Azure' ) then + setenv BATCH_CMD "sbatch" # SLURM Batch command + setenv BATCH_GROUP DELETE # SLURM Syntax for account name + setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime + setenv BATCH_JOBNAME "SBATCH --job-name=" # SLURM Syntax for job name + setenv BATCH_OUTPUTNAME "SBATCH --output=" # SLURM Syntax for job output name + setenv BATCH_JOINOUTERR "DELETE" # SLURM joins out and err by default + setenv RUN_FT "06:00:00" # Wallclock Time for gcm_forecast.j + setenv RUN_T "12:00:00" # Wallclock Time for gcm_run.j + setenv POST_T "8:00:00" # Wallclock Time for gcm_post.j + setenv PLOT_T "12:00:00" # Wallclock Time for gcm_plot.j + setenv ARCHIVE_T "1:00:00" # Wallclock Time for gcm_archive.j + setenv RUN_Q "SBATCH --constraint=${MODEL}" # batch queue name for gcm_run.j + setenv RUN_P "SBATCH --nodes=${NODES} --ntasks-per-node=${NCPUS_PER_NODE}" # PE Configuration for gcm_run.j + setenv RUN_FP "SBATCH --nodes=${NODES} --ntasks-per-node=${NCPUS_PER_NODE}" # PE Configuration for gcm_forecast.j + setenv POST_Q NULL # batch queue name for gcm_post.j + setenv PLOT_Q NULL # batch queue name for gcm_plot.j + setenv MOVE_Q NULL # batch queue name for gcm_moveplot.j + setenv ARCHIVE_Q NULL # batch queue name for gcm_archive.j + setenv POST_P "SBATCH --ntasks=${POST_NPES}" # PE Configuration for gcm_post.j + setenv PLOT_P "SBATCH --nodes=4 --ntasks=4" # PE Configuration for gcm_plot.j + setenv ARCHIVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_archive.j + setenv CONVERT_P "SBATCH --ntasks=${CNV_NPES}" # PE Configuration for gcm_convert.j + setenv MOVE_P "SBATCH --ntasks=1" # PE Configuration for gcm_moveplot.j setenv BCSDIR /ford1/share/gmao_SIteam/ModelData/bcs/${LSM_BCS}/${LSM_BCS}_${OCEAN_TAG} # location of Boundary Conditions setenv REPLAY_ANA_EXPID REPLAY_UNSUPPORTED # Default Analysis Experiment for REPLAY diff --git a/gmichem_setup b/gmichem_setup index 802cafb5..096cc1c9 100755 --- a/gmichem_setup +++ b/gmichem_setup @@ -452,12 +452,12 @@ else if ( $SITE == 'NAS' ) then set NCPUS_PER_NODE = 128 endif -else if( $SITE == 'AWS' ) then +else if( $SITE == 'AWS' | $SITE == 'Azure' ) then # Because we do not know the name of the model or the number of CPUs # per node. We ask the user to set these variables in the script - # AWS users must set the MODEL and NCPUS_PER_NODE + # AWS and Azure users must set the MODEL and NCPUS_PER_NODE set MODEL = USER_MUST_SET set NCPUS_PER_NODE = USER_MUST_SET @@ -467,13 +467,13 @@ else if( $SITE == 'AWS' ) then # -------------------------------------------------------- if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then - echo "ERROR: We have detected you are on AWS. As we do not have" - echo " official nodes yet, we ask you to edit $0" + echo "ERROR: We have detected you are on $SITE. As we do not have" + echo " official fixed node info yet, we ask you to edit $0" echo " and set the MODEL and NCPUS_PER_NODE variables" echo " in the script $0." echo " Look for the section that says:" echo " " - echo " # AWS users must set the MODEL and NCPUS_PER_NODE" + echo " # AWS and Azure users must set the MODEL and NCPUS_PER_NODE" exit 1 endif @@ -1826,7 +1826,7 @@ else if( $SITE == 'NCCS' ) then setenv WRKDIR /discover/nobackup/$LOGNAME # user work directory setenv COUPLEDIR /discover/nobackup/projects/gmao/ssd/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/GWD_RIDGE # Location of GWD_RIDGE files -else if( $SITE == 'AWS' ) then +else if( $SITE == 'AWS' | $SITE == 'Azure' ) then setenv BATCH_CMD "sbatch" # SLURM Batch command setenv BATCH_GROUP DELETE # SLURM Syntax for account name setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime diff --git a/stratchem_setup b/stratchem_setup index 41bbe62f..137dd9ac 100755 --- a/stratchem_setup +++ b/stratchem_setup @@ -452,12 +452,12 @@ else if ( $SITE == 'NAS' ) then set NCPUS_PER_NODE = 128 endif -else if( $SITE == 'AWS' ) then +else if( $SITE == 'AWS' | $SITE == 'Azure' ) then # Because we do not know the name of the model or the number of CPUs # per node. We ask the user to set these variables in the script - # AWS users must set the MODEL and NCPUS_PER_NODE + # AWS and Azure users must set the MODEL and NCPUS_PER_NODE set MODEL = USER_MUST_SET set NCPUS_PER_NODE = USER_MUST_SET @@ -467,13 +467,13 @@ else if( $SITE == 'AWS' ) then # -------------------------------------------------------- if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then - echo "ERROR: We have detected you are on AWS. As we do not have" - echo " official nodes yet, we ask you to edit $0" + echo "ERROR: We have detected you are on $SITE. As we do not have" + echo " official fixed node info yet, we ask you to edit $0" echo " and set the MODEL and NCPUS_PER_NODE variables" echo " in the script $0." echo " Look for the section that says:" echo " " - echo " # AWS users must set the MODEL and NCPUS_PER_NODE" + echo " # AWS and Azure users must set the MODEL and NCPUS_PER_NODE" exit 1 endif @@ -1649,7 +1649,7 @@ else if( $SITE == 'NCCS' ) then setenv WRKDIR /discover/nobackup/$LOGNAME # user work directory setenv COUPLEDIR /discover/nobackup/projects/gmao/ssd/aogcm # Coupled Ocean/Atmos Forcing setenv GWDRSDIR /discover/nobackup/projects/gmao/osse2/stage/BCS_FILES/GWD_RIDGE # Location of GWD_RIDGE files -else if( $SITE == 'AWS' ) then +else if( $SITE == 'AWS' | $SITE == 'Azure' ) then setenv BATCH_CMD "sbatch" # SLURM Batch command setenv BATCH_GROUP DELETE # SLURM Syntax for account name setenv BATCH_TIME "SBATCH --time=" # SLURM Syntax for walltime From 1a2e5d0647f582d2d086d034d060d089c111c880 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 16 May 2023 10:00:18 -0400 Subject: [PATCH 3/4] Remove redundancies --- gcm_setup | 3 +-- geoschemchem_setup | 3 +-- gmichem_setup | 3 +-- stratchem_setup | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gcm_setup b/gcm_setup index ee14e6e1..a30b88ec 100755 --- a/gcm_setup +++ b/gcm_setup @@ -469,8 +469,7 @@ else if( $SITE == 'AWS' | $SITE == 'Azure' ) then if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then echo "ERROR: We have detected you are on $SITE. As we do not have" echo " official fixed node info yet, we ask you to edit $0" - echo " and set the MODEL and NCPUS_PER_NODE variables" - echo " in the script $0." + echo " and set the MODEL and NCPUS_PER_NODE variables." echo " Look for the section that says:" echo " " echo " # AWS and Azure users must set the MODEL and NCPUS_PER_NODE" diff --git a/geoschemchem_setup b/geoschemchem_setup index e8558f66..7eec1f46 100755 --- a/geoschemchem_setup +++ b/geoschemchem_setup @@ -469,8 +469,7 @@ else if( $SITE == 'AWS' | $SITE == 'Azure' ) then if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then echo "ERROR: We have detected you are on $SITE. As we do not have" echo " official fixed node info yet, we ask you to edit $0" - echo " and set the MODEL and NCPUS_PER_NODE variables" - echo " in the script $0." + echo " and set the MODEL and NCPUS_PER_NODE variables." echo " Look for the section that says:" echo " " echo " # AWS and Azure users must set the MODEL and NCPUS_PER_NODE" diff --git a/gmichem_setup b/gmichem_setup index 096cc1c9..f3a48cb5 100755 --- a/gmichem_setup +++ b/gmichem_setup @@ -469,8 +469,7 @@ else if( $SITE == 'AWS' | $SITE == 'Azure' ) then if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then echo "ERROR: We have detected you are on $SITE. As we do not have" echo " official fixed node info yet, we ask you to edit $0" - echo " and set the MODEL and NCPUS_PER_NODE variables" - echo " in the script $0." + echo " and set the MODEL and NCPUS_PER_NODE variables." echo " Look for the section that says:" echo " " echo " # AWS and Azure users must set the MODEL and NCPUS_PER_NODE" diff --git a/stratchem_setup b/stratchem_setup index 137dd9ac..1cc00fa6 100755 --- a/stratchem_setup +++ b/stratchem_setup @@ -469,8 +469,7 @@ else if( $SITE == 'AWS' | $SITE == 'Azure' ) then if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then echo "ERROR: We have detected you are on $SITE. As we do not have" echo " official fixed node info yet, we ask you to edit $0" - echo " and set the MODEL and NCPUS_PER_NODE variables" - echo " in the script $0." + echo " and set the MODEL and NCPUS_PER_NODE variables." echo " Look for the section that says:" echo " " echo " # AWS and Azure users must set the MODEL and NCPUS_PER_NODE" From 4f4afcb65f5b0bf0ab657b3a1b350e60746e4b4d Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 16 May 2023 10:41:06 -0400 Subject: [PATCH 4/4] Fix tcsh bug --- gcm_setup | 12 +++++------- geoschemchem_setup | 12 +++++------- gmichem_setup | 16 +++++++--------- stratchem_setup | 14 ++++++-------- 4 files changed, 23 insertions(+), 31 deletions(-) diff --git a/gcm_setup b/gcm_setup index a30b88ec..84fa8da6 100755 --- a/gcm_setup +++ b/gcm_setup @@ -423,8 +423,6 @@ else if ( $SITE == 'NAS' ) then $MODEL != 'cas' & \ $MODEL != 'rom' ) goto ASKPROC - endif - # Some processors have weird names at NAS # --------------------------------------- @@ -463,9 +461,9 @@ else if( $SITE == 'AWS' | $SITE == 'Azure' ) then # Above we need a user to set the MODEL and NCPUS_PER_NODE # variables. Here we check that they have been set. If not, - # we ask the user to set them + # we ask the user to set them # -------------------------------------------------------- - + if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then echo "ERROR: We have detected you are on $SITE. As we do not have" echo " official fixed node info yet, we ask you to edit $0" @@ -1199,17 +1197,17 @@ set JOB_SGMT = "$JOB_SGMT 000000" set BACM_1M_ = "#" if ( "$CLDMICRO" == "BACM_1M" ) then - set BACM_1M_ = "" + set BACM_1M_ = "" endif set GFDL_1M_ = "#" if ( "$CLDMICRO" == "GFDL_1M" ) then - set GFDL_1M_ = "" + set GFDL_1M_ = "" endif set MGB2_2M_ = "#" if ( "$CLDMICRO" == "MGB2_2M" ) then - set MGB2_2M_ = "" + set MGB2_2M_ = "" endif set GFDL_HYDRO = ".TRUE." diff --git a/geoschemchem_setup b/geoschemchem_setup index 7eec1f46..4a2e813a 100755 --- a/geoschemchem_setup +++ b/geoschemchem_setup @@ -423,8 +423,6 @@ else if ( $SITE == 'NAS' ) then $MODEL != 'cas' & \ $MODEL != 'rom' ) goto ASKPROC - endif - # Some processors have weird names at NAS # --------------------------------------- @@ -463,9 +461,9 @@ else if( $SITE == 'AWS' | $SITE == 'Azure' ) then # Above we need a user to set the MODEL and NCPUS_PER_NODE # variables. Here we check that they have been set. If not, - # we ask the user to set them + # we ask the user to set them # -------------------------------------------------------- - + if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then echo "ERROR: We have detected you are on $SITE. As we do not have" echo " official fixed node info yet, we ask you to edit $0" @@ -1214,17 +1212,17 @@ set JOB_SGMT = "$JOB_SGMT 000000" set BACM_1M_ = "#" if ( "$CLDMICRO" == "BACM_1M" ) then - set BACM_1M_ = "" + set BACM_1M_ = "" endif set GFDL_1M_ = "#" if ( "$CLDMICRO" == "GFDL_1M" ) then - set GFDL_1M_ = "" + set GFDL_1M_ = "" endif set MGB2_2M_ = "#" if ( "$CLDMICRO" == "MGB2_2M" ) then - set MGB2_2M_ = "" + set MGB2_2M_ = "" endif set GFDL_HYDRO = ".TRUE." diff --git a/gmichem_setup b/gmichem_setup index f3a48cb5..932a6fe3 100755 --- a/gmichem_setup +++ b/gmichem_setup @@ -423,8 +423,6 @@ else if ( $SITE == 'NAS' ) then $MODEL != 'cas' & \ $MODEL != 'rom' ) goto ASKPROC - endif - # Some processors have weird names at NAS # --------------------------------------- @@ -463,9 +461,9 @@ else if( $SITE == 'AWS' | $SITE == 'Azure' ) then # Above we need a user to set the MODEL and NCPUS_PER_NODE # variables. Here we check that they have been set. If not, - # we ask the user to set them + # we ask the user to set them # -------------------------------------------------------- - + if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then echo "ERROR: We have detected you are on $SITE. As we do not have" echo " official fixed node info yet, we ask you to edit $0" @@ -1239,7 +1237,7 @@ if( $AGCM_IM == "c1536" ) then set GMICHEM_DT = `expr $DT \* 2` set AGCM_IM = 1536 set AGCM_JM = `expr $AGCM_IM \* 6` - set NX = 96 + set NX = 96 set NY = `expr $NX \* 6` set HYDROSTATIC = $USE_HYDROSTATIC set HIST_IM = `expr $AGCM_IM \* 4` @@ -1311,17 +1309,17 @@ set JOB_SGMT = "$JOB_SGMT 000000" set BACM_1M_ = "#" if ( "$CLDMICRO" == "BACM_1M" ) then - set BACM_1M_ = "" + set BACM_1M_ = "" endif set GFDL_1M_ = "#" if ( "$CLDMICRO" == "GFDL_1M" ) then - set GFDL_1M_ = "" + set GFDL_1M_ = "" endif set MGB2_2M_ = "#" if ( "$CLDMICRO" == "MGB2_2M" ) then - set MGB2_2M_ = "" + set MGB2_2M_ = "" endif set GFDL_HYDRO = ".TRUE." @@ -2893,7 +2891,7 @@ if( $LGOCART2G == TRUE ) then -e '/ACTIVE_INSTANCES_CA:/ s/CA.oc /CA.oc.data /' \ -e '/ACTIVE_INSTANCES_CA:/ s/CA.bc /CA.bc.data /' \ -e '/ACTIVE_INSTANCES_CA:/ s/CA.br /CA.br.data /' > $EXPDIR/RC/GOCART2G_GridComp.rc - endif + endif /bin/mv $EXPDIR/RC/GEOS_ChemGridComp.rc $EXPDIR/RC/GEOS_ChemGridComp.tmp cat $EXPDIR/RC/GEOS_ChemGridComp.tmp | \ diff --git a/stratchem_setup b/stratchem_setup index 1cc00fa6..a8b86cca 100755 --- a/stratchem_setup +++ b/stratchem_setup @@ -423,8 +423,6 @@ else if ( $SITE == 'NAS' ) then $MODEL != 'cas' & \ $MODEL != 'rom' ) goto ASKPROC - endif - # Some processors have weird names at NAS # --------------------------------------- @@ -463,9 +461,9 @@ else if( $SITE == 'AWS' | $SITE == 'Azure' ) then # Above we need a user to set the MODEL and NCPUS_PER_NODE # variables. Here we check that they have been set. If not, - # we ask the user to set them + # we ask the user to set them # -------------------------------------------------------- - + if ( $MODEL == USER_MUST_SET | $NCPUS_PER_NODE == USER_MUST_SET ) then echo "ERROR: We have detected you are on $SITE. As we do not have" echo " official fixed node info yet, we ask you to edit $0" @@ -1142,7 +1140,7 @@ if( $AGCM_IM == "c1536" ) then set SC_SPLIT = 1 set AGCM_IM = 1536 set AGCM_JM = `expr $AGCM_IM \* 6` - set NX = 96 + set NX = 96 set NY = `expr $NX \* 6` set HYDROSTATIC = $USE_HYDROSTATIC set HIST_IM = `expr $AGCM_IM \* 4` @@ -1214,17 +1212,17 @@ set JOB_SGMT = "$JOB_SGMT 000000" set BACM_1M_ = "#" if ( "$CLDMICRO" == "BACM_1M" ) then - set BACM_1M_ = "" + set BACM_1M_ = "" endif set GFDL_1M_ = "#" if ( "$CLDMICRO" == "GFDL_1M" ) then - set GFDL_1M_ = "" + set GFDL_1M_ = "" endif set MGB2_2M_ = "#" if ( "$CLDMICRO" == "MGB2_2M" ) then - set MGB2_2M_ = "" + set MGB2_2M_ = "" endif set GFDL_HYDRO = ".TRUE."