Submitting single-threaded Gaussian 03 jobs to the Sun Grid Engine

From Research Computing

Table of contents

The job script

The following is an SGE job script for submitting a single-threaded Gaussian job to the cluster. In this example, the c-shell is used (top line). The setenv and source lines define environment variables for the Sun Grid Engine (SGE) and for Gaussian 03. The gaussian .com file to be executed in this illustration is a test file that comes with the gaussian source code, called test111.com.

NOTE: in the script below, comment character sequences '#' and '#$' appear in the first column. The character sequence #$ is used by the Sun Grid Engine (SGE) job submission commands (such as qsub), which interpret the characters following the #$ (ignored when the script is running, but interpreted when SGE reads the script, prior to execution) as if they were command line arguments to an SGE job submission command, such as qsub. For example, instead of entering “qsub –l itanium=1 jobname” on the command line, you can include the line #$ -l itanium=1 in the script file jobname and use the command qsub jobname. It is imperative that #$ control sequences start at the beginning of the line.

#!/bin/bash
#$ -S /bin/bash
#$ -q p4.q
 
export g03root=/usr/local/gaussian
. ${g03root}/g03/bsd/g03.profile
export SGE_ROOT=/usr/local/sge
. /usr/local/sge/default/common/settings.sh
 
export GAUSS_SCRDIR=/tmp
g03 test111.com


Submitting the job with qsub

The job script, named test111.job, is submitted to the SGE with the qsub command.

[flengyel@m254 flengyel]$ qsub test111.job
your job 27065 ("test111.job") has been submitted
[flengyel@m254 flengyel]$     

Monitoring the job

To check the status of the job, use the qstat -u <username> command.

[flengyel@m254 flengyel]$ qstat -u flengyel
job-ID  prior name       user         state submit/start at     queue      master  ja-task-ID
---------------------------------------------------------------------------------------------
 27065     0 test111.jo flengyel     qw    04/27/2005 04:00:39

Initially, the job waits for a queue, but soon it is running.

[flengyel@m254 flengyel]$ qstat -u flengyel
job-ID  prior name       user         state submit/start at     queue      master  ja-task-ID
---------------------------------------------------------------------------------------------
 27065     0 test111.jo flengyel     r     04/27/2005 04:00:54 default61. MASTER
[flengyel@m254 flengyel]$           

Here is a brief explanation of the output. Without arguments, qstat will print the status of all jobs in all queues. The output shows the following, in order.

* The job ID number
* Priority of job
* Name of job
* ID of user who submitted job
* State of the job: The job state can be
* r(unning)
* t(ransferring)
* Submit or start time and date of the job
* If running - the queue in which the job is running
* The function of the running job (MASTER or SLAVE)
* The job array task ID

For additional information, see the man pages for the qstat command.

The Gaussian log file

This job executes rather quickly for a gaussian job (some take days or weeks). This job produced an output file, test111.log, which begins as follows:

[flengyel@m254 flengyel]$ more test111.log
Entering Gaussian System, Link 0=g03
Input=test111.com
Output=test111.log
Initial command:
/usr/local/gaussian/g03/l1.exe /tmp/Gau-32310.inp -scrdir=/tmp/
Entering Link 1 = /usr/local/gaussian/g03/l1.exe PID=     32311.
 
Copyright (c) 1988,1990,1992,1993,1995,1998,2003,2004, Gaussian, Inc.
                 All Rights Reserved.
 
This is the Gaussian(R) 03 program.  It is based on the
the Gaussian(R) 98 system (copyright 1998, Gaussian, Inc.),
the Gaussian(R) 94 system (copyright 1995, Gaussian, Inc.),
the Gaussian 92(TM) system (copyright 1992, Gaussian, Inc.),
the Gaussian 90(TM) system (copyright 1990, Gaussian, Inc.),
the Gaussian 88(TM) system (copyright 1988, Gaussian, Inc.),
the Gaussian 86(TM) system (copyright 1986, Carnegie Mellon
University), and the Gaussian 82(TM) system (copyright 1983,
Carnegie Mellon University). Gaussian is a federally registered
trademark of Gaussian, Inc.
 
This software contains proprietary and confidential information,
including trade secrets, belonging to Gaussian, Inc.

Over 2900 lines later, we see that the job has terminated normally.

Hexadecapole moment (field-independent basis, Debye-Ang**3):
XXXX=    -4.1096 YYYY=    -4.1096 ZZZZ=   -26.1238 XXXY=     0.0000
XXXZ=     0.0000 YYYX=     0.0000 YYYZ=     0.0000 ZZZX=     0.0000
ZZZY=     0.0000 XXYY=    -1.3699 XXZZ=    -5.7030 YYZZ=    -5.7030
XXYZ=     0.0000 YYXZ=     0.0000 ZZXY=    -0.0000
N-N= 3.058012014446D+01 E-N=-5.349393307205D+02  KE= 1.967822757559D+02
Symmetry AG   KE= 8.717980558957D+01
Symmetry B1G  KE= 0.000000000000D+00
Symmetry B2G  KE= 7.279837029577D+00
Symmetry B3G  KE= 7.279837029577D+00
Symmetry AU   KE= 0.000000000000D+00
Symmetry B1U  KE= 8.270120148872D+01
Symmetry B2U  KE= 6.170797309209D+00
Symmetry B3U  KE= 6.170797309209D+00
Leave Link  601 at Wed Apr 27 03:47:48 2005, MaxMem=    6291456 cpu:       0.0
(Enter /usr/local/gaussian/g03/l9999.exe)
1\1\GINC-M61\FOpt\RMP2-RW\3-21G\F2\FLENGYEL\27-Apr-2005\1\\#P RMP2=RW/
3-21G OPT=FP GEOM=MODELA\\f2 opt only bond correlated.\\0,1\F\F,1,R2\\
R2=1.40167382\\Version=IA64L-G03RevC.01\State=1-SGG\HF=-197.6442429\MP
2=-197.649758\RMSD=9.192e-10\RMSF=1.024e-04\PG=D*H [C*(F1.F1)]\\@
 
 
MEN HAVE BECOME THE TOOLS OF THEIR TOOLS... THOREAU
Job cpu time:  0 days  0 hours  0 minutes  6.4 seconds.
File lengths (MBytes):  RWF=     13 Int=      0 D2E=      0 Chk=     10 Scr=      1
Normal termination of Gaussian 03 at Wed Apr 27 03:48:04 2005.