[Dart-dev] DART/branches Revision: 13038
dart at ucar.edu
dart at ucar.edu
Wed Mar 20 13:55:53 MDT 2019
thoar at ucar.edu
2019-03-20 13:55:53 -0600 (Wed, 20 Mar 2019)
195
Added support for PBS directives and some instructions on both SLURM and PBS usage.
Since there is no support for invoking MPI exectuables, when running in batch mode
the -nompi flag is forced.
Modified: DART/branches/recam/developer_tests/test_dart.csh
===================================================================
--- DART/branches/recam/developer_tests/test_dart.csh 2019-03-20 19:28:33 UTC (rev 13037)
+++ DART/branches/recam/developer_tests/test_dart.csh 2019-03-20 19:55:53 UTC (rev 13038)
@@ -5,17 +5,42 @@
# http://www.image.ucar.edu/DAReS/DART/DART_download
#
# DART $Id$
-
-# this can be run from the command line, or submitted to
-# a batch system.
-
-#SBATCH -J slurmtest
+#
+# test_dart.csh can be run from the command line or a batch system.
+# This compiles many of the programs (but not all) and
+# runs a limited number of tests.
+#
+#>@todo FIXME ... implement some method to run mpi executables.
+#
+#==========================================================================
+# SLURM directives sbatch test_batch.csh
+#
+# sinfo information about the whole slurm system
+# squeue information about running jobs
+# sbatch submitting a job
+# scancel killing a job
+#
+#SBATCH --ignore-pbs
+#SBATCH --job-name dart_test
+#SBATCH --ntasks-per-node=1
+#SBATCH -t 2:00:00
#SBATCH -n 1
-#SBATCH --ntasks-per-node=1
-#SBATCH -t 2:30:00
#SBATCH -A P86850054
#SBATCH -p dav
-#SBATCH -o tcsh.log
+#SBATCH -o dart_test.log
+#SBATCH --mail-type=END
+#SBATCH --mail-type=FAIL
+#
+#==========================================================================
+# PBS directives qsub test_batch.csh
+#
+#PBS -N dart_test
+#PBS -l walltime=02:00:00
+#PBS -q share
+#PBS -l select=1:ncpus=1
+#PBS -A P86850054
+#PBS -j oe
+#PBS -m abe
set clobber
setenv MPIFLAG '-nompi'
@@ -35,11 +60,22 @@
endif
endif
+# Since this script does not launch the mpi executables with an mpirun etc.,
+# this whole script can only possibly test the serial implementation.
+# So - in batch mode, just force it to be nompi.
+#>@todo FIXME ... implement some method to run mpi executables.
+
+if ($?SLURM_JOB_ID) then
+ setenv MPIFLAG '-nompi'
+else if ($?PBS_NODEFILE) then
+ setenv MPIFLAG '-nompi'
+endif
+
# cd to the start of the DART directory
cd ..
if ( ! -d models ) then
- echo "models does not exist. $0 must be run from the developer_tests"
+ echo "models directory does not exist. $0 must be run from the developer_tests"
echo "directory -- please try again."
exit 2
else
@@ -57,11 +93,13 @@
if ( ! $?host) then
setenv host `uname -n`
endif
+echo "Running $0 on $host"
#----------------------------------------------------------------------
# Not all unix systems support the same subset of flags; try to figure
# out what system we are running on and adjust accordingly.
#----------------------------------------------------------------------
+
set OSTYPE = `uname -s`
switch ( ${OSTYPE} )
case IRIX64:
@@ -83,12 +121,6 @@
#----------------------------------------------------------------------
-echo "Running DART test on $host"
-
-#----------------------------------------------------------------------
-# Compile 'filter' for a wide range of models.
More information about the Dart-dev
mailing list