biowulf_logo

Status
About
Hardware
Applications
Batch queues
Disk storage

MPI
Performance
New Users
User Guide
Documentation
Research
Photos


gaussian logo Gaussian on Biowulf

Gaussian03 is the latest in the Gaussian series of electronic structure programs. Designed to model a broad range of molecular systems under a variety of conditions, it performs its computations starting from the basic laws of quantum mechanics. Gaussian can predict energies, molecular structures, vibrational frequencies-along with the numerous molecular properties that are dervied from these three basic computation types-for systems in the gas phase and in solution, and it can model them in both their ground state and excited states. Chemists apply these fundamental results to their own investigations, using Gaussian to explore chemical phenomena like substituent effects, reaction mechanisms, and electronic transitions.

Gaussian is a connected system of programs for performing semiempirical and ab initio molecular orbital calculations including:

  • Calculation of one- and two-electron integrals over s, p, d, and f contracted gaussian functions
  • Evaluation of various one-electron properties of the Hartree-Fock wavefunction, including Mulliken population analysis, multipole moments, and electrostatic fields
  • Correlation energy calculations using configuration interaction using either all double excitations or all single and double excitations

The Gaussian executables are limited by the node hardware (see below). The advantage of using Gaussian on Biowulf would be to run many Gaussian jobs simultaneously as a swarm of single- or dual-threaded jobs.

Version

The default version of Gaussian03 is revision D.01. (NOTE: Due to licensing restrictions, users are required to belong to the group 'gaussian' on Helix computers in order to run version B.4 and higher. Please contact Helix Systems (staff@helix.nih.gov) to be added to the 'gaussian' group on Biobos.)

Revision C.02 can be used by adding the option "--C02" to the commandline.

Gaussian Documentation

  • Type man gaussian at the Biowulf prompt for a brief overview of Gaussian
  • Type man gutils at the Biowulf prompt for information on other Gaussian commands: c8603,  chkchk,  chkmove,  cubegen, cubman, formchk, freqmem, gauopt,  ghelp,  newzmat, testrt, and unfchk
  • Gaussian has online help. Typing ghelp at the Biowulf prompt will bring up Gaussian information
  • Gaussian links and resources at www.gaussian.com
  • Gaussian 03 Help at www.gaussian.com


Notes regarding architecture

Jobs which require more than 16 GB of scratch disk space, or jobs requiring more than 2.0 GB of memory can only be run on 64-bit nodes, due to an inherent limitation in address space (2**31-1 locations possible) on the 32-bit nodes. The 64-bit version is on average 28% faster than the 32-bit version running on 2.2 GHz Opterons, and 42% faster than the 32-bit version running on the 2.8 GHz Xeons. See below for more information regarding optimum use. Multithreaded jobs (as controlled by the Link 0 command %NProcShared) of greater than 2 processors, can be run on the dual-core nodes, Nimbus or Firebolt.

Notes regarding scratch files

Gaussian uses several scratch files in the course of its computation. These include the checkpoint file (*.chk), the read-write file (*.rwf), the two-electron integral file (*.int), and the two-electron integral derivative file (*.d2e). These files can become extremely large, and because the program is accessing them constantly, I/O speed is a factor in performance.

Choosing a scratch directory can be very critical. This is done by defining the environmental variable $GAUSS_SCRDIR either immediately prior to execution or in the shell executing the program.

The default directory for scratch files on the Biowulf cluster is /gaussian (on individual nodes). Diskspace depends on the node, and varies from 20 GB to 60 GB. Because /gaussian is local to the node, this provides the fastest I/O speed for the Gaussian execution.

Scratch files will remain after completing Gaussian execution. There is no automatic mechanism to remove files from /gaussian on the nodes, and so unless the files are required for future runs, users are encouraged to include the Link0 command %NoSave at the end of input files.

Notes regarding checkpoint files (Mar. 1, 2005)

When the L0 command '%chk=<filename>' is given in a Gaussian command script, and the stated checkpoint file already exists, Gaussian attempts to import the checkpoint file and begin running with data from the file. However, if the checkpoint file was generated on an architecture different than the current one (e.g., running Gaussian on a 64-bit node with a 32-bit generated checkpoint file), Gaussian execution stops abruptly with no discernable error message.

To fix this, the command gaussian_chkarch will determine the architecture on which a checkpoint file was generated. This must be run independently of the g03 command. The incompatible checkpoint file can be reformatted by using the Gaussian utilities formchk and unfchk.

Currently, this architecture check is only done on the Biowulf cluster nodes, and is limited to 32-bit to 64-bit files.

Forced 32-bit version (May 9, 2006)

Depending on the node, either the 32- or 64-bit version of Gaussian is run using the g03 command. However, there may be cases when checkpoint files require a single version. Because the 32-bit version of Gaussian will run on both the 32- and 64-bit nodes (although there are limitations to the 32-bit version, see above), giving the flag '-32' with the g03 command will force the 32-bit version of Gaussian to run.

Dual-core node use (Sep. 25, 2006)

The Biowulf cluster now has a small (but growing) population of dual-core (4 cpu) nodes (see below regarding optimum number of processors to use). Because the memory is shared among the 4 cpus, each processor has access to only 1/4 of the amount of memory when run on a single processor. Thus, the amount of memory allocated will need to be increased up to 4X. However, while the total memory for these nodes is 8 GB, multithreaded Gaussian jobs running %NProcShared=4 jobs are limited to 4 GB of memory.

Run as a batch job

Create a batch input file, e.g. 'g03run', which uses the input file 'test000.com'. For example:
#!/bin/bash
#PBS -N g03
#PBS -e g03.err
#PBS -o g03.log
cd $PBS_O_WORKDIR
/usr/local/bin/g03 < test000.com > test000.log
Submit this job using the PBS 'qsub' command. Example:

qsub -l nodes=1 g03run
See here for more information about PBS.

Running a swarm of Gaussian jobs

The swarm program is designed to submit a group of commands to the Biowulf cluster as batch jobs. Each command is represented by a single line in the swarm command file that you create, and runs as a separate batch job.

Create a swarm command file with each line containing a single gaussian command. For example, the file 'cmdfile' would have a single gaussian command per line:

g03 < test000.com > test000.log
g03 < test001.com > test001.log
g03 < test002.com > test002.log
g03 < test003.com > test003.log
g03 < test004.com > test004.log
g03 < test005.com > test005.log
...

Submit this swarm command file to the batch system with the command:

biobos$ swarm -f cmdfile
Swarm will run 2 jobs per node, since the Biowulf nodes are all dual-processor. See the Swarm documentation for more information.

Run Gaussian on the command line

If you log in to Biowulf and type a command, your command will run on the main Biowulf login node. This is not recommended, for obvious reasons. If you really want to run interactively, either use one of the interactive nodes (see the user guide for more information) or allocate a node for interactive use. Once the node is allocated, you can type commands directly on the command line. Example:
biowulf% qsub -I -l nodes=1
qsub: waiting for job 2011.biobos to start
qsub: job 2011.biobos ready

p139$ g03 < test000.com > test000.log
p139$ exit
logout

qsub: job 2011.biobos completed
biobos$

Optimizing Gaussian (and cluster) usage

There are two versions of Gaussian installed for use by the cluster, the 32-bit version and the 64-bit version. The choice of executables is made automatically when using the command /usr/local/bin/g03. A job submitted to PBS on the cluster will try to find the highest performance node available, going through the hierarchy o2800 > o2200/o2600 > o2000 > p2800 > p1800. There is no automatic accounting for the job requirements of memory, diskspace, or processor speed. A job can be directed to go to specific nodes using the expanded PBS options . For example, to send the job 'g03run' to a 64-bit 2.2 GHz node with 4 GB of memory, use the command
biowulf% qsub -l nodes=1:o2200:m4096 g03run

The nodes availabe can be seen by typing the command 'freen'. Click here for more information about directing and monitoring jobs on the cluster.

While diskspace and memory is not restricted for the 64-bit version of Gaussian, they are still limited by the cluster hardware. Using the Link0 command %mem and the MaxDisk option in the Gaussian command file may be required to prevent memory swapping or running out of diskspace. Click here for more information about memory and diskspace requirements for Gaussian.

Running the command /usr/local/bin/g03 will give, in addition to the Gaussian output, three additional pieces of information regarding the Gaussian job:

biowulf% head -4 test000.log
host = p1070
Running on 64-bit system
Current disk usage on p1070:
/dev/hda1 72G 2.1G 66G 4% /

The first line tells what node the Gaussian process is running on. The second line shows whether the 32-bit or 64-bit version is being run (whether the node has the x86-64 property or not). The third and fourth lines show how much scratch space is available for the node (in this case 66GB). This information is important in deciphering any problems the job may have encountered.

Gaussian Test Runs

Gaussian comes with a large set of test input scripts (/usr/local/gaussian03/g03/tests/com). All input scripts were run as both single- and dual-threaded jobs on 32-bit (p2800, Xeon) and 64-bit (o2200, Opteron) nodes, and the following table summarizes the output. The values in the upper right corner shows the average relative speedup (or slowdown if the value is negative) on going from one job type (the first column) to another job type. The value in the lower left corner shows the number of test runs compared. The results were partitioned into all test runs, those which ran for more than 60 seconds, more than 600 seconds, and more than 6000 seconds.

All test runs:

32-1p
32-2p
64-1p
64-2p
32-1p
+48%
+44%
+132%
32-2p
630
-2%
+60%
64-1p
657
632
+63%
64-2p
657
632
661

> 60 sec.

32-1p
32-2p
64-1p
64-2p
32-1p
+49%
+43%
+132%
32-2p
358
-4%
+58%
64-1p
303
282
+65%
64-2p
272
251
273

> 600 sec.

32-1p
32-2p
64-1p
64-2p
32-1p
+52%
+42%
+136%
32-2p
98
-7%
+56%
64-1p
110
93
+66%
64-2p
83
71
86

> 6000 sec.

32-1p
32-2p
64-1p
64-2p
32-1p
+59%
+41%
+150%
32-2p
20
-11%
+53%
64-1p
25
19
+74%
64-2p
12
12
14

 

Overall, the speedup efficiency on going from a single-threaded job to a dual-threaded job on a 32-bit system was between 75% and 80%. For the 64-bit system, it was between 82% and 87%.

Several of the test runs failed for all systems (test284, test421, test598, test602, and test605). These test run input files were considered incorrectly written.

A number of test runs failed with stack overflow errors when run as dual-threaded jobs on 32-bit nodes (see text files below). This may be due to the limitations of memory by the executables (see above).

Many test runs ran slower as dual-threaded jobs than as single-threaded jobs (for example test410 and test559), with the greatest slowdown being 15% (64-bit, test559).

The full results of the test runs can be downloaded as text files:

Choosing A Number Of Processors

Gaussian is a natively multithreaded application. However, not all calculation types parallelize well or at all. In fact, most run best as single-threaded processes. The following table shows the best use of Gaussian with respect to the number of processors:

Method
Energy
Gradient / Opt
Freq / Hessian
HF
4
4
4
HDFT
4
4
4
Pure DFT
4
4

4

MP2
4
3
1-2
MP3
1
1
 
MP4
2-4
 
 
MP5
1
 
 
CCD
1
1
 
CCSD
1
1
 
CCSD(T)
2-4
 
 
CIS
4
3
 
CISD
1
1
 
AM1
1
1
 

Only HF, DFT, CCSD(T), CIS, and MP2/MP4 jobs will benefit from running with a %NProcShared=4 on dual core nodes. All others should be run with %NProcShared=2 (or 1).

Interpreting Gaussian Errors

Gaussian errors are not always straightforward to interpret. Something as simple as a "file not found" can seem baffling and cryptic. Here is a collection of errors and their translations:

Gaussian Error Translation to English
Error termination in NtrErr:
ntran open failure returned to fopen.
Segmentation fault
Can't open a file
Internal consistency error detected in FileIO for unit 1 I= 4 J=0 I Fail= 1. Gaussian is limited to 16 GB of scratch space on the 32-bit nodes
Out-of-memory error in routine UFChkP (IEnd= 12292175 MxCore= 6291456)
Use %mem=12MW to provide the minimum amount of memory required to complete this step.
Error termination via Lnk1e at Thu Feb 2 13:05:32 2006.
Default memory (6 MW, set in $GAUSS_MEMDEF) is too small for unfchk
galloc: could not allocate memory.: Resource temporarily unavailable Not enough memory
Out-of-memory error in routine... Not enough memory
End of file in GetChg.
Error termination via Lnk1e ...
Not enough memory

Using Firebolt

Firebolt is an SGI Altix 350 with 32 Itanium 2 processors and 96GB of memory, using an SGI NUMAlink interconnect and runs under RedHat Enterprise Linux 3. It is managed as a "fat node" of the NIH Biowulf Cluster. Gaussian jobs which require > 4GB of memory should be run on Firebolt. All other jobs should be run on the cluster.

The default scratch space for Gaussian on Firebolt is /gaussian, a local 2.2TB filesystem. Gaussian jobs must be submitted to the altix in a unique fashion, where the machine type (altix), number of processors (ncpus), and memory (4GB) must be explicitly defined:

biowulf% qsub -l nodes=1:altix:ncpus=4,mem=4gb g03run

All other PBS commands are identical to those used for managing cluster jobs. In addition, the wrapper script /usr/local/bin/g03 is equivalent as well.

Firebolt is roughly equivalent to the fastest nodes on the cluster, and in general Gaussian jobs scale well to about 4 cpus. As with all Gaussian jobs, an increase in allocated memory will accelerate performance. Here is a plot of 2-cpu (%nproc=2) benchmark jobs as compared to Firebolt:

Gaussian Benchmarks Plot


This document is available as http://biowulf.nih.gov/apps/gaussian.html
Biowulf home page | Helix Systems | NIH