Gaussian03
Systems & Access :: Learning to Use :: Linux Computing Resource
The user should be a part of the 'g03' UNIX group to run Gaussian03. Before running Gaussian03, the user should set up the environment with the following command. The same command needs to be in your .login as well.
if (-e /usr/usc/gaussian/g03-B05/setup.csh) then
source /usr/usc/gaussian/g03-B05/setup.csh
endif
Use the command 'g03' to run the scalar version of Gaussian03. Use the 'g03l' (last character is a lowercase 'L') command to run the parallel (Linda) version of Gaussian03. While using the parallel version of Gaussian03, you need to specify the number of processors to be used in the '%nproc' as a link 0 command in your Gaussian program. The following should be the first few lines of your Gaussian program:
%chk=/scratch/test.chk
%mem=80MW
%NProcShared=2
%NProcLinda=4
Note: The %NProc options listed above make Linda utilize four nodes and two processes in each node.
Users are not required to manually source PGI compiler's setup file. However, if the user needs a particular version of a PGI compiler, then that PGI compiler's setup file should be sourced before sourcing gaussian's setup file. The user should not override the following variables' default values: PGI, PGIDIR, GAUSS_SCRDIR, and GUASS_LFLAGS.
The following is a sample PBS script file for running Gaussian programs. To learn more about PBS, please refer to the Portable Batch System section.
#!/bin/csh
#** The "#PBS" lines must come before any
##** non-blank non-comment lines ***
##**PBS -l walltime=1:00:00,nodes=1:ppn=4
##**For almaak remove comments on the above line
##**and comment out the line below
#PBS -l walltime=1:00:00,nodes=2:ppn=2
#The following should contain your program and any arguments
set inputfile = "./test.com" # G03 Input file
set outputfile = "test.out" # G03 Output file
if ($?PBS_JOBID) then # if this is a PBS job
echo "Starting" $PBS_JOBID `date`
echo "Initiated on `hostname`"
echo ""
cd "$PBS_O_WORKDIR" || exit 1 # connect to working directory of qsub
cp -v $inputfile /scratch/ || exit 1 # Copy the input file to /scratch
# if you run on the linux cluster
cd /scratch || exit 1
else
echo "This script must be run as a PBS job"
exit 1
endif
if ($?PBS_NODEFILE) then
#count the number of processors assigned by PBS
set NP = `wc -l < $PBS_NODEFILE `
echo "Running on $NP processors: "`cat $PBS_NODEFILE`
else
echo "This job did not have the number of nodes specified with"
echo "the node= resource"
exit 1
endif
# run the program on the linux cluster using Linda
g03l < `basename $inputfile` > `basename $outputfile`
set ret = $?
## For almaak use the following line and comment out the previous line
## g03 < $inputfile >& $outputfile
cp -v /scratch/* $PBS_O_WORKDIR # Copy all the output and temp files
## from /scratch to home directory
echo "Done " `date`
exit $ret