Skip over navigation

Submitting Gaussian Jobs on ted

Gaussian is a program used by the Chemistry Department. It has been installed only on ted.hetchem

To run a Gaussian job you must submit it to a queue. You will need two script files along with your .com file which is input to the gaussian program. The two script files are rungauss and script I will call "shell" in the remainder of this documentation. When a gaussian account is created, I will put sample copies of these scripts in your home directory.

Steps for running gaussian on ted:

Determine the number of processors or slots you will need

Before submitting a gaussian job, determine how much memory and scratch space your job will need. A gaussian job will usually be submitted to the chemistry queue and be run on compute-0-6 or compute-0-7. These compute nodes have about 4.5 Gb of scratch space and 4 Gb of memory for eight processors. Each processor, or slot in a queue, normally has about .5 Gb of scratch space and .5 Gb of memory to use. From this information and the size of your job, determine how many slots you will need. You will need this information when you submit your job.

"rungauss" Script and Why It Is Used

By default gaussian writes scratch files to the /tmp directory on the compute nodes where the job is submitted, but it is constantly writing the .log and .chk back to your directory on the head node. This causes a huge slowdown on the head node. When you run a gaussian job, you need a script which tells gaussian to use temporary space on the current compute node for all the output files and to transfer the .log and .chk files to the head node after the completion of the job. Gaussian jobs that do not work with the .log and .chk files on the compute nodes will be killed and the user notified. A script is a file containing instructions for the computer. A sample of a script which I will call "rungauss" will contain all the gaussian work to the compute node follows:

#!/bin/csh -f
#Copy the input file
set name = `echo $1:t`
set home = `echo $1:h`
mkdir /tmp/$$
cp $1 /tmp/$$/$name
cd /tmp/$$
g09 $name
cp *.log $home/wherever
cp *.chk $home/wherever
cd /tmp
rm -rf $$

where wherever is the directory where you want the final results stored on the head node.

I will refer to this script as rungauss in the remainder of the documentation. An explantion of the lines in rungauss.

Writing script files

Script files edited on a Mac can be transferred over to unix and will work without a problem. Files written on Windows computers will have to be modified to change the ending character on each line before they can be used on unix. Editors on the unix computers include vi, a line editor and two graphic editors, nedit and emacs.

To use nedit or emacs, you will have to log into the unix computer via a graphics window.

From a Mac, use X11, a program in the Utilities folder. Type "ssh -X" to start your session. The "-X" transfers the graphics.

From a Windows computer, you will have to use eXceed, Cgywin or another X Window program. eXceed is hard to set up; it is available on Cgywin is a freeware.

Once you have created a script file, be sure that it can be executed by a unix command. Change the file to executable by using:

chmod +x filename

Shell Script for the Queue

To run a job on ted, you will have to submit the job to a queue. This requires a shell script to describe your job to the queue. A sample shell script for a gaussian run follows:

#$ -o $HOME/test
#$ -j y
#$ -N yourjobname
csh; /$HOME/rungauss $HOME/subdir/

where yourjobname is a name that you are giving to this particular run, so that you can easily see it on the queues. This particular run has the "rungauss" script in the home directory. subdir is the location of your .com file for gaussian. An explanation of the shell file.

Submitting the Job

The chemistry queue and sometimes the het queue are available for gaussian runs. Email notices will go out concerning the availability of the het queue for use by the Chemistry Dept.

Submit a job to the chemistry queue using:

qsub -pe chemistry 1 ./shell

"-pe" means you are submitting your job to a parallel environment where you may be using more than one processor or queue slot. "chemistry" is the queue to which you are submitting your job. Substitute the 1 with the number of processors that your job will need to run. See the first section above for determining the number of slots that you will need. "./shell indicates that the script shell named "shell" for the run is located in the current directory, the directory from which I am submitting the job. This name will vary with the name of your shell and its location.

It is important that you correctly indicate the number of cores that you will need so that a compute node will not have to swap jobs on a compute node or that the compute node will become completely bogged down. The queuing system will try to assign jobs requesting eight cores or slots to each of the compute nodes. The number of cores or slots you can request for a gaussian job is from 1 to 8. Be considerate. There are only 16 slots for jobs on the chemistry queue, but there are about a dozen users.

Monitoring your Queued Job

Margaret Doll 7-2009