Faculty for Chemistry and Pharmacy - Group of Prof. Zipse
 

SGE script file for G03

The following script file can be used to run a Gaussian 03 input file (e.g. test1) through the SGE queueing system in sequential mode, that is, using only one CPU. In order for this script to work out the actual input file is expected to be test1.com:

#!/bin/bash
#$ -S /bin/bash
#$ -cwd
#$ -N test1
#$ -q seq
#### This line has to be
#######
export g03root=/scr1/g03d1
export g03dir=/scr1/g03d1/g03
export GAUSS_SCRDIR=/scr1/$USER
export GAUSS_EXEDIR=$g03dir
export GAUSS_ARCHDIR=$g03dir
export OLDDIR=`pwd`
export LD_LIBRARY_PATH="${GAUSS_EXEDIR}:/usr/lib"
#
cp $OLDDIR/$JOB_NAME.com $GAUSS_SCRDIR/$JOB_NAME.com
$g03dir/g03 < $GAUSS_SCRDIR/$JOB_NAME.com > $OLDDIR/$JOB_NAME.log
cp $GAUSS_SCRDIR/$JOB_NAME.chk $OLDDIR/$JOB_NAME.chk
rm -f $GAUSS_SCRDIR/$JOB_NAME.com

The Gaussian output file generated by this script is named test1.log. The second to the last line copies the checkpoint file located in a temporary file system back to the working directory.

In order to run the same job on a two-processor maschine the following script will be appropriate:
 

#!/bin/bash
#$ -S /bin/bash
#$ -cwd
#$ -N test1
#$ -q 2p
#$ -pe shm 2
#### This line has to be
#######
export g03root=/scr1/g03d1
export g03dir=/scr1/g03d1/g03
export GAUSS_SCRDIR=/scr1/$USER
export GAUSS_EXEDIR=$g03dir
export GAUSS_ARCHDIR=$g03dir
export OLDDIR=`pwd`
export LD_LIBRARY_PATH="${GAUSS_EXEDIR}:/usr/lib:/usr/local/pgi7.0/linux86/7.0-4/lib"
#
cp $OLDDIR/$JOB_NAME.com $GAUSS_SCRDIR/$JOB_NAME.com
$g03dir/g03 < $GAUSS_SCRDIR/$JOB_NAME.com > $OLDDIR/$JOB_NAME.log
cp $GAUSS_SCRDIR/$JOB_NAME.chk $OLDDIR/$JOB_NAME.chk
rm -f $GAUSS_SCRDIR/$JOB_NAME.com

Please observe that the actual number of processors used in a particular calculation will still have to be set in the Gaussian input file.