Gaussian¶
Introduction¶
Gaussian provides state-of-the-art capabilities for electronic structure modeling. Gaussian provides a wide-ranging suite of the most advanced modeling capabilities available. Starting from the fundamental laws of quantum mechanics, Gaussian predicts the energies, molecular structures, vibrational frequencies, and molecular properties of compounds and reactions in a wide variety of chemical environments. Gaussians models can be applied to both stable species and compounds that are difficult or impossible to observe experimentally.
For more information, see the official webpage.
License¶
Gaussian software package is available to all users that are not in direct or indirect competition with the Gaussian Inc. company and have a valid AUP with the IT4Innovations National Supercomputing Center. The license includes GPU support and Linda parallel environment for Gaussian multi-node parallel execution.
Note
You need to be a member of the gaussian group. Contact support[at]it4i.cz in order to get included in the gaussian group.
Check your group membership:
$ id
uid=1000(user) gid=1000(user) groups=1000(user),1234(open-0-0),7310(gaussian)
Installed Version¶
The following versions of Gaussian is available on Karolina, Barbora, and DGX-2 systems.
Module | CPU support | GPU support | Parallelization | Note | Barbora | DGX-2 | Karolina |
---|---|---|---|---|---|---|---|
Gaussian/09-a02 | AVX2 | No | SMP + Linda | IT4I compiled | Yes | No | No |
Gaussian/09-d01 | AVX2 | No | SMP + Linda | IT4I compiled | Yes | No | No |
Gaussian/16_rev_c0-binary | AVX2 | Yes | SMP | Binary distribution | Yes | Yes | No |
Gaussian/16_rev_c0-binary-Linda | AVX2 | Yes | SMP + Linda | Binary distribution | Yes | No | No |
Gaussian/16_rev_c0-CascadeLake | AVX-512 | No | SMP | IT4I compiled | Yes | No | No |
Gaussian/16_rev_c0-CascadeLake-Linda | AVX-512 | No | SMP + Linda | IT4I compiled | Yes | No | No |
Gaussian/16_rev_c0-GPU-Linda | AVX2 | Yes | SMP + Linda | IT4I compiled | Yes | No | No |
Gaussian/16_rev_c0-GPU | AVX2 | Yes | SMP | IT4I compiled | No | Yes | No |
Gaussian/16_rev_c0-Linda | AVX2 | No | SMP + Linda | IT4I compiled | No | No | No |
Gaussian/16_rev_c0 | AVX2 | No | SMP + Linda | IT4I compiled | No | No | No |
Gaussian/16_rev_c2 | AVX2 | Yes | SMP + Linda | IT4I compiled | No | No | Yes |
Speedup may be observed on Barbora and DGX-2 systems when using the CascadeLake
and GPU
modules compared to the binary
module.
Running¶
Gaussian is compiled for single node parallel execution as well as multi-node parallel execution using Linda. GPU support for V100 cards is available on Barbora and DGX-2.
Note
By default, the execution is single-core, single-node, and without GPU acceleration.
Shared-Memory Multiprocessor Parallel Execution (Single Node)¶
Load module
$ ml Gaussian/16_rev_c0-binary
In the input file Link0 header section, set the CPU cores (e.g. 36 for Barbora, 48 for DGX-2) and memory amount.
%CPU=0-35
%Mem=8GB
Cluster/Network Parallel Execution (Multi Node)¶
Load Linda-enabled module
$ ml Gaussian/16_rev_c0-binary-Linda
The network parallelization environment is Linda.
In the input file Link0 header section, set the CPU cores (e.g. 36 for Barbora, 48 for DGX-2) and memory amount.
Include the %UseSSH
keyword, as well. This enables Linda to spawn parallel workers.
%CPU=0-35
%Mem=8GB
%UseSSH
The number and placement of Linda workers may be controlled by %LindaWorkers keyword or by
GAUSS_WDEF environment variable. When running multi-node job via the batch queue, loading
the Linda-enabled module automatically sets the GAUSS_WDEF
variable to the correct node-list, using one worker per node.
In combination with the %CPU keyword, this enables a full-scale multi-node execution.
$ echo $GAUSS_WDEF
If a different amount of Linda workers is required, unset or modify the GAUSS_WDEF environment variable accordingly.
GPU-Accelerated Execution (Single Node/Multi Node)¶
Karolina¶
Karolina is equipped with NVIDIA A100 GPUs and the Ampere architecture requires new CUDA and compiler versions which are supported by the module Gaussian/16_rev_c2
.
Barbora¶
On Barbora, the GPU acceleration may be combined with the Linda parallelization. Load Linda-enabled binary module:
$ ml Gaussian/16_rev_c0-binary-Linda
or GPU-enabled module:
$ ml Gaussian/16_rev_c0-GPU-Linda
In the input file Link0 header section, set the CPU cores (24 for Barbora GPU nodes) and memory.
To enable GPU acceleration, set the %GPUCPU
keyword. This keyword activates GPU accelerators and dedicates CPU cores to drive the GPU accelerators.
On Barbora GPU nodes, we activate GPUs 0-3 and assign cores 0, 2, 12, 14 (two from each CPU socket) to drive the accelerators.
If multi-node computation is intended, include the %UseSSH
keyword, as well. This enables Linda to spawn parallel workers.
%CPU=0-23
%GPUCPU=0-3=0,2,12,14
%Mem=8GB
%UseSSH
DGX-2¶
GPU-accelerated calculations on the DGX-2 are supported with Gaussian binary module:
$ ml Gaussian/16_rev_c0-binary
Or IT4I-compiled module
$ ml Gaussian/16_rev_c0-GPU
In the input file Link0 header section, modify the %CPU
keyword to 48 cores and the %GPUCPU
keyword to 16 GPU accelerators. Omit the Linda.
%CPU=0-47
%GPUCPU=0-15=0,2,4,6,8,10,12,14,24,26,28,30,32,34,36,38
%Mem=512GB
Example Input File¶
This example input file sets water molecule geometry optimization and vibrational frequencies computation using 36 cores (on Barbora supercomputer) and Linda parallelization.
%CPU=0-35
%Mem=8GB
%UseSSH
#p rb3lyp/6-31G* test opt freq
Gaussian Test Job:
WATER H20 optimization
0 1
O
H 1 R
H 1 R 2 A
R 0.96
A 109.471221
Run Gaussian (All Modes)¶
Set a scratch directory:
$ GAUSS_SCRDIR=/scratch/project/open-0-0/GaussianJob # on Barbora
Copy files from a local home to the scratch directory:
cp * $GAUSS_SCRDIR/
Run Gaussian:
cd $GAUSS_SCRDIR
g16 < input.inp > output.out
After the calculation, you can move the data back to your home directory and delete the scratch folder. For more details, see the Gaussian documentation.
Example Jobscript¶
This jobscript will run parallel Gaussian job on Barbora supercomputer, using 4 nodes (4*36 = 144 cores) via Linda. The Linda workers are set up automatically by the module load.
#!/bin/bash
#SBATCH --account=PROJECT_ID
#SBATCH --partition=qcpu
#SBATCH --job-name=MY_JOB
#SBATCH --nodes=4
# change to workdir
cd $$SLURM_SUBMIT_DIR
# load Gaussian Linda enabled module and set up Linda
ml Gaussian/16_rev_c0-binary-Linda
# create scratch folder and copy input files
GAUSS_SCRDIR=/scratch/work/project/open-0-0/GaussianJob
mkdir -p $GAUSS_SCRDIR
cd $GAUSS_SCRDIR || exit
cp $SLURM_SUBMIT_DIR/* .
# run Gaussian calculation
# g16 < input.inp > output.out
# run Gaussian from stdin
g16 << EOF > output.out
%CPU=0-35
%Mem=8GB
%UseSSH
#p rb3lyp/6-31G* test opt freq
Gaussian Test Job:
WATER H20 optimization
0 1
O
H 1 R
H 1 R 2 A
R 0.96
A 109.471221
EOF
# copy output files to home
cp * $SLURM_SUBMIT_DIR/. && cd ../
# delete scratch directory
rm -rf $GAUSS_SCRDIR
#end
exit