#!/bin/csh # Request maximum wallclock time for job #PBS -l walltime=01:00:00 # select=,ncpus=,mpiprocs= # Total cores requested = X #PBS -l select=8:ncpus=8:mpiprocs=8 #PBS -l application=gamess # Specify how to distribute MPI procs. across nodes #PBS -l place=scatter:excl # Request job name #PBS -N linux_gamess # Request PBS job queue for job #PBS -q standard # Specify to keep stdout/stderr job files #PBS -k eo # Select Project ID #PBS -A ARLAP96090PIO # Request environment variables be expported from script #PBS -V # # Note: # If this is your first time running GAMESS please read # $SAMPLES_HOME/gamess/README_GAMESS.TXT # for very important information to setup GAMESS !!!! # ############################################################# # change the below stub variable to your own filename prefix, # ie, if "benzoquinone.inp", then stub is benzoquinone ############################################################# set stub=benzoquinone_L4 # set JOBID=`echo $PBS_JOBID | cut -f1 -d.` echo job $JOBID starting at `date` on `hostname` cd ${HOME}/gamess/input echo starting in `pwd` # # exports or setenv # setenv GMSPATH /usr/cta/gamess/opt/0+ # intel math kernal libraries and stuff #setenv LD_LIBRARY_PATH /opt/compiler/intel/mkl81/lib/em64t:/opt/compiler/intel/compiler91/x86_64/lib:${LD_LIBRARY_PATH} module load intel cat /etc/passwd | grep `whoami` | cut -f7 -d: | grep csh if ( $status == 0 ) then if ( ! -e $HOME/.gamess.env ) then echo "module load compiler/intel11.1" > $HOME/.gamess.env # echo "module load ti06/intel9.1 ti06/openmpi-1.3" > $HOME/.gamess.env # echo 'setenv LD_LIBRARY_PATH /opt/compiler/intel/mkl81/lib/em64t:/opt/compiler/intel/compiler91/x86_64/lib:${LD_LIBRARY_PATH}' >> $HOME/.gamess.env endif else if ( ! -e $HOME/.gamess.env ) then echo "module load compiler/intel11.1" > $HOME/.gamess.env # echo "module load ti06/intel9.1 ti06/openmpi-1.3" > $HOME/.gamess.env # echo 'export LD_LIBRARY_PATH=/opt/compiler/intel/mkl81/lib/em64t:/opt/compiler/intel/compiler91/x86_64/lib:${LD_LIBRARY_PATH}' >> $HOME/.gamess.env endif endif setenv PATH ${GMSPATH}:${PATH} if ( ! -e ${stub}.inp ) then echo "**ERROR: Cannot find ${stub}.inp ...." exit 1 endif echo "PATH=${PATH}" echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" unlimit set jobhost=`hostname -s` set jobid=$JOBID set cdir=`pwd` set outfile=out.dat ###set outdir=`pwd`/$JOBID setenv TMPD /usr/var/tmp/$LOGNAME/${stub}$JOBID setenv WORKDIR ${TMPD} set scr=/usr/var/tmp/$LOGNAME/scr if (! -e $scr ) mkdir -p $scr if (! -e $TMPD ) mkdir -p $TMPD #chmod -R 755 *${jobid}* set exechost=`hostname -s` set NSLOTS=`wc -l $PBS_NODEFILE | cut -f1 -d " "` echo exechost is $exechost echo NSLOTS is $NSLOTS pwd ls -l #module load intel echo "MODULES LIST ------------------------------------------vvv" module list echo "------------------------------------^^^^^^^^^^^^^^^^^^^" #======================================================================== set host="" foreach new_host (`cat $PBS_NODEFILE`) if ($new_host != $host) then set host=$new_host echo "Working on $host ...." /usr/bin/ssh -o StrictHostKeyChecking=no $host pwd endif end #======================================================================== if ( ! -d $HOME/scr ) then mkdir $HOME/scr chmod 750 $HOME/scr endif rm -f ~/scr/${stub}.* $WORKDIR/${stub}.F* cp ${stub}.inp ${WORKDIR} cd ${WORKDIR} if ( $status != 0 ) then echo "*ERR: CANNOT CD INTO WORKDIR:$WORKDIR " endif #run gamess rungms ${stub}.inp >& ${stub}.log #rungms.ksh ${stub}.inp > ${stub}.log set st=$status echo execution ended at `date` with status $st if ( -e $HOME/.gamess.env ) then rm -f $HOME/.gamess.env endif exit 0