CP2K is a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems. CP2K provides a general framework for different modeling methods such as DFT using the mixed Gaussian and plane waves approaches GPW and GAPW. Supported theory levels include DFTB, LDA, GGA, MP2, RPA, semi-empirical methods (AM1, PM3, PM6, RM1, MNDO, ...), and classical force fields (AMBER, CHARMM, ...). CP2K can do simulations of molecular dynamics, metadynamics, Monte Carlo, Ehrenfest dynamics, vibrational analysis, core level spectroscopy, energy minimization, and transition state optimization using NEB or dimer method.
The following requirements must be met before running the NGC CP2k container:
DOCKER="docker run -it --rm --gpus all --shm-size 32Gb -v ${PWD}:/host_pwd --workdir /host_pwd nvcr.io/hpc/cp2k:v9.1.0
DOCKER="docker run -it --rm -v ${PWD}:/host_pwd --workdir /host_pwd --gpus all --shm-size 32Gb --device=/dev/infiniband --cap-add=IPC_LOCK --net=host nvcr.io/hpc/cp2k:v9.1.0
Benchmarks: in /opt/cp2k/benchmarks/ Run
'MPI_PER_GPU=X mpirun -n X*Y binder.sh cp2k.psmp -i <testcase>'
with: X=number of MPI ranks per GPU, 2-4 typically performs best
Y=number of GPUs on your system
testcase to choose in the list below.
Linear Scaling SCF, a benchmark that is CPU and H2D bound: in ./QS_DM_LS/ :
- H2O-dft-ls.NREP2.inp (small, 16 GB total, eg. run on 1xV100 or 1xP100)
- H2O-dft-ls.NREP4.inp (medium, 160 GB total, eg. run on 4xA100)
- you can also adjust NREP in the test case header to change the size. in general size= NREP^3 * 2.5 GB
example:
MPI_PER_GPU=2 mpirun --bind-to none -n 2 binder.sh cp2k.psmp -i H2O-dft-ls.NREP2.inp
Random Phase Approximation (RPA), a benchmark that is FLOP-bound and uses the COSMA library: in ./QS_mp2_rpa/
- 32-H2O/H2O-32-RI-dRPA-TZ.inp (1-8 GPUs)
- 64-H2O/H2O-64-RI-dRPA-TZ.inp (4-128 GPUs)
- 128-H2O/H2O-128-RI-dRPA-TZ.inp (8-1024 GPUs)
example:
MPI_PER_GPU=8 mpirun --bind-to none -n 8 binder.sh cp2k.psmp -i H2O-32-RI-dRPA-TZ.inp
This example is loosely designed and can be modified and adapted to best fit your system architecture.
Save the NGC Gromacs container as a local Singularity image file:
$ singularity build cp2k_v9.1.0.sif docker://nvcr.io/hpc/cp2k:v9.1.0
The container is now saved in the current directory as cp2k_v9.1.0.sif
Define the SINGULARITY
command alias.
SINGULARITY="singularity run --nv -B ${PWD}:/host_pwd --pwd /host_pwd cp2k_v9.1.0.sif"
There is currently a bug in Singularity 3.1.x and 3.2.x causing the LD_LIBRARY_PATH
to be incorrectly set within the container environment.
As a workaround The LD_LIBRARY_PATH
must be unset before invoking Singularity:
$ LD_LIBRARY_PATH="" singularity exec ...