# # Submit tiegcm1 job to PSC Compaq system lemieux. # Resources for PBS batch system: # #PBS -l walltime=1:00:00 #PBS -l rmsnodes=3:12 #PBS -j oe #PBS -m abe #PBS -M foster@ucar.edu # set JOB = tiegcm1 set EXEC = tiegcm1 #set EXECDIR = /usr/scratch/0/bfoster/$JOB.$$ set EXECDIR = /usr/scratch/0/bfoster/tiegcm1_5.0h set POSTCLEAN = 0 # # Data files are on PSC archive machine Cray j90 golem. # These will be copied to EXEC dir prior to execution. # set GOLEM = golem:/usr/users1/0/bfoster/$JOB set SOURCE = $GOLEM/ROBLE.tiegcm1.py93g18.nc set MAGVOL = $GOLEM/TGCM.data.magfield.nc # # Make and move to the EXECDIR directory: # if (-d $EXECDIR) then echo "Removing existing EXECDIR $EXECDIR" /usr/bin/rm -rf $EXECDIR endif mkdir -p $EXECDIR cd $EXECDIR # echo " " echo Begin $JOB job at `date` echo JOB = $JOB echo EXEC = $EXEC echo EXECDIR = $EXECDIR echo POSTCLEAN = $POSTCLEAN echo " " # cat << 'EOFINP' >! $JOB.inp INCLUDE /home/foster/tiegcm/tiegcm1/tiegcm1.inp 'EOFINP' # eval `/usr/local/Modules/$MODULE_VERSION/bin/modulecmd csh load netcdf` # # Copy data files from golem: # echo "Begin remote copy of $SOURCE to $EXECDIR at `date`" rcp $SOURCE $EXECDIR || echo ">>> Error from rcp of $SOURCE to $EXECDIR" echo "End remote copy of $SOURCE to $EXECDIR at `date`" # echo "Begin remote copy of $MAGVOL to $EXECDIR at `date`" rcp $MAGVOL $EXECDIR || echo ">>> Error from rcp of $MAGVOL to $EXECDIR" echo "End remote copy of $MAGVOL to $EXECDIR at `date`" # # Execute: # set err = 0 echo "Executing prun.." prun -N ${RMS_NODES} -n ${RMS_PROCS} -v -s -o ./$JOB.%.out -e ./$JOB.%.out \ ./$EXEC < ./$JOB.inp || set err = 1 if ($err == 0) then echo "Completed execution of $EXEC." else echo ">>> Error executing $EXEC." endif # # Save task0 output to golem: # if (-e $JOB.0.out) then set err = 0 rcp $JOB.0.out $GOLEM/$JOB.$$.out || err = 1 if ($err == 0) then echo "Copied task0 output to $GOLEM/$JOB.$$.out" else echo ">>> Error copying task0 output to $GOLEM/$JOB.$$.out" endif endif # # Clean up (remove execdir and its contents): # if ($POSTCLEAN == 1) then echo "Removing EXECDIR $EXECDIR." rm -rf $EXECDIR endif exit