[Dart-dev] DART/branches Revision: 12952
dart at ucar.edu
dart at ucar.edu
Mon Jan 7 14:31:22 MST 2019
thoar at ucar.edu
2019-01-07 14:31:22 -0700 (Mon, 07 Jan 2019)
387
Queries queueing variables to set environment-specific configuration instead
of hostname. Calling, but bypassing compress.csh because it is not finished yet.
I tested with DATA_ASSIMIATION_CYCLES=2 for when CONTINUE_RUN = .FALSE. and it
correctly advanced two cycles and CONTINUE_RUN = TRUE upon completion.
The subsequent assimilation failed in the 'cleanup' section of assimilate.csh
Modified: DART/branches/recam/models/cam-fv/shell_scripts/cesm2_1/assimilate.csh.template
===================================================================
--- DART/branches/recam/models/cam-fv/shell_scripts/cesm2_1/assimilate.csh.template 2019-01-04 22:52:42 UTC (rev 12951)
+++ DART/branches/recam/models/cam-fv/shell_scripts/cesm2_1/assimilate.csh.template 2019-01-07 21:31:22 UTC (rev 12952)
@@ -6,12 +6,68 @@
#
# DART $Id$
-# This script is designed to interface cesm2_0_beta05 or later
-# and $dart/rma_trunk v11###.
+# ---------------------
+# Purpose
+# ---------------------
+# This template is lightly modified by the setup scripts to be appropriate
+# for specific hardware and other configurations. The modified result is
+# then given execute permission and is appropriate to use for an assimilation.
+# All of this is automatically performed by the DART-supplied setup scripts.
+#
+# Tag DART's state output with names using CESM's convention:
+# ${case}.${scomp}[_$inst].${filetype}[.$dart_file].${date}.nc
+# These should all be named with $scomp = "cam" to distinguish
+# them from the same output from other components in multi-component assims.
-# See 'RMA' for places where there are questions about RMA,
-# especially file naming.
+# machine-specific dereferencing
+if ($?SLURM_JOB_ID) then
+ # SLURM environment variables:
+ # env | grep SLURM | sort
+
+ setenv ORIGINALDIR $SLURM_SUBMIT_DIR
+ setenv JOBNAME $SLURM_JOB_NAME
+ setenv JOBID $SLURM_JOBID
+ setenv MYQUEUE $SLURM_JOB_PARTITION
+ setenv NODENAMES $SLURM_NODELIST
+ setenv LAUNCHCMD "mpirun -np $SLURM_NTASKS -bind-to core"
+
+else if ($?PBS_NODEFILE) then
+
+ # PBS environment variables:
+ # env | grep PBS | sort
+
+ setenv ORIGINALDIR $PBS_O_WORKDIR
+ setenv JOBNAME $PBS_JOBNAME
+ setenv JOBID $PBS_JOBID
+ setenv MYQUEUE $PBS_O_QUEUE
+ setenv NUMCPUS $NCPUS
+ setenv NUMTASKS `cat $PBS_NODEFILE | wc -l`
+ setenv NUMNODES `uniq $PBS_NODEFILE | wc -l`
+ setenv MPIEXEC_MPT_DEBUG 0
+ setenv MP_DEBUG_NOTIMEOUT yes
+ setenv LAUNCHCMD mpiexec_mpt
+
+ echo "jobname : $JOBNAME"
+ echo "numcpus : $NUMCPUS"
+ echo "numtasks : $NUMTASKS"
+ echo "numnodes : $NUMNODES"
+
+else if ($?LSB_HOSTS) then
+
+ # LSF environment variables:
+ # env | grep LS | grep -v LS_COLORS | sort
+
+ setenv ORIGINALDIR $LS_SUBCWD
+ setenv JOBNAME $LSB_OUTPUTFILE:ar
+ setenv JOBID $LSB_JOBID
+ setenv MYQUEUE $LSB_QUEUE
+ setenv NODENAMES ${LSB_HOSTS}
+ setenv MP_DEBUG_NOTIMEOUT yes
+ setenv LAUNCHCMD mpirun.lsf
+
+endif
+
#=========================================================================
# Block 0: Set command environment
#=========================================================================
@@ -29,25 +85,19 @@
# "Fix" that here, so the rest of the script isn't confusing.
@ cycle = $2 + 1
-# Tag DART's state output with names using CESM's convention:
-# ${case}.${scomp}[_$inst].${filetype}[.$dart_file].${date}.nc
-# These should all be named with $scomp = "cam" to distinguish
-# them from the same output from other components in multi-component assims.
-set scomp = "cam"
-
-# In CESM1_4 xmlquery must be executed in $CASEROOT.
cd ${CASEROOT}
-setenv CASE `./xmlquery CASE --value`
-setenv ensemble_size `./xmlquery NINST_ATM --value`
-setenv CAM_DYCORE `./xmlquery CAM_DYCORE --value`
-setenv EXEROOT `./xmlquery EXEROOT --value`
-setenv RUNDIR `./xmlquery RUNDIR --value`
-setenv archive `./xmlquery DOUT_S_ROOT --value`
-setenv TOTALPES `./xmlquery TOTALPES --value`
-setenv CONT_RUN `./xmlquery CONTINUE_RUN --value`
-setenv DATA_ASSIMILATION_CYCLES `./xmlquery DATA_ASSIMILATION_CYCLES --value`
-setenv TASKS_PER_NODE `./xmlquery NTASKS_ESP --value`
+setenv scomp `./xmlquery COMP_ATM --value`
More information about the Dart-dev
mailing list