gaussian
Table of Content
Versions and Availability
▶ Display Module Names for gaussian on all clusters.
▶ Module FAQ?
▶ Did not find the version you want to use??
About the Software
Usage
Gaussian is run from the command line, and does not provide a graphical interface. Thus interactive and batch job usage is the same. The TCP Linda extension is required run Gaussian in parallel using more than 1 node per job. Currently only LSU has such a license.
Please refer to the FAQ on Common Problems below or the Gaussian User Manual for Memory Requirements for the your gaussian job.
An input file is used to specify the desired calculations. It may be as simple as:
%chk=water.chk # HF/6-31G(d) water energy Title section 0 1 O -0.464 0.177 0.0 H -0.464 1.137 0.0 H 0.441 -0.143 0.0
Please refer to the program documentation for details.
One an input file has been created, the next step is creating a PBS or SLURM job file.
▶ QSub FAQ?
An example PBS batch job file follows:
#!/bin/tcsh #PBS -A your_allocation # specify the allocation. Change it to your allocation #PBS -q checkpt # the queue to be used. #PBS -l nodes=1:ppn=4 # Number of nodes and processors #PBS -l walltime=1:00:00 # requested Wall-clock time. #PBS -o g09_output # name of the standard out file to be "g09_output". #PBS -j oe # standard error output merge to the standard output file. #PBS -N g09test # name of the job (that will appear on executing the qstat command). # # cd to the directory with Your input file cd ~USER/g09test # # Change this line to reflect your input file and output file g09 water.inp
An example SLURM batch job file follows:
#!/bin/bash #SBATCH -A loni_loniadmin1 # specify the allocation. Change it to your allocation #SBATCH -p checkpt # the queue to be used. #SBATCH -N 1 #SBATCH -n 48 # Number of nodes and processors #SBATCH -t 2:00:00 # requested Wall-clock time. #SBATCH -o slurm-%x-%j.out-%N # name of the standard out file to be "slurm-g16-100460.out-qbc185". #SBATCH -J g16_job # name of the job (that will appear on executing the squeue command). # # cd to the directory with Your input file cd $SLURM_SUBMIT_DIR # # Change this line to reflect your input file and output file g16 myinput.com
Multi-node Job Submission
Below is an example PBS job script for running gaussian/g16-b01 on QB2
(Ref: https://github.com/ResearchComputing/Documentation/wiki/Gaussian#parallel-jobs)
#!/bin/bash #PBS -N g16job #PBS -l nodes=2:ppn=20 #PBS -l walltime=01:00:00 #PBS -A your_allocation module load gaussian/g16-b01 for n in $(cat $PBS_NODEFILE | uniq); do echo ${n} done | paste -s -d, > nodes.$PBS_JOBID # the next line prevents OpenMP parallelism from conflicting with Gaussian's internal parallelization export OMP_NUM_THREADS=1 # increases the verbosity of Linda output messages export GAUSS_LFLAGS="-v" cd $PBS_O_WORKDIR date g16 -p=20 -w=$(cat nodes.$PBS_JOBID) myinput date
Below is an example SLURM job script for running gaussian/g16-b01 on QB3
(Ref: https://curc.readthedocs.io/en/latest/software/gaussian.html)
#!/bin/bash #SBATCH -p checkpt #SBATCH -N 2 #SBATCH -n 48 #SBATCH -c 1 #SBATCH -t 2:00:00 #SBATCH -A loni_loniadmin1 #SBATCH -J g16 #SBATCH -o slurm-%x-%j.out-%N module load gaussian/g16-b01 cd $SLURM_SUBMIT_DIR for n in `scontrol show hostname | sort -u`; do echo ${n} done | paste -s -d, > nodes.$SLURM_JOBID # the next line prevents OpenMP parallelism from conflicting with Gaussian's internal parallelization export OMP_NUM_THREADS=1 # increases the verbosity of Linda output messages export GAUSS_LFLAGS="-v" g16 -p=48 -w=$(cat nodes.$SLURM_JOBID) myinput.com #End-of-file (EOF)
Contents of myinput(or myinput.com):
#P b3lyp/6-31g* test stable=(opt,qconly) Gaussian Test Job 135: Fe=O perpendicular to ethene, in triplet state. 0 3 X Fe X RXFe C1 X RXC Fe 90. C2 X RXC Fe 90. C1 180. O X RXO C1 90. Fe 0. H1 C1 RCH C2 CCH Fe Angle1 H2 C1 RCH C2 CCH Fe -Angle1 H3 C2 RCH C1 CCH Fe Angle2 H4 C2 RCH C1 CCH Fe -Angle2 RXFe 1.7118 RXC 0.7560 RXO 3.1306 RCH 1.1000 Angle1 110.54 Angle2 110.53 CCH 117.81
Below are examples for using g09
TCP Linda is required to run gaussian jobs on more than one node
#!/bin/bash #PBS -q checkpt #PBS -l nodes=2:ppn=16 #PBS -l cput=00:20:00 #PBS -l walltime=00:20:00 #PBS -o output-file #PBS -j oe #PBS -V #PBS -N jobtest export WORK_DIR=$PBS_O_WORKDIR cd $WORK_DIR cat $PBS_NODEFILE | sort | uniq > /tmp/.nodes.$PBS_JOBID export GAUSS_LFLAGS="-nodefile /tmp/.nodes.$PBS_JOBID" g09 < input.inp > output.log
In the sample input above, INPUT.inp, the Link 0 directives should be
%UseSSH %chk=/work/mmcken6/g09.chk %mem=16mw %nprocshared=16 Note: must match ppn in the job submission script %NprocLinda=2 Note: must match nodes in the job submission script (rest of input) ...
Note that the "%UseSSH" directive is necessary for Linda jobs, which may fail otherwise. Alternatively, you can add the "-opt Tsnet.Node.lindarsharg: ssh" flag to the g09 command, which has the same effect for Linda jobs.
Resources
- The Gaussian 09 Manual
- The Gaussian 03 Manual is no longer available on line.
▶ Common Problems FAQ?
Last modified: September 17 2021 12:09:19.