ITS is actively responding to the COVID-19 situation and making resources available for you. Learn more here.

Page tree

Overview

This document shows two different Gaussian 09 input files and Slurm job scripts: one for small jobs using a single CPU core, and a second for larger jobs using multiple CPU cores on a single compute node. TTU's Gaussian 09 license does not include GPU support or the ability to use multiple compute nodes on a single job.

Refer to the Slurm Quick Start User Guide for more information on Slurm scripts.

Single-CPU Gaussian Job

Create a Gaussian input file named water.inp describing a water molecule:

water.inp
# SP, RHF/STO-3G punch=archive trakio scf=conventional

Gaussian Test Job 00
Water with archiving

0 1
O
H 1 0.96
H 1 0.96 2 109.471221

geom=check

Create a Slurm job script named g09-serial.sh to run the water molecule job:

g09-serial.sh
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1

module load gaussian
export GAUSS_SCRDIR=$(mktemp -d -p /local/tmp)
g09 water.inp
rm -r ${GAUSS_SCRDIR}

Submit the job from the login node with the command sbatch g09-serial.sh, and when the job completes, you should have a new file water.log containing the Gaussian output. Abridged contents of the log file is shown below.

water.log (abridged)
 Entering Gaussian System, Link 0=g09
 Input=water.inp
 Output=water.log
 Initial command:
 /cm/shared/apps/gaussian/09.d01/l1.exe "/local/tmp/Gau-160685.inp" -scrdir="/local/tmp/"
 Entering Link 1 = /cm/shared/apps/gaussian/09.d01/l1.exe PID=    160686.

 Copyright (c) 1988,1990,1992,1993,1995,1998,2003,2009,2013,
            Gaussian, Inc.  All Rights Reserved.
...
 1\1\GINC-NODE001\SP\RHF\STO-3G\H2O1\RENFRO\30-Aug-2017\0\\# SP, RHF/ST
 O-3G punch=archive trakio scf=conventional\\Gaussian Test Job 00 Water
  with archiving\\0,1\O\H,1,0.96\H,1,0.96,2,109.47122063\\Version=ES64L
 -G09RevD.01\State=1-A1\HF=-74.9607233\RMSD=2.458e-10\Dipole=0.5425712,
 0.,0.3836558\Quadrupole=0.1565292,-0.6262971,0.4697679,0.,-0.4429865,0
 .\PG=C02V [C2(O1),SGV(H2)]\\@
 The archive entry for this job was punched.
...
 Job cpu time:       0 days  0 hours  0 minutes  0.8 seconds.
 File lengths (MBytes):  RWF=      5 Int=      1 D2E=      0 Chk=      1 Scr=      1
 Normal termination of Gaussian 09 at Wed Aug 30 12:42:02 2017.

Multiple-CPU Gaussian Job

Create a Gaussian input file named trifluorobenzene.inp describing trifluorobenzene. No changes are required to the input file to make a parallel Gaussian simulation:

trifluorobenzene.inp
# RHF/3-21G

Cs C6H3F3

0 1
C1
C2 C1 r1
C3 C2 r2  C1 a1
C4 C3 r3  C2 a2  C1 0.
C5 C4 r4  C3 a3  C2 0.
C6 C5 r5  C4 a4  C3 0.
F1 C1 r6  C2 a5  C3 180.
F2 C2 r7  C3 a6  C4 180.
H3 C3 r8  C4 a7  C5 180.
F4 C4 r9  C5 a8  C6 180.
H5 C5 r10 C6 a9  C1 180.
H6 C6 r11 C1 a10 C2 180.

r1    1.3749
r2    1.3696
r3    1.3745
r4    1.3728
r5    1.3825
r6    1.3537
r7    1.3504
r8    1.0673
r9    1.3538
r10   1.0683
r11   1.0689
a1  120.5441
a2  119.0015
a3  121.3610
a4  118.9105
a5  119.5234
a6  119.9060
a7  120.7900
a8  119.6953
a9  121.2759
a10 118.8179

Create a Slurm job script named g09-parallel.sh to run the trifluorobenzene molecule job. This shell script includes lines of #SBATCH --cpus-per-task=28 and export GAUSS_PDEF=${SLURM_CPUS_PER_TASK} that were not needed in the single-CPU job:

g09-parallel.sh
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=28

module load gaussian
export GAUSS_PDEF=${SLURM_CPUS_PER_TASK}
export GAUSS_SCRDIR=$(mktemp -d -p /local/tmp)
g09 trifluorobenzene.inp
rm -r ${GAUSS_SCRDIR}

Submit the job from the login node with the command sbatch g09-parallel.sh, and when the job completes, you should have a new file trifluorobenzene.log containing the Gaussian output. Abridged contents of the log file is shown below.

trifluorobenzene.log (abridged)
 Entering Gaussian System, Link 0=g09
 Input=trifluorobenzene.inp
 Output=trifluorobenzene.log
 Initial command:
 /cm/shared/apps/gaussian/09.d01/l1.exe "/local/tmp/tmp.Rj14iZcGaq/Gau-103183.inp" -scrdir="/local/tmp/tmp.Rj14iZcGaq/"
 Default is to use a total of  28 processors:
                               28 via shared-memory
                                1 via Linda
 Entering Link 1 = /cm/shared/apps/gaussian/09.d01/l1.exe PID=    161776.

 Copyright (c) 1988,1990,1992,1993,1995,1998,2003,2009,2013,
            Gaussian, Inc.  All Rights Reserved.
...
 ******************************************
 Gaussian 09:  ES64L-G09RevD.01 24-Apr-2013
                11-Jun-2018
 ******************************************
...
 1\1\GINC-NODE013\SP\RHF\3-21G\C6H3F3\RENFRO\11-Jun-2018\0\\# RHF/3-21G
 \\Cs C6H3F3\\0,1\C\C,1,1.3749\C,2,1.3696,1,120.5441\C,3,1.3745,2,119.0
 015,1,0.,0\C,4,1.3728,3,121.361,2,0.,0\C,5,1.3825,4,118.9105,3,0.,0\F,
 1,1.3537,2,119.5234,3,180.,0\F,2,1.3504,3,119.906,4,180.,0\H,3,1.0673,
 4,120.79,5,180.,0\F,4,1.3538,5,119.6953,6,180.,0\H,5,1.0683,6,121.2759
 ,1,180.,0\H,6,1.0689,1,118.8179,2,180.,0\\Version=ES64L-G09RevD.01\Sta
 te=1-A'\HF=-524.3791204\RMSD=3.935e-09\Dipole=0.6796193,0.,-0.3969199\
 Quadrupole=-4.9662058,0.5069947,4.4592112,0.,-3.3631137,0.\PG=CS [SG(C
 6H3F3)]\\@
...
 Job cpu time:       0 days  0 hours  0 minutes 34.8 seconds.
 File lengths (MBytes):  RWF=      5 Int=      0 D2E=      0 Chk=      1 Scr=      1
 Normal termination of Gaussian 09 at Mon Jun 11 08:58:21 2018.

How helpful was this information?

Your Rating: Results: 1 Star2 Star3 Star4 Star5 Star 71 rates