{"id":1034,"date":"2023-03-23T13:45:21","date_gmt":"2023-03-23T13:45:21","guid":{"rendered":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/?page_id=1034"},"modified":"2025-01-21T08:31:13","modified_gmt":"2025-01-21T08:31:13","slug":"gaussian09","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/software\/applications\/gaussian09\/","title":{"rendered":"Gaussian 09"},"content":{"rendered":"<p>Gaussian is a general purpose suite of electronic structure programs. Version g09d01 is installed. It is available as binaries only. The source code is not available on the CSF.<\/p>\n<p><strong>If you want information about Gaussian 16 on the CSF <a href=\"..\/gaussian16\">please see our G16 docs<\/a><\/strong>.<\/p>\n<h2>Restrictions on use &#8211; G09 ONLY<\/h2>\n<p>The University of Manchester site license allows access for all staff and students of the university, however strict licensing restrictions require that all users who wish to use the software must complete some paperwork and be in a restricted unix group.<\/p>\n<p>The procedure for getting access on the CSF is as follows (please read carefully):<\/p>\n<ol class=\"gaplist\">\n<li>Print out and complete the <a href=\"https:\/\/www.applications.itservices.manchester.ac.uk\/medialibrary\/docs\/Gaussian\/Gaussian_Usage_Guidelines.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">University&#8217;s gaussian paperwork<\/a>. <strong>Note<\/strong> &#8211; you <strong>must<\/strong> sign the appropriate section(s) in <strong>ink<\/strong> (anything else will be rejected). <strong>PLEASE NOTE:<\/strong> the PDF is only available if <strong>on campus or running GlobalProtect<\/strong>. If you cannot access the PDF please request a copy via our <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/help\/\">help form<\/a>.)<\/li>\n<li>Scan in the <strong>entire document<\/strong> (yes, even the pages you didn&#8217;t sign) and send it to us via our <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/help\/\">help form<\/a> (please do not email &#103;&#x61;&#x75;s&#115;&#x69;a&#110;&#x40;m&#97;&#x6e;c&#104;&#x65;&#x73;&#116;&#x65;&#x72;&#46;&#97;&#x63;&#46;&#117;&#x6b; as that address does not handle CSF access ) to request being added to the g09 gaussian group on CSF, attaching a scanned copy of the completed paperwork (the whole document). Anything other than the entire document will be rejected and lead to a delay in your access to Gaussian.<\/li>\n<li>We will add your paperwork to the ITS database of Gaussian users, add you to the appropriate group on the CSF and then send a confirmation to you.<\/li>\n<\/ol>\n<p>Please ensure you follow the above instructions carefully. We are required by the University License Manager to follow the above procedure. Failure to supply the requested information correctly will delay your access to the software.<\/p>\n<p><strong>This paperwork does not enable access to Gaussian 16. Please see the <a href=\"\/csf3\/software\/applications\/gaussian16\/\">CSF gaussian 16 webpage<\/a> for more info.<\/strong><\/p>\n<h2>Set up procedure<\/h2>\n<p>After being added to the relevant unix group, you will be able to access the executables by loading the modulefile<\/p>\n<p>For g09:<\/p>\n<pre>module load gaussian\/g09d01_em64t\r\n<\/pre>\n<p>We recommend you do this in your jobscript, see examples below (not on the command line before job submission as per the previous CSF2).<\/p>\n<p>Gaussian <strong>MUST ONLY<\/strong> be run in batch. Please <strong>DO NOT<\/strong> run g09 on the login nodes. Computational work found to be running on the login nodes will be killed <strong>WITHOUT WARNING<\/strong>.<\/p>\n<h2>Gaussian Scratch<\/h2>\n<p>Gaussian uses an environment variable <code>$GAUSS_SCRDIR<\/code> to specify a directory path for where to write <em>scratch<\/em> (temporary) files (two-electron integral files, integral derivative files and a <em>read-write<\/em> file for temporary workings). It is set to your <em>scratch<\/em> directory (<code>~\/scratch<\/code>) when you load the modulefile. This is a Lustre filesystem which provides good I\/O performance. Do not be tempted to use your home directory for Gaussian scratch files &#8211; the files can be huge making the home area at risk of going over quota. We also recommend using a directory-per-job in your scratch area. See below for how to do this.<\/p>\n<p>A faster, but smaller, local <code>\/tmp<\/code> on each compute node is available should users prefer to use that. It can be more efficient if you have a need to create lots of small files, but space is limited. The minimum <code>\/tmp<\/code> on intel compute nodes is 800GB, the largest is 3.5TB.<\/p>\n<p>Gaussian <em>should<\/em> delete scratch files automatically when a job completes successfully or dies cleanly. However, it often fails to do this. Scratch files are also <em>not<\/em> deleted when a job is killed externally or terminates abnormally so that you can use the scratch files to restart the job (if possible). Consequently, leftover files may accumulate in the scratch directory, and it is your responsibility to delete these files. Please <strong>check periodically<\/strong> whether you have a lot of temporary Gaussian files that can be deleted.<\/p>\n<h3>Using a Scratch Directory per Job<\/h3>\n<p>We now recommend using a different scratch directory for each job. This improves file access times if you run many jobs &#8211; writing 1000s of scratch files to a single directory can slow down your jobs. It is much better to create a directory <em>for each<\/em> job within your <code>scratch<\/code> area. It is also then easy to delete the entire directory if Gaussian has left unwanted scratch files behind.<\/p>\n<p>The example jobscripts below show how to use this method (it is simple &#8211; just two extra lines in your jobscript).<\/p>\n<h3>Very large Gaussian scratch files<\/h3>\n<p>Occasionally some jobs create <code>.rwf<\/code> files which are very large (several TB). The batch system will not permit a job to create files bigger than 4TB. If your gaussian job fails and the <code>.rwf<\/code> file is 4TB then it may be that this limit has prevented your job from completing. You should re-run the job and in your input file request that the <code>.rwf<\/code> file be split into multiple files. For example to split the file into two 3TB files:<\/p>\n<pre>%rwf=\/scratch\/$USER\/myjob\/one.rwf,3000GB,\/scratch\/$USER\/myjob\/two.rwf,3000GB\r\n<\/pre>\n<h2>Serial batch job<\/h2>\n<p>In the examples below we give example jobscripts using the BASH shell (the default used by most CSF users) and also the C shell, which is popular amongst computational chemists.<\/p>\n<h3>Example job submission<\/h3>\n<p>It is recommended you run from within your <code>scratch<\/code> area and use one directory per job:<\/p>\n<pre>cd ~\/scratch\r\nmkdir job1\r\ncd job1\r\n<\/pre>\n<p>Create a job script, for example:<\/p>\n<ul>\n<li>BASH shell verison:\n<pre>#!\/bin\/bash --login\r\n#SBATCH -p serial      # (or --partition) Single-core job\r\n#SBATCH -n 1           # (or --ntasks=) Number of cores (always 1)\r\n\r\n# Load g09\r\nmodule load gaussian\/g09d01_em64t\r\n\r\n## Set up scratch dir (please do this!)\r\nexport GAUSS_SCRDIR=\/scratch\/$USER\/gau_temp_$SLURM_JOB_ID\r\nmkdir -p $GAUSS_SCRDIR\r\n\r\n## Say how much memory to use (4GB per core)\r\nexport GAUSS_MDEF=$((SLURM_NTASKS*4))GB\r\n\r\n$g09root\/g09\/g09 &lt; file.inp &gt; file.out\r\n<\/pre>\n<\/li>\n<li>C shell version:\n<pre>#!\/bin\/csh\r\n#SBATCH -p serial    # (or --partition) Single-core job\r\n#SBATCH -n 1         # (or --ntasks=) Number of cores (always 1)\r\n\r\n# Load g09 \r\nmodule load gaussian\/g09d01_em64t\r\n\r\n# Set up scratch dir (please do this!)\r\nsetenv GAUSS_SCRDIR \/scratch\/$USER\/gau_temp_$SLURM_JOB_ID\r\nmkdir -p $GAUSS_SCRDIR\r\n\r\n## Say how much memory to use (4GB per core)\r\n@ mem = ( $SLURM_NTASKS * 4 )\r\nsetenv GAUSS_MDEF ${mem}GB\r\n\r\n$g09root\/g09\/g09 &lt; file.inp &gt; file.out\r\n<\/pre>\n<\/li>\n<\/ul>\n<p>Submit with the command:<\/p>\n<pre>sbatch <em>scriptname<\/em><\/pre>\n<p>where <em>scriptname<\/em> is the name of your job script.<\/p>\n<p>When the job has finished check whether Gaussian has left behind unwanted scratch files (you&#8217;ll need to know the job id). For example, assuming your job id was 456789:<\/p>\n<pre>cd ~\/scratch\/gau_temp_456789\r\nls\r\nGau-21738.inp  Gau-21738.chk  Gau-21738.d2e  Gau-21738.int  Gau-21738.scr\r\n\r\n# Example: Remove a specific scratch file\r\nrm Gau-21738.scr\r\n\r\n# Example: Remove all files in the directory (use with caution)\r\nrm Gau*\r\n\r\n# Example: go up and remove the empty directory\r\ncd ..\r\nrmdir gau_temp_456789\r\n<\/pre>\n<h2>Parallel batch job<\/h2>\n<p>On the CSF Gaussian is a multi-threaded application (shared memory) only, so a job will <strong>not<\/strong> run across multiple compute nodes. Hence you are limited to a maximum of 40 cores. This means that you <em>must<\/em> run in the <code>multicore<\/code> <em>partition<\/em> to confine your job to a single node.<\/p>\n<p>Follow the steps below to submit a parallel Gaussian job.<\/p>\n<h3>Important Information About Requesting cores<\/h3>\n<table class=\"hint\">\n<tbody>\n<tr>\n<td>You MUST declare the number of cores for your job twice &#8211; via the <code>#SBATCH -n<\/code> request in your jobscript <em>and<\/em> using a Gaussian specific environment variable, also set in the jobscript. See below for further details and examples.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Old method<\/strong>: We <em>used<\/em> to advise setting the number of cores to use for a job in the Gaussian input file using <code>%NProcsShared<\/code> or <code>%nprocs<\/code>. But this can easily lead to mistakes &#8211; if you change the number of cores in the jobscript but forget to also change it in the Gaussian input file you will either use too few cores (some of the cores your job requested are sat idle) or too many cores (your job is trying to use cores it shouldn&#8217;t, possibly trampling on another user&#8217;s job).<\/p>\n<p><strong>New method<\/strong>: We now recommend setting the <code>GAUSS_PDEF<\/code> environment variable in your jobscript (set it to <code>$SLURM_NTASKS<\/code>) so that it always tells Gaussian the correct number of cores to use. This also means you don&#8217;t have to keep editing your Gaussian input file each time you want to run the input deck with a different number of cores.<\/p>\n<p>For example, depending which <em>shell<\/em> you use (look at the first line of your jobscript to find out):<\/p>\n<pre># If using BASH (the default shell used by most CSF users):\r\nexport GAUSS_PDEF=$SLURM_NTASKS\r\n\r\n# If using CSH (the 'traditional' shell used by chemistry users):\r\nsetenv GAUSS_PDEF $SLURM_NTASKS\r\n<\/pre>\n<p>Remember that <code>$SLURM_NTASKS<\/code> is automatically set by the batch system to the number of cores you requested on the <code>#SBATCH -n<\/code> line in the jobscript. Hence there is only one number-of-cores to change if you want to run the job with a different number of cores.<\/p>\n<p>Note: <code>%NProcShared<\/code> in the input file takes precedence over <code>GAUSS_PDEF<\/code>, so one could override the latter by setting <code>%NProcShared<\/code> in the input file. If you are using our recommended method of setting <code>GAUSS_PDEF<\/code> in the jobscript, please remove any <code>%NProcShared<\/code> line from your Gaussian input files.<\/p>\n<h3>Example job submission<\/h3>\n<table class=\"hint\">\n<tbody>\n<tr>\n<td>You MUST declare the number of cores for your job twice &#8211; via the <code>#SBATCH -n<\/code> request in your jobscript and using a Gaussian specific variable, also set in the jobscript. See the above explanation for further details.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>It is recommended you run from within your <code>scratch<\/code> area and use one directory per job:<\/p>\n<pre>cd ~\/scratch\r\nmkdir job1\r\ncd job1\r\n<\/pre>\n<p>Create a job script, for example:<\/p>\n<ul>\n<li>BASH shell verison:\n<pre>#!\/bin\/bash --login\r\n#SBATCH -p multicore      # (or --partition) Single-node multicore\r\n#SBATCH -n 20             # (or --ntasks=) Number of cores (2--40)\r\n\r\n# Load g09\r\nmodule load gaussian\/g09d01_em64t\r\n\r\n## Set up scratch dir (please do this!)\r\nexport GAUSS_SCRDIR=\/scratch\/$USER\/gau_temp_$SLURM_JOB_ID\r\nmkdir -p $GAUSS_SCRDIR\r\n\r\n## Say how much memory to use (4GB per core)\r\nexport GAUSS_MDEF=$((SLURM_NTASKS*4))GB\r\n\r\n## Inform Gaussian how many cores to use\r\nexport GAUSS_PDEF=$SLURM_NTASKS\r\n\r\n$g09root\/g09\/g09 &lt; file.inp &gt; file.out\r\n<\/pre>\n<\/li>\n<li>C shell version:\n<pre>#!\/bin\/csh         \r\n#SBATCH -p multicore      # (or --partition) Single-node multicore\r\n#SBATCH -n 20             # (or --ntasks=) Number of cores (2--40)\r\n\r\n# Load g09\r\nmodule load gaussian\/g16c01_em64t_detectcpu\r\n\r\n# Set up scratch dir (please do this!)\r\nsetenv GAUSS_SCRDIR \/scratch\/$USER\/gau_temp_$SLURM_JOB_ID\r\nmkdir -p $GAUSS_SCRDIR\r\n\r\n## Say how much memory to use (4GB per core)\r\n@ mem = ( $SLURM_NTASKS * 4 )\r\nsetenv GAUSS_MDEF ${mem}GB\r\n\r\n## Inform Gaussian how many cores to use\r\nsetenv GAUSS_PDEF $SLURM_NTASKS\r\n\r\n$g09root\/g09\/g09 &lt; file.inp &gt; file.out\r\n<\/pre>\n<\/li>\n<\/ul>\n<p>Submit with the command:<\/p>\n<pre>sbatch <em>scriptname<\/em><\/pre>\n<p>where <em>scriptname<\/em> is the name of your job script.<\/p>\n<h3>GAUSS_PDEF vs GAUSS_CDEF<\/h3>\n<p>Gaussian has two environment variables that can be used to say how many cores to use. We saw the <code>GAUSS_PDEF<\/code> variable above. Alternatively the <code>GAUSS_CDEF<\/code> variable can be set but this must <em>only<\/em> be used when you are using <em>all<\/em> of the cores on a compute node. If you are unsure whether your job does this, please use the <code>GAUSS_PDEF<\/code> variable as shown above.<\/p>\n<p>The <code>GAUSS_CDEF<\/code> variable <em>may<\/em> give increased performance because it pins <code>g16<\/code> <em>threads<\/em> (used to do the parallel processing in Gaussian) to specific CPU cores. Without pinning Linux is free to move the threads between cores, although it tries not to do this. When a thread is moved it invalidates the low-level memory caches which may reduce performance.<\/p>\n<p>The <code>GAUSS_CDEF<\/code> variable uses a slightly different format to the <code>GAUSS_PDEF<\/code> variable, as shown below:<\/p>\n<pre>#SBATCH -p multicore      # (or --partition) Single-node multicore\r\n#SBATCH -n 40             # (or --ntasks=) Use all 40 cores in a cascade lake node\r\n\r\n# Say which cores to use, e.g., 0-39 (BASH shell):\r\nexport GAUSS_CDEF=0-$((SLURM_NTASKS-1))\r\n\r\n# Say which cores to use, e.g., 0-39 (C shell):\r\n@ maxcore = ( $SLURM_NTASKS - 1 )\r\nsetenv GAUSS_CDEF 0-$maxcore\r\n<\/pre>\n<p>Reminder: the <code>GAUSS_CDEF<\/code> variable should only be used when you are using <em>all<\/em> cores on a compute node. Jobs found to be using this variable incorrectly will be killed without warning because you will be slowing down other users&#8217; jobs.<\/p>\n<h2>Further info<\/h2>\n<ul>\n<li>The <a href=\"http:\/\/www.applications.itservices.manchester.ac.uk\/show_product.php?id=22\">IT Services Gaussian webpage<\/a> contains important information applicable to all users of the software.<\/li>\n<li><a href=\"http:\/\/www.gaussian.com\/\">Gaussian Inc. <\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Gaussian is a general purpose suite of electronic structure programs. Version g09d01 is installed. It is available as binaries only. The source code is not available on the CSF. If you want information about Gaussian 16 on the CSF please see our G16 docs. Restrictions on use &#8211; G09 ONLY The University of Manchester site license allows access for all staff and students of the university, however strict licensing restrictions require that all users who.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/software\/applications\/gaussian09\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":49,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1034","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages\/1034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/comments?post=1034"}],"version-history":[{"count":12,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages\/1034\/revisions"}],"predecessor-version":[{"id":1383,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages\/1034\/revisions\/1383"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/pages\/49"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf4\/wp-json\/wp\/v2\/media?parent=1034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}