Wayne State University

AIM HIGHER

Wayne State University

High Performance Computing Services

Gaussian 09: Advanced

HOW TO RUN A GAUSSIAN JOB

Follow these steps to create a script to run Gaussian jobs.
First be sure that your .bashrc file has been modified. Log on to the Grid.
Add these lines to your .bashrc file located in your home directory

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
  . /etc/bashrc
fi

HOSTTYPE=`uname -m`

# setup Gaussian
module load pgi-14.6/compiler
export PGIDIR=$PGI/linux86-64/2014
export g09root=/wsu/apps/groups/hbsq/gaussian/E01
source $g09root/em64t/g09/bsd/g09.profile

# machine specific commands
case $HOSTTYPE in

  x86_64)

     shift
     ;;

esac

If you have just modified your .bashrc file then you must log out and log back in for the revised file to be activated.
Second, modify this script file to run a Gaussian calculation on a compute node with X cpu cores and Y memory in queue Q. Since multi-node Gaussian calculations are not currently available, it is recommend that each job utilize all of a node's cpus and memory

# Request a BASH shell
#PBS -S /bin/bash
#
# Request one node with X cpu cores
# Note that multi-node Gaussian jobs are not yet available
#PBS -l nodes=1:ppn=X
#
# Request Y Mb of memory
# Note that this should be ~ 500Mb less than the machine's total memory
# when all cpu cores are requested.
#PBS -l mem=Ymb
#
# Requet that the output and error files be joined together
#PBS -j oe
#
# Set the name and location of the resulting logfile
#PBS -o /wsu/home/xx/xx12/xx1234/gauss/output/uranyl.log
#
# Request queue Q
#PBS -q Q


# Set the job name
JOB=uranyl

# Set the numbr of cpu cores to use
# Note that this MUST agree with the #PBS -l nodes=1:ppn=X statement
# above otherwise grid resources will be inefficiently utilized.
CPU=X

# Set the amount of free space on /tmp
# Note that this should be ~2Gb less than the actual free space.
DISK=5Gb

# Set the amount of memory to use
# Note that this MUST agree with the #PBS -l mem=Ymb statement
# above otherwise grid resources will be inefficiently utilized.
MEM=Ymb

# Move into the temporary directory assigned to this job.
# Note that working in this folder ensures maximum IO efficiency and
# automatic clean up after job completion.
cd $TMPDIR

# Regenerate a checkpoint file in order to use information from a
# previous Gaussian calculation.
#cp $HOME/path_to_file/filename.fchk .
#unfchk filename.fchk $JOB.chk
# Call Gaussian using the Linux Here Document syntax.
# Insert the contents of a Gaussian .gjf file after the
# g09 << EOF line but before the EOF line. Note that
# comments are denoted by ! inside of g09.
g09 << EOF

! Set the RWF file name and size. Note that a maximum of 20
! comma-seperated files may be specified. On 32-bit systems
! each file must be smaller than 2Gb.
%rwf=$JOB.rwf,$DISK
%nosave
! Set the checkpoint file name
%chk=$JOB.chk
! Set the memory
%mem=$MEM
! Set the number of cpus to use
%nproc=$CPU

! Note that $DISK must be passed via the maxdisk keyword.
#p SVWN5 opt freq genecp 5d 7f maxdisk=$DISK scf=dsymm
integral(grid=625302) guess=forceabeliansymmetry

UO2 dication with SDD for U basis and cc-pvdz for O basis

2 1
U 0.0 0.0 0.0
O 0.0 0.0 1.7
O 0.0 0.0 -1.7

U 0
SDD
****
O 0
cc-pvdz
****

U
SDD

EOF

# Copy files back from $TMPDIR
# Note that only files which exist are actually copied
# due to the [ -a filename ] shell command.
[ -a $JOB.chk ] && mv -f $JOB.chk $HOME/gauss/check

Notes
  • Since the Gaussian output is captured by PBS and only saved to a .log file after job completion, you must use qpeek to view the job as it is running. For more information about qpeek, type "qpeek -help" at the command prompt.
  • In order for the Grid to function properly, Gaussian jobs must not be run on Commodore, the head node.
  • Gaussian jobs must always run inside of $TMPDIR to minimize file I/O. This not only speeds up the actual calculation, but also prevents the Grid's network from becoming overwhelmed.
  • Gaussian checkpoint files are cpu dependant binary files, which means that a checkpoint file generated on 64-bit cpu (JSLQ, LANQ, OPTQ, & ZFHQ) can not be read by a 32-bit cpu. All of the nodes on the Grid are 64-bit. To move a checkpoint file from one cpu to another, first use formchk to create a .fchk file from the original .chk file on the original computer, then run unfchk on the .fchk to rebuild the .chk file on the new computer. Since computer cpu architectures are constantly changing, .fchk files should be used for long term storage of results rather than .chk files. Since .fchk files contain only text they may get very large, but can be easily compressed with gzip.
  • If you cancel your Gaussian job prematurely you will need to retreive your files from $TMPDIR. To get files back from an early-terminated job email the High Performance Computing Services Team (advcomp@wayne.edu) with the job number and if possible your files will be copied to your home directory.

Additional input script examples:
Now you are ready to submit your PBS jobfile using the qsub command.
For more information about how to use PBS follow the link below.
HOW TO SCHEDULE JOBS ON THE WSU GRID WITH PBS PRO
Computer Center Services * 5925 Woodward Avenue Detroit, Michigan 48202