GAMESS-US: Difference between revisions

Marked this version for translation
(mark for translation)
(Marked this version for translation)
Line 2: Line 2:


<translate>
<translate>
<!--T:1-->
[[Category:Software]]
[[Category:Software]]


<!--T:2-->
The General Atomic and Molecular Electronic Structure System (GAMESS)
The General Atomic and Molecular Electronic Structure System (GAMESS)
<ref name="homepage">GAMESS Homepage: http://www.msg.ameslab.gov/gamess/</ref>  
<ref name="homepage">GAMESS Homepage: http://www.msg.ameslab.gov/gamess/</ref>  
is a general ''ab initio'' quantum chemistry package.
is a general ''ab initio'' quantum chemistry package.


== Running GAMESS ==  
== Running GAMESS == <!--T:3-->


=== Job submission ===
=== Job submission === <!--T:4-->
Compute Canada clusters use the Slurm scheduler. For more about submitting and monitoring jobs,  
Compute Canada clusters use the Slurm scheduler. For more about submitting and monitoring jobs,  
see [[Running jobs]].
see [[Running jobs]].


<!--T:5-->
The first step is to prepare a GAMESS input file containing the molecular geometry and a specification of the calculation to be carried out.  Please refer to the GAMESS Documentation <ref name="gamess-docs">Documentation: http://www.msg.ameslab.gov/gamess/documentation.html</ref>
The first step is to prepare a GAMESS input file containing the molecular geometry and a specification of the calculation to be carried out.  Please refer to the GAMESS Documentation <ref name="gamess-docs">Documentation: http://www.msg.ameslab.gov/gamess/documentation.html</ref>
and particularly Chapter 2 "Input Description"<ref name="gamess-input">Input Description (PDF): http://www.msg.ameslab.gov/gamess/GAMESS_Manual/input.pdf</ref> for a description the file format and keywords.
and particularly Chapter 2 "Input Description"<ref name="gamess-input">Input Description (PDF): http://www.msg.ameslab.gov/gamess/GAMESS_Manual/input.pdf</ref> for a description the file format and keywords.


<!--T:6-->
Besides your input file (in our example, "name.inp"), you have to prepare a job script to define the compute resources for the job. Input file and job script must be in the same directory.
Besides your input file (in our example, "name.inp"), you have to prepare a job script to define the compute resources for the job. Input file and job script must be in the same directory.


<!--T:7-->
{{File
{{File
   |name=gamess_job.sh
   |name=gamess_job.sh
Line 28: Line 33:
#SBATCH --time=0-00:30          # time (DD-HH:MM)
#SBATCH --time=0-00:30          # time (DD-HH:MM)


<!--T:8-->
export SLURM_CPUS_PER_TASK
export SLURM_CPUS_PER_TASK
## Uncomment the following two lines to use /scratch instead of local disk
## Uncomment the following two lines to use /scratch instead of local disk
Line 33: Line 39:
#mkdir -p $SCR
#mkdir -p $SCR


<!--T:9-->
module load gamess-us/20170420-R1
module load gamess-us/20170420-R1
rungms name.inp  &>  name.out
rungms name.inp  &>  name.out
}}
}}


<!--T:10-->
Use the following command to submit the job to the scheduler:
Use the following command to submit the job to the scheduler:


   sbatch gamess_job.sh
   <!--T:11-->
sbatch gamess_job.sh


=== Scratch files ===
=== Scratch files === <!--T:12-->


<!--T:13-->
By default, scratch files will be written to local disk on the compute node. We expect this to give the best performance. If there is insufficient space on local disk, you can use /scratch instead by setting the <code>SCR</code> environment variable as shown in the comments in the example above.
By default, scratch files will be written to local disk on the compute node. We expect this to give the best performance. If there is insufficient space on local disk, you can use /scratch instead by setting the <code>SCR</code> environment variable as shown in the comments in the example above.


=== Running GAMESS on multiple CPUs ===
=== Running GAMESS on multiple CPUs === <!--T:14-->


<!--T:15-->
GAMESS calculations can make use of more than one CPU. The number of CPUs  
GAMESS calculations can make use of more than one CPU. The number of CPUs  
available for a calculation is determined by the <code>--cpus-per-task</code>  
available for a calculation is determined by the <code>--cpus-per-task</code>  
setting in the job script.  
setting in the job script.  


<!--T:16-->
As GAMESS has been built using [https://en.wikipedia.org/wiki/Unix_domain_socket sockets] for parallelization, it can only
As GAMESS has been built using [https://en.wikipedia.org/wiki/Unix_domain_socket sockets] for parallelization, it can only
use CPU cores that are located on the same compute node. Therefore  
use CPU cores that are located on the same compute node. Therefore  
Line 56: Line 68:
the size of the nodes in the cluster, e.g. 32 CPU cores per node on [[Graham]].
the size of the nodes in the cluster, e.g. 32 CPU cores per node on [[Graham]].


<!--T:17-->
Quantum chemistry calculations are known to not scale well to large numbers
Quantum chemistry calculations are known to not scale well to large numbers
of CPUs as compared to e.g. classical molecular mechanics, which means  
of CPUs as compared to e.g. classical molecular mechanics, which means  
Line 62: Line 75:
basis functions, and the level of theory.
basis functions, and the level of theory.


<!--T:18-->
To determine a reasonable number of CPUs to use, one needs to run a scaling  
To determine a reasonable number of CPUs to use, one needs to run a scaling  
test--- That is, run the same input file using different numbers of CPUs  
test--- That is, run the same input file using different numbers of CPUs  
Line 70: Line 84:
calculations to run slower when increasing the number of CPUs.
calculations to run slower when increasing the number of CPUs.


=== Memory ===
=== Memory === <!--T:19-->


<!--T:20-->
Quantum chemistry calculations are often "memory bound"--- meaning that
Quantum chemistry calculations are often "memory bound"--- meaning that
larger molecules at high level of theory need a lot of memory (RAM),  
larger molecules at high level of theory need a lot of memory (RAM),  
Line 78: Line 93:
results to free up memory, reading them back from disk later in the calculation.
results to free up memory, reading them back from disk later in the calculation.


<!--T:21-->
Even our fastest SCRATCH storage is several orders of magnitudes slower
Even our fastest SCRATCH storage is several orders of magnitudes slower
than the memory, so you should make sure to assign sufficient memory to GAMESS.
than the memory, so you should make sure to assign sufficient memory to GAMESS.
This is a two-step process:  
This is a two-step process:  


<!--T:22-->
# Request memory for the job in the submission script. Using <code>--mem-per-cpu=4000M</code> is a reasonable value, since it matches the memory-to-CPU ratio on the base nodes. Requesting more than that may cause the job to wait to be scheduled on a large-memory node.
# Request memory for the job in the submission script. Using <code>--mem-per-cpu=4000M</code> is a reasonable value, since it matches the memory-to-CPU ratio on the base nodes. Requesting more than that may cause the job to wait to be scheduled on a large-memory node.


<!--T:23-->
# In the <code>$SYSTEM group</code> of the input file, define the <code>MWORDS</code> and <code>MEMDDI</code> options.  This tells GAMESS how much memory it is allowed to use.  
# In the <code>$SYSTEM group</code> of the input file, define the <code>MWORDS</code> and <code>MEMDDI</code> options.  This tells GAMESS how much memory it is allowed to use.  
#* <code>MWORDS</code> is the maximum replicated memory which a job can use, on every core. This is given in units of 1,000,000 words (as opposed to 1024*1024 words), and a word is defined as 64 bits = 8 bytes.  
#* <code>MWORDS</code> is the maximum replicated memory which a job can use, on every core. This is given in units of 1,000,000 words (as opposed to 1024*1024 words), and a word is defined as 64 bits = 8 bytes.  
#* <code>MEMDDI</code> is the grand total memory needed for the distributed data interface (DDI) storage, given in units of 1,000,000 words. The memory required on each processor core for a run using <tt>p</tt> CPU-cores is therefore <tt>MEMDDI/p + MWORDS</tt>.  
#* <code>MEMDDI</code> is the grand total memory needed for the distributed data interface (DDI) storage, given in units of 1,000,000 words. The memory required on each processor core for a run using <tt>p</tt> CPU-cores is therefore <tt>MEMDDI/p + MWORDS</tt>.  


<!--T:24-->
Please refer to the <code>$SYSTEM group</code> section in the GAMESS documentation<ref name="gamess-input" /> if you want more details.
Please refer to the <code>$SYSTEM group</code> section in the GAMESS documentation<ref name="gamess-input" /> if you want more details.


<!--T:25-->
It is important to leave a few hundred MB of memory between the memory requested from the scheduler and the memory that GAMESS is allowed to use, as a safety margin.  If the <code>slurm-{JOBID}.out</code> file contains a message like "slurmstepd: error: Exceeded step/job memory limit at some point",then Slurm has terminated the job for trying to use more memory than was requested. In that case one needs to either reduce the <code>MWORDS</code> or <code>MEMDDI</code> in the input file or increase the <code>--mem-per-cpu</code> in the submission script.
It is important to leave a few hundred MB of memory between the memory requested from the scheduler and the memory that GAMESS is allowed to use, as a safety margin.  If the <code>slurm-{JOBID}.out</code> file contains a message like "slurmstepd: error: Exceeded step/job memory limit at some point",then Slurm has terminated the job for trying to use more memory than was requested. In that case one needs to either reduce the <code>MWORDS</code> or <code>MEMDDI</code> in the input file or increase the <code>--mem-per-cpu</code> in the submission script.


== References ==
== References == <!--T:26-->
<references />
<references />


</translate>
</translate>
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits