3c3,5 < # Job script to run "tiegcm1" on IBM system. --- > # Job script to run "tiegcm1". > # This script may be submitted to IBM (AIX), SGI (IRIX), or Sun workstation. > # Use the "submit" command (hao:/home/tgcm/bld/submit) to submit this job. 4a7,11 > # Resources for SGI (e.g., dataproc): > # QSUB -s /bin/csh > # QSUB -lT 60:00 # time limit > # QSUB -q ded_1 # ded_1 > # 7c14,15 < # 1. Set env vars below (JOB,EXEC,OUTPUT,REMOTE,POSTCLEAN) --- > # 1. If qsub job (e.g., SGI dataproc), set resources above. > # 2. Set env vars below (JOB,EXEC,OUTPUT,REMOTE,POSTCLEAN) 9,11c17,19 < # 2. Include namelist input file (see "$input" below) < # 3. Optionally change path to source and Makefile (see INCLUDEs below) < # 4. Set class (queue) for loadleveler (see "# @ class" below) --- > # 3. Include namelist input file (see "$input" below) > # 4. Optionally change path to source and Makefile (see INCLUDEs below) > # 5. If IBM job, set class (queue) for loadleveler (see "# @ class" below) 13c21,22 < # 5. Use the "submit" command (/home/tgcm/bld/submit) to submit the job. --- > # 6. Use the "submit" command (/home/tgcm/bld/submit) to submit the job. > # (if on Sun workstation, quit submit, then execute the saved .submit file) 24a34 > #setenv REMOTE ouray.hao:/home/roble/ntwk 26,29c36 < #setenv OUTPUT $JOB.$$.out < #setenv OUTPUT $JOB.apr02.base.d80-90.out < #setenv OUTPUT $JOB.apr02.base.d90-110.out < #setenv OUTPUT $JOB.apr02.base.d110-135.out --- > setenv OUTPUT $JOB.$$.out 31,33c38,40 < #setenv OUTPUT $JOB.apr02.gpi_gswm.d80-105.out < #setenv OUTPUT $JOB.apr02.gpi_gswm.d105-130.out < setenv OUTPUT $JOB.apr02.gpi_gswm.d130-135.out --- > #setenv REMOTE vishnu.hao:/e/foster/tiegcm1 > #setenv OUTPUT tiegcm1_1day.out > #setenv OUTPUT tiegcm1_30secstep.out 38c45 < # Determine operating system (AIX is only OS for this script): --- > # Determine operating system: 42c49,51 < if ($os =~ *'AIX'*) then --- > if ($os =~ *'IRIX'*) then > set os = IRIX > else if ($os =~ *'AIX'*) then 43a53,54 > else if ($os =~ *'SunOS'*) then > set os = SUN 54c65,71 < set tmpdir = /ptmp/$user/$JOB.$$ --- > if ($os == 'AIX') then > set tmpdir = /ptmp/$user/$JOB.$$ > else if ($os == 'IRIX') then > set tmpdir = /tmp/$user/$JOB.$$ > else # sun > set tmpdir = /e/$user/$JOB.$$ > endif 61c78 < echo "WARNING Error making tmpdir $tmpdir." --- > echo ">>> WARNING Error making tmpdir $tmpdir." 81d97 < echo "DATE = `date`" 91a108,109 > if ($OS == 'AIX') then > # 109d126 < # 115a133 > ## @ wall_clock_limit = 00:30:00 119d136 < # @ node = 8 121,123c138 < ## @ node = 2 < ## @ total_tasks = 8 < # @ node_usage = not_shared --- > # @ node = 8 141a157 > endif # make loadleveler script for AIX system 160a177,178 > # (use -ignore_dups if files names include dups of a previous INCLUDE, > # i.e., the source). 164,165c182,185 < INCLUDE -h /home/tgcm/bld/mklogs < #INCLUDE -h mklogs --- > INCLUDE modsrc.eqr/*.F > #INCLUDE modsrc.gpi/*.F > #INCLUDE -h -ignore_dups modsrc/*.F > #INCLUDE -h -ignore_dups modsrc.henry/*.F 167,168c187,190 < # Overlay mods (-ignore dups means these mods will override previously < # INCLUDEd files with the same names): --- > #INCLUDE -h -ignore_dups /e/foster/tiegcm1/modsrc/*.F > #INCLUDE -h /e/foster/tiegcm1/*.F /e/foster/tiegcm1/*.h > #INCLUDE -h /e/foster/tiegcm1/Makefile /e/foster/tiegcm1/mkdep > #INCLUDE -h -ignore_dups /e/foster/tiegcm1/modsrc.eq/*.F 170,171d191 < INCLUDE -h -ignore_dups modsrc/*.F < # 176c196 < INCLUDE apr02.inp --- > INCLUDE roble.inp 183c203,207 < gmake $EXEC >>& $OUTPUT || set err = 1 --- > if ($OS == 'SUN') then > gnumake $EXEC >>& $OUTPUT || set err = 1 > else > gmake $EXEC >>& $OUTPUT || set err = 1 > endif 187,188c211,212 < echo "Error from gnu make." >> $OUTPUT < exit $err --- > echo ">>> WARNING Error from gnu make." >> $OUTPUT > # exit $err 198c222 < echo ">>> Error executing $EXEC." >> $OUTPUT --- > echo ">>> WARNING Error executing $EXEC." >> $OUTPUT 213,214d236 < echo "cleanup: EXECDIR=$EXECDIR OUTPUT=$OUTPUT" < cd $EXECDIR 216,217c238 < chmod u+x mklogs < perl mklogs $OUTPUT || set err = 1 --- > mklogs $OUTPUT || set err = 1 219c240 < echo ">>> Error from mklogs -- will return full output $OUTPUT" >> $OUTPUT --- > echo ">>> WARNING Error from mklogs -- will return full output $OUTPUT" >> $OUTPUT 221c242 < cp *task0.out $OUTPUT --- > mv *task0.out $OUTPUT 229d249 < ls -l $OUTPUT >> $OUTPUT 234a255 > cd $EXECDIR 236,237c257 < rcp $OUTPUT $REMOTE >>& $OUTPUT || set err = 1 < #/usr/bsd/rcp $OUTPUT $REMOTE || set err = 1 --- > rcp $OUTPUT $REMOTE || set err = 1 241,243d260 < echo " Will save $OUTPUT to /home/$user" < cp $OUTPUT /home/$user || \ < echo ">>> WARNING: error copying $OUTPUT to /home/$user" 259c276,297 < llsubmit loadlev.job --- > # If AIX, submit to loadleveler: > # > if ($OS == 'AIX') then > llsubmit loadlev.job > # > # If Sun, assume no batch job, so execute exec.sh interactively in background > # and do not execute cleanup step. > # > else if ($OS == 'SUN') then > echo " " > echo "Executing on $OS system in directory $EXECDIR" > exec.csh & > # > # If not AIX or Sun (i.e., SGI), execute both exec.csh and cleanup.csh: > # (in this case, the "submit" command has submitted the job via qsub) > # > else > echo " " > echo "Executing on $OS system in directory $EXECDIR" > exec.csh > cleanup.csh > endif