You may wish to consider obtaining an allocation on the large-memory Flux nodes if you anticipate running a long sequence of large jobs, as Gaussian performs much better in a larger, shared-memory environment than in a distributed environment.To run Gaussian 09 on any of our clusters, you will need to load the Gaussian module, prepare the Gaussian input file, and set appropriate parameters in your PBS script. Additionally, you may wish to set a directory to use as the scratch directory.

Load the Gaussian module.

module load gaussian

Edit your gaussian input script file, to put %NProcShared=N on the top line, where N should be less than or equal to the total number of processors on the type of node in your project (typically, 12 on a standard Flux node). Gaussian will create no more than N threads during the job. Your nproc shouldn’t exceed the number of CPUs you’ll reserve in your PBS script file.

On your next line put %mem=MMMMmb which tells Gaussian how much memory to allocate. Typical amounts are 1800 or 3800. Flux nodes have 48 GB per node, but the project you are using may have less. You will also want to add some memory for overhead, say something on the order of 200 MB.

Requesting a total of 8000mb memory or less should be safe on most of the hardware. If you have any concerns, or if your jobs are killed for using too much memory, please feel free to contact us about what would be appropriate for your hardware or project.

Here is an example of the first lines from an input file


If you expect to have large temporary files, you may wish to change where Gaussian write its temporary files. To do this, you set the value of the Linux environment variable GAUSS_SCRDIR to be the directory in which you want temporary files to be kept. For example, to set that to a project directory on /scratch, you might use


You should note that, if you are running more than one Gaussian job at a time from the same directory, there may be a conflict among the jobs for the temporary files.  Each Gaussian job should be run from its own directory, or be given its own directory for temporary files.  You can export that variable prior to running qsub to submit your job if you include the


line in your PBS script, or you can export it in your PBS script itself (see below).

Additional information about the several kinds of scratch files that Gaussian creates and how to control them can be found at the Running Gaussian web page on the Gaussian web site, under the section “Specifying Scratch File Handling and Location”.

You need to configure your PBS script to request the same number of processors and at least as much memory as you specify in your input file for your job. So, for example, if you used nproc=4, you will need to request that many processors from PBS. Unless you are using Linda, you will specify one node plust the number of processors, as in

#PBS -l nodes=1:ppn=4

In addition to the number of processors, you need to match your memory request from PBS to the memory request in your input file (don’t forget the extra for overhead), so for our example, we’ll add to that line

#PBS -l nodes=1:ppn=4,mem=3800mb

Gaussian comes with many example files. When you load the Gaussian module, the environment variable g09root is set. To command to run the test file is

g09 < $g09root/g09/tests/com/ > test001.log

assuming you want output to go into the file test001.log. An example PBS script to run that test would look something like this, where you would substitute your own account and uniqname as appropriate.

####  PBS preamble
#PBS -N g09_test001
#PBS -m abe

#PBS -l nodes=1:ppn=1,mem=1200mb,walltime=15:00
#PBS -j oe

#PBS -A example_flux
#PBS -l qos=flux
#PBS -q flux

# contains a list of the CPUs you were using if run with PBS

#  Put your job commands after this line

# cd to your execution directory first, assumed to be your home dir here
cd ${HOME}
g09 < $g09root/g09/tests/com/ > test001.log

Assuming you put those lines (with suitable changes) in a file called g09_test001.pbs, you would submit the job using this command.

qsub g09_test001.pbs