#!/bin/csh -f #=============================================================================== # GENERIC_USER # This is where the batch submission is set. The above code computes # the total number of tasks, nodes, and other things that can be useful # here. Use PBS, BSUB, or whatever the local environment supports. #=============================================================================== limit coredumpsize 1000000 limit stacksize unlimited # ---------------------------------------- # PE LAYOUT: # total number of tasks = 1 # maximum threads per task = 1 # cpl ntasks=1 nthreads=1 rootpe=0 # datm ntasks=1 nthreads=1 rootpe=0 # clm ntasks=1 nthreads=1 rootpe=0 # sice ntasks=1 nthreads=1 rootpe=0 # socn ntasks=1 nthreads=1 rootpe=0 # sglc ntasks=1 nthreads=1 rootpe=0 # # total number of hw pes = 1 # cpl hw pe range ~ from 0 to 0 # datm hw pe range ~ from 0 to 0 # clm hw pe range ~ from 0 to 0 # sice hw pe range ~ from 0 to 0 # socn hw pe range ~ from 0 to 0 # sglc hw pe range ~ from 0 to 0 # ---------------------------------------- #----------------------------------------------------------------------- # Determine necessary environment variables #----------------------------------------------------------------------- cd /usr/workdir/cesm1_0_2/scripts/test1 ./Tools/ccsm_check_lockedfiles || exit -1 source ./Tools/ccsm_getenv || exit -2 if ($BUILD_COMPLETE != "TRUE") then echo "BUILD_COMPLETE is not TRUE" echo "Please rebuild the model interactively via" echo " ./${CASE}.${MACH}.build" exit -2 endif setenv LBQUERY TRUE setenv LBSUBMIT TRUE #----------------------------------------------------------------------- # Determine time-stamp/file-ID string # Clean up previous run timing files #----------------------------------------------------------------------- setenv LID "`date +%y%m%d-%H%M%S`" env | egrep '(MP_|LOADL|XLS|FPE|DSM|OMP|MPC)' # document env vars # ------------------------------------------------------------------------- # Build the namelists and check prestage # ------------------------------------------------------------------------- cd $CASEROOT source $CASETOOLS/ccsm_buildnml.csh || exit -3 cd $CASEROOT source $CASETOOLS/ccsm_prestage.csh || exit -3 # ------------------------------------------------------------------------- # Create and cleanup the timing directories # ------------------------------------------------------------------------- if !(-d $RUNDIR/timing) mkdir $RUNDIR/timing if !(-d $RUNDIR/timing/checkpoints) mkdir $RUNDIR/timing/checkpoints rm -f $RUNDIR/timing/ccsm_timing* set sdate = `date +"%Y-%m-%d %H:%M:%S"` echo "run started $sdate" >>& $CASEROOT/CaseStatus # ------------------------------------------------------------------------- # Run the model # ------------------------------------------------------------------------- sleep 25 cd $RUNDIR echo "`date` -- CSM EXECUTION BEGINS HERE" #=============================================================================== # GENERIC_USER # Launch the job here. Some samples are commented out below #=============================================================================== setenv OMP_NUM_THREADS 1 #mpiexec ./ccsm.exe >&! ccsm.log.$LID mpirun ./ccsm.exe >&! ccsm.log.$LID wait echo "`date` -- CSM EXECUTION HAS FINISHED" cd $CASEROOT ./Tools/ccsm_postrun.csh || exit 1