[Dart-dev] DART/branches Revision: 12185
dart at ucar.edu
dart at ucar.edu
Wed Dec 6 16:57:41 MST 2017
thoar at ucar.edu
2017-12-06 16:57:41 -0700 (Wed, 06 Dec 2017)
443
These scripts demonstrate slurm, PBS, and LSF - all in the same script.
That way we won't be stepping on each others setup when committing and
it will simplify testing.
The changes to model_mod.f90 reflect modifications needed to support
the WC12 case - namely the calendar in use is (for some reason)
'gregorian_proleptic' instead of just 'gregorian'.
Since we are only running after 1601-01-01 ... there is no
difference between the two.
Modified: DART/branches/rma_trunk/models/ROMS/model_mod.f90
===================================================================
--- DART/branches/rma_trunk/models/ROMS/model_mod.f90 2017-12-06 23:49:16 UTC (rev 12184)
+++ DART/branches/rma_trunk/models/ROMS/model_mod.f90 2017-12-06 23:57:41 UTC (rev 12185)
@@ -1097,15 +1097,21 @@
! assume gregorian calendar unless there's a calendar attribute saying elsewise
rc = nf90_get_att(ncid, VarID, 'calendar', calendarstring)
if (rc /= nf90_noerr) calendarstring = 'gregorian'
-if (present(calendar)) calendar = trim(calendarstring)
-if (trim(calendarstring) /= 'gregorian') then
+if (index(calendarstring,'gregorian') == 0) then
write(string1,*)'expecting '//trim(var_name)//' calendar of "gregorian"'
write(string2,*)'got '//trim(calendarstring)
+ write(string3,*)'from file "'//trim(filename)//'"'
call error_handler(E_MSG,'get_time_information:', string1, &
source, revision, revdate, text2=string2, text3=string3)
+else
+ ! coerce all forms of gregorian to the one DART supports
+ ! 'gregorian_proleptic' needs to be changed, for example.
+ calendarstring = 'gregorian'
endif
+if (present(calendar)) calendar = trim(calendarstring)
+
if (present(last_time) .or. present(origin_time) .or. present(all_times)) then
! May need to put the calendar back to some original value
@@ -1113,6 +1119,7 @@
! We need to set the calendar to interpret the time values
! do we need to preserve the original calendar setting if there is one?
+
call set_calendar_type( trim(calendarstring) )
! Make sure the calendar is expected form
Modified: DART/branches/rma_trunk/models/ROMS/shell_scripts/cycle.csh.template
===================================================================
--- DART/branches/rma_trunk/models/ROMS/shell_scripts/cycle.csh.template 2017-12-06 23:49:16 UTC (rev 12184)
+++ DART/branches/rma_trunk/models/ROMS/shell_scripts/cycle.csh.template 2017-12-06 23:57:41 UTC (rev 12185)
@@ -7,90 +7,51 @@
# $Id$
#
#=============================================================================
-# This block of directives constitutes the preamble for the LSF queuing system
#
-# the normal way to submit to the queue is: bsub < cycle.csh
#
-# an explanation of the most common directives follows:
-# -J Job_name
-# -o STDOUT_filename
-# -e STDERR_filename
-# -P account_code_number
-# -q queue cheapest == [standby, economy, (regular,debug), premium] == $$$$
-# -n number of MPI processes (not nodes)
-# -W hh:mm wallclock time (required on some systems)
-#=============================================================================
-#BSUB -J roms_cycle
-#BSUB -o roms_cycle.%J.log
-#BSUB -P P86850054
-#BSUB -q small
-#BSUB -n 16
-#BSUB -R "span[ptile=16]"
-#BSUB -W 1:00
-#BSUB -N -u ${USER}@ucar.edu
+#SBATCH --ignore-pbs
+#SBATCH -l nodes=1:ppn=16
+#SBATCH --ntasks=1
+#SBATCH --ntasks-per-node=16
+#SBATCH --time=00:01:00
+#SBATCH -A P86850054
+#SBATCH -p dav
+#SBATCH -e testslurm.%j.err
+#SBATCH -o testslurm.%j.out
+#SBATCH --mail-type=END
+#SBATCH --mail-type=FAIL
+#SBATCH --mail-user=$USER at ucar.edu
#
#=============================================================================
-# This block of directives constitutes the preamble for the PBS queuing system
-# Turns out SLURM (in particular 'sbatch') recognizes PBS directives, so we
-# don't need two sets of directives.
-# the normal way to submit with pbs: qsub cycle.csh
-# the normal way to submit with slurm: sbatch cycle.csh
#
-# an explanation of the most common directives follows:
-# -N Job name
-# -r n Declare job non-rerunable
-# -e <arg> filename for standard error
-# -o <arg> filename for standard out
-# -q <arg> Queue name (small, medium, long, verylong)
-# -l nodes=xx:ppn=2 requests BOTH processors on the node. On both bangkok
-# and calgary, there is no way to 'share' the processors
-# on the node with another job, so you might as well use
-# them both. (ppn == Processors Per Node)
-#=============================================================================
+#
#PBS -N roms_cycle
#PBS -e roms_cycle.err
#PBS -o roms_cycle.log
More information about the Dart-dev
mailing list