#--------------- gamess sample script -------- # Will work on any of the arches clusters # #PBS -S /bin/csh #PBS -l walltime=1:00:00,nodes=2:ppn=2 #PBS -N test # # DO NOT USE LOCAL (scratch local to nodes) on multi node runs # #SCRFLAG options are: # LOCAL for local drive on node # SERIAL for /scratch/serial # #directory ~$USER/scr needs to exist #make sure no *.dat and *.irc files for your current job name exist in ~$USER/scr # #Make sure NODES, PPN agree with the PBS -l line from above and make sure NCPUS=NODES*PPN # setenv WORKDIR $HOME/GAMESS/test setenv JOB exam40pn setenv SCRFLAG SERIAL setenv NODES 2 setenv PPN 2 set NCPUS=4 # # nothing should need changed below here to run # cd $WORKDIR # set TARGET=sockets setenv gmsroot /uufs/chpc.utah.edu/sys/pkg/GAMESS/std/gamess set VERNO=03 echo $NCPUS # cat $PBS_NODEFILE | uniq > $WORKDIR/gamess.hosts # if ("$SCRFLAG" == "LOCAL") then foreach HOST (`cat $WORKDIR/gamess.hosts`) set SCR=/scratch/local/$USER/$PBS_JOBID mkdir -p /scratch/local/$USER/$PBS_JOBID echo scratch made $HOST end endif # if ("$SCRFLAG" == "SERIAL") then set SCR=/scratch/serial/$USER/$PBS_JOBID mkdir -p /scratch/serial/$USER/$PBS_JOBID endif # # ---- the top third of the script is input and other file assignments ---- # set master=`hostname` echo This job is running on host $master echo under operating system `uname` at `date` echo "Available scratch disk space (Kbyte units) at beginning of the job is" df -k $SCR # copy over input file to scr space set echo cp $JOB.inp $SCR/$JOB.F05 unset echo # file assignments. # # All binary files should be put on a node's local disk ($SCR directory), # for the highest speed access possible. These .Fxx files are typically # not saved for the next run, but they may be big and/or I/O intensive. # # It is convenient to write both ASCII output files (PUNCH and IRCDATA) # by software such as NFS to the user's permanent disk, on your file # server. They are small. # # Some data files may be read by a run, each is read only once, so # that storage of one (1) copy on your file server is appropriate. # a. The ERICFMT file is the Fm(t) data for ERI computations and is provided # with GAMESS. It is essential for correct functioning of 2e- integrals. # b. The MCPPATH is just a path name, the program appends the specific # file names inside that path before opening. The model core potentials # and basis set files come as part of GAMESS's normal distribution tree. # c. The EXTBAS file is user-supplied basis sets. # d. see NEO plug-in code's documentation regarding the NUCBAS file. # Note that you must edit a+b, but will probably skip c+d. # set echo # ASCII input files (see explanation above) setenv ERICFMT /uufs/chpc.utah.edu/sys/pkg/GAMESS/std/gamess/ericfmt.dat setenv MCPPATH /uufs/chpc.utah.edu/sys/pkg/GAMESS/std/gamess/mcpdata setenv EXTBAS /dev/null setenv NUCBAS /dev/null # setenv IRCDATA ~$USER/scr/$JOB.irc setenv INPUT $SCR/$JOB.F05 setenv PUNCH ~$USER/scr/$JOB.dat setenv AOINTS $SCR/$JOB.F08 setenv MOINTS $SCR/$JOB.F09 setenv DICTNRY $SCR/$JOB.F10 setenv DRTFILE $SCR/$JOB.F11 setenv CIVECTR $SCR/$JOB.F12 setenv CASINTS $SCR/$JOB.F13 setenv CIINTS $SCR/$JOB.F14 setenv WORK15 $SCR/$JOB.F15 setenv WORK16 $SCR/$JOB.F16 setenv CSFSAVE $SCR/$JOB.F17 setenv FOCKDER $SCR/$JOB.F18 setenv WORK19 $SCR/$JOB.F19 setenv DASORT $SCR/$JOB.F20 setenv DFTINTS $SCR/$JOB.F21 setenv DFTGRID $SCR/$JOB.F22 setenv JKFILE $SCR/$JOB.F23 setenv ORDINT $SCR/$JOB.F24 setenv EFPIND $SCR/$JOB.F25 setenv PCMDATA $SCR/$JOB.F26 setenv PCMINTS $SCR/$JOB.F27 setenv SVPWRK1 $SCR/$JOB.F26 setenv SVPWRK2 $SCR/$JOB.F27 setenv MLTPL $SCR/$JOB.F28 setenv MLTPLT $SCR/$JOB.F29 setenv DAFL30 $SCR/$JOB.F30 setenv SOINTX $SCR/$JOB.F31 setenv SOINTY $SCR/$JOB.F32 setenv SOINTZ $SCR/$JOB.F33 setenv SORESC $SCR/$JOB.F34 setenv SIMEN ~$USER/scr/$JOB.simen setenv SIMCOR ~$USER/scr/$JOB.simcor setenv GCILIST $SCR/$JOB.F37 setenv HESSIAN $SCR/$JOB.F38 setenv SOCCDAT $SCR/$JOB.F40 setenv AABB41 $SCR/$JOB.F41 setenv BBAA42 $SCR/$JOB.F42 setenv BBBB43 $SCR/$JOB.F43 setenv MCQD50 $SCR/$JOB.F50 setenv MCQD51 $SCR/$JOB.F51 setenv MCQD52 $SCR/$JOB.F52 setenv MCQD53 $SCR/$JOB.F53 setenv MCQD54 $SCR/$JOB.F54 setenv MCQD55 $SCR/$JOB.F55 setenv MCQD56 $SCR/$JOB.F56 setenv MCQD57 $SCR/$JOB.F57 setenv MCQD58 $SCR/$JOB.F58 setenv MCQD59 $SCR/$JOB.F59 setenv MCQD60 $SCR/$JOB.F60 setenv MCQD61 $SCR/$JOB.F61 setenv MCQD62 $SCR/$JOB.F62 setenv MCQD63 $SCR/$JOB.F63 setenv MCQD64 $SCR/$JOB.F64 setenv NMRINT1 $SCR/$JOB.F61 setenv NMRINT2 $SCR/$JOB.F62 setenv NMRINT3 $SCR/$JOB.F63 setenv NMRINT4 $SCR/$JOB.F64 setenv NMRINT5 $SCR/$JOB.F65 setenv NMRINT6 $SCR/$JOB.F66 setenv DCPHFH2 $SCR/$JOB.F67 setenv DCPHF21 $SCR/$JOB.F68 setenv ELNUINT $SCR/$JOB.F67 setenv NUNUINT $SCR/$JOB.F68 setenv GVVPT $SCR/$JOB.F69 setenv FCIINF $SCR/$JOB.F90 setenv FCIINT $SCR/$JOB.F91 # next files are used only during coupled cluster runs, so let's # display the numerous definitions iff they are going to be used. unset echo set cctyp=`grep -i CCTYP= $SCR/$JOB.F05 | wc -l` if ($cctyp > 0) set echo setenv CCREST $SCR/$JOB.F70 setenv CCDIIS $SCR/$JOB.F71 setenv CCINTS $SCR/$JOB.F72 setenv CCT1AMP $SCR/$JOB.F73 setenv CCT2AMP $SCR/$JOB.F74 setenv CCT3AMP $SCR/$JOB.F75 setenv CCVM $SCR/$JOB.F76 setenv CCVE $SCR/$JOB.F77 setenv CCQUADS $SCR/$JOB.F78 setenv QUADSVO $SCR/$JOB.F79 setenv EOMSTAR $SCR/$JOB.F80 setenv EOMVEC1 $SCR/$JOB.F81 setenv EOMVEC2 $SCR/$JOB.F82 setenv EOMHC1 $SCR/$JOB.F83 setenv EOMHC2 $SCR/$JOB.F84 setenv EOMHHHH $SCR/$JOB.F85 setenv EOMPPPP $SCR/$JOB.F86 setenv EOMRAMP $SCR/$JOB.F87 setenv EOMRTMP $SCR/$JOB.F88 setenv EOMDG12 $SCR/$JOB.F89 setenv MMPP $SCR/$JOB.F90 setenv MMHPP $SCR/$JOB.F91 setenv MMCIVEC $SCR/$JOB.F92 setenv MMCIVC1 $SCR/$JOB.F93 setenv MMCIITR $SCR/$JOB.F94 setenv EOMVL1 $SCR/$JOB.F95 setenv EOMVL2 $SCR/$JOB.F96 setenv EOMLVEC $SCR/$JOB.F97 setenv EOMHL1 $SCR/$JOB.F98 setenv EOMHL2 $SCR/$JOB.F99 # # next files are used only during elongation method runs, so let's # display the numerous definitions iff they are going to be used. unset echo set elgtyp = `grep -i NELONG= $SCR/$JOB.F05 | wc -l` if ($elgtyp > 0) then set ELGNAME=$4 if (null$4 == null) set ELGNAME=ELGFILE set echo setenv AOINTS $SCR/$ELGNAME.F08 setenv ELGDOS ~$USER/scr/$JOB.ldos setenv ELGDAT $SCR/$ELGNAME.F71 setenv ELGPAR $SCR/$ELGNAME.F72 setenv ELGCUT $SCR/$ELGNAME.F74 setenv ELGVEC $SCR/$ELGNAME.F75 setenv EGINTA $SCR/$ELGNAME.F77 setenv EGINTB $SCR/$ELGNAME.F78 setenv EGTDHF $SCR/$ELGNAME.F79 setenv EGTEST $SCR/$ELGNAME.F80 unset echo endif # # next files are used only during extended TDHF package runs, so let's # display the numerous definitions iff they are going to be used. unset echo set txtyp=`grep -i RUNTYP=TDHFX $SCR/$JOB.F05 | wc -l` if ($txtyp > 0) set echo setenv OLI201 $SCR/$JOB.F201 setenv OLI202 $SCR/$JOB.F202 setenv OLI203 $SCR/$JOB.F203 setenv OLI204 $SCR/$JOB.F204 setenv OLI205 $SCR/$JOB.F205 setenv OLI206 $SCR/$JOB.F206 setenv OLI207 $SCR/$JOB.F207 setenv OLI208 $SCR/$JOB.F208 setenv OLI209 $SCR/$JOB.F209 setenv OLI210 $SCR/$JOB.F210 setenv OLI211 $SCR/$JOB.F211 setenv OLI212 $SCR/$JOB.F212 setenv OLI213 $SCR/$JOB.F213 setenv OLI214 $SCR/$JOB.F214 setenv OLI215 $SCR/$JOB.F215 setenv OLI216 $SCR/$JOB.F216 setenv OLI217 $SCR/$JOB.F217 setenv OLI218 $SCR/$JOB.F218 setenv OLI219 $SCR/$JOB.F219 setenv OLI220 $SCR/$JOB.F220 setenv OLI221 $SCR/$JOB.F221 setenv OLI222 $SCR/$JOB.F222 setenv OLI223 $SCR/$JOB.F223 setenv OLI224 $SCR/$JOB.F224 setenv OLI225 $SCR/$JOB.F225 setenv OLI226 $SCR/$JOB.F226 setenv OLI227 $SCR/$JOB.F227 setenv OLI228 $SCR/$JOB.F228 setenv OLI229 $SCR/$JOB.F229 setenv OLI230 $SCR/$JOB.F230 setenv OLI231 $SCR/$JOB.F231 setenv OLI232 $SCR/$JOB.F232 setenv OLI233 $SCR/$JOB.F233 setenv OLI234 $SCR/$JOB.F234 setenv OLI235 $SCR/$JOB.F235 setenv OLI236 $SCR/$JOB.F236 setenv OLI237 $SCR/$JOB.F237 setenv OLI238 $SCR/$JOB.F238 setenv OLI239 $SCR/$JOB.F239 setenv LHYPWRK $SCR/$JOB.F297 setenv LHYPWK2 $SCR/$JOB.F298 setenv BONDDPF $SCR/$JOB.F299 unset echo if ((-e $PUNCH) || (-e $IRCDATA)) then echo Please rename/erase $PUNCH and/or $IRCDATA, and resubmit exit 4 endif # ---- the middle third of the script is to execute GAMESS ---- # # Most workstations run DDI over TCP/IP sockets, and therefore execute # according to the following clause. The installer must # a) Set the path to point to the DDIKICK and GAMESS executables. # b) Build the HOSTLIST variable as a word separated string, i.e. ()'s. # There should be one host name for every compute process that is # to be run. DDIKICK will automatically generate a set of data # server processes (if required) on the same hosts. # An extended explanation of the arguments to ddikick.x can be found # in the file gamess/ddi/readme.ddi, if you have any trouble executing. # if ($TARGET == sockets) then # # set the path pointing to GAMESS and DDIKICK binaries # set GMSPATH=/uufs/chpc.utah.edu/sys/pkg/GAMESS/std/gamess set DDI_VER='new' # limit stacksize 131072 setenv MKL_SERIAL YES # # Need to set up serial and parallel options # if ($?PBS_JOBID) then # # repeated host names in the PBS host file indicate being assigned # CPUs in the same SMP enclosure, which we must count up correctly. # Fortunately PBS gives duplicate host names in a row, not scrambled. # The number of hosts in the PBS node file (nmax) should equal the # requested processor count, NCPUS. We need to count duplicates # in order to learn the number of SMP enclosures, NNODES, and how # many CPUs inside each SMP were assigned (NSMPCPU). For example, # if we are assigned the host names "a a a b b c c c" we must build # the string "a:cpus=3 b:cpus=2 c:cpus=3" so that ddikick.x will # know the SMP structure of the assigned node names. (C-shell handles # variable substitution followed by colon gracefully by ${HOST}:cpus.) # set HOSTLIST=() set nmax=`wc -l $PBS_NODEFILE` set nmax=$nmax[1] if ($nmax != $NCPUS) then echo There is processor count confusion exit endif echo Processor count agreement # 1st host in the list is sure to be a new SMP enclosure set MYNODE=`sed -n -e "1 p" $PBS_NODEFILE` set MYNODE=`echo $MYNODE | awk '{split($0,a,"."); print a[1]}'` # IPROC counts assigned processors (up to NCPUS), # NNODES counts number of SMP enclosures. # NSMPCPU counts processors in the current SMP enclosure @ IPROC = 2 @ NNODES = 1 @ NSMPCPU = 1 set spacer1=":cpus=" while($IPROC <= $nmax) set MYPROC=`sed -n -e "$IPROC p" $PBS_NODEFILE` set MYPROC=`echo $MYPROC | awk '{split($0,a,"."); print a[1]}'` if($MYPROC != $MYNODE) then set HOSTLIST = ($HOSTLIST $MYNODE$spacer1$NSMPCPU) set MYNODE=$MYPROC @ NSMPCPU = 0 @ NNODES++ endif @ IPROC++ @ NSMPCPU++ end set HOSTLIST = ($HOSTLIST $MYNODE$spacer1$NSMPCPU) endif # # we have now finished setting up a correct HOSTLIST. # uncomment the next two if you are doing script debugging. echo "The generated host list is" echo $HOSTLIST # #If a $GDDI input group is present the calculation will be using # subgroups within DDI. The master within each group must have a # copy of INPUT, and will create separate PUNCH and OUTPUT files. # Note that this separates the OUTPUT from the normal log file, and # at the end we must take steps to save the files from at least the # master of the first group. Skip if no $GDDI is found in the input. # set ngddi=`grep -i '^ \$GDDI' $SCR/$JOB.F05 | grep -iv 'NGROUP=1 ' | wc -l` if ($ngddi > 0) then set GDDIjob=true echo "This is a GDDI run, keeping output files on local disks" echo "until the very end of the run, when they'll be saved from" echo "the master process in the first group, only." set echo setenv IRCDATA $SCR/$JOB.F04 setenv OUTPUT $SCR/$JOB.F06 setenv PUNCH $SCR/$JOB.F07 unset echo @ n=2 # master in master group already did 'cp' above while ($n <= $NNODES) set host=$HOSTLIST[$n] set host=`echo $host | cut -f 1 -d :` # drop anything behind a colon echo rcp $SCR/$JOB.F05 ${host}:$SCR/$JOB.F05 rcp $SCR/$JOB.F05 ${host}:$SCR/$JOB.F05 @ n++ end else set GDDIjob=false echo This is not a GDDI run endif # # Just make sure we have the binaries, before we try to run # if ((-x $GMSPATH/gamess.$VERNO.x) && (-x $GMSPATH/ddikick.x)) then else echo The GAMESS executable gamess.$VERNO.x or else echo the DDIKICK executable ddikick.x echo could not be found in directory $GMSPATH, echo or else they did not properly link to executable permission. exit 8 endif echo Code DDIKICK and GAMESS found # # OK, now we are ready to execute! # The kickoff program initiates GAMESS process(es) on all CPUs/nodes. # If your site has rsh turned off, consider "setenv DDI_RSH /usr/bin/ssh" # if ($DDI_VER == new) then set echo $GMSPATH/ddikick.x $GMSPATH/gamess.$VERNO.x $JOB \ -ddi $NNODES $NCPUS $HOSTLIST \ -scr $SCR > $WORKDIR/$JOB.log unset echo else set path=($GMSPATH $path) set echo ddikick.x $JOB $GMSPATH gamess.$VERNO.x $SCR $NCPUS $HOSTLIST > $WORKDIR/$JOB.log unset echo endif endif # # ------ end of the TCP/IP socket execution sections ------- # # In the case of GDDI runs, we save the first group master's files only. if ($TARGET != sockets) set GDDIjob=false # just didn't set them up for GDDI if ($GDDIjob == true) then cat $OUTPUT cp $SCR/$JOB.F07 ~/scr/$JOB.dat if(-e $JOB.F04) cp $SCR/$JOB.F04 ~/scr/$JOB.irc endif # # ---- the bottom third of the script is to clean up all disk files ---- # echo ----- accounting info ----- date # # Clean up the master's scratch directory. # echo Files used on the master node $master were: ls -lF $SCR/$JOB.* rm -f $SCR/$JOB.F* if ($TARGET == sockets) then if ("$SCRFLAG" == "LOCAL") then foreach HOST (`cat $PBS_NODEFILE`) rsh $HOST rm -rf /scratch/local/$USER/$PBS_JOBID endif if ("$SCRFLAG" == "SERIAL") then rm -rf /scratch/serial/$USER/$PBS_JOBID endif endif # # and this is the end # time exit