#!/bin/tcsh -f # # This script was supplied by Lisa M. Perez at the Laboratory # for Molecular Simulation at Texas A&M University. # http://www.chem.tamu.edu/LMS # # .................................................................... # HELP ............................................................... # .................................................................... if ( $#argv == 0 ) goto help foreach i ( $* ) switch ($i) case -help : goto help endsw end # .................................................................... # PARAMETRAGE ....................................................... # .................................................................... set q = short set r = 0 set p = g03 @ ivar=0 foreach i ( $* ) @ ivar++ switch ($i) case -l set q=long breaksw case -g98 set p=g98 breaksw case -r set r=1 breaksw endsw end # .................................................................... # PREPARATION DES DONNEES ........................................... # .................................................................... set data=$argv[$#argv] if ( ! -e {$data}.com ) then echo The input file {$data}.com does not exist exit endif set olddir=$cwd echo "#! /bin/csh -f" > $data.job echo "#" >> $data.job echo '#PBS -q' $q >> $data.job echo '' >> $data.job if ( -e $HOME/.cshrc ) then echo 'source ' $HOME'/.cshrc' >> $data.job echo '' >> $data.job endif if ( -e $HOME/.tcshrc ) then echo 'source ' $HOME'/.tcshrc' >> $data.job echo '' >> $data.job endif echo 'cd $TMPDIR' >> $data.job echo '' >> $data.job echo 'cp' $olddir/{$data}.com $data >> $data.job if ($r == 0) then echo '( '$p' <' $data '> ' $olddir/{$data}.log ') >&' {$data}.err >> $data.job else echo '( '$p' <' $data '>> ' $olddir/{$data}.log ') >&' {$data}.err >> $data.job endif echo 'cat' {$data}.err '>> ' $olddir/{$data}.log >> $data.job echo 'exit' >> $data.job echo '' echo ' The job file' $data.job ' has been created for the queue ' $q chmod 700 $data.job qsub $data.job echo '' qstat echo '' exit #..................................................................... help: echo " " echo " This script was specifically set up for the NQS queueing system on labmolx.chem.tamu.edu " echo " " echo "Syntax : qprep [-l] [-g98] [-r] filename" echo " : Flags are typed without the brackets" echo " : e.g. qprep -l o2opt" echo " : this will submit the job o2opt.job to the long queue" echo " " echo " filename is the name of the input file (minus the suffix)" echo "" echo " The default program is g03" echo "" echo " The default queue is short " echo " " echo " The different Options that are available:" echo "" echo " -l : submits the job to the long queue " echo " : do not include %nproc in your input file" echo "" echo " -g98 : runs g98 instead of g03" echo " : you must also change your .cshrc file to reflect g98" echo "" echo " -r : appends the output to the old output file" echo " this option is for restart jobs" echo "" echo " To see the queue limits use the command qjobs -l" echo " " exit