Sign inSign up

kimjoochan/cp2k

By kimjoochan

•Updated over 4 years ago

QM software CP2K v9.1 in psmp compiled for x86_64 CPU & A100 (sm_86) GPU

Image
1

95

kimjoochan/cp2k repository overview

⁠CP2K v9.1 built in Ubuntu 20.04.4

⁠HOW TO USE

You may generate the container from this image and run it as following:

$ nvidia-docker run -v "/**HOME_DIRECTORY**:/home" -v "/etc/localtime:/etc/localtime:ro" -e TZ=**YOUR_TIMEZONE** -v "/tmp/.X11-unix:/tmp/.X11-unix" -e QT_X11_NO_MITSHM=1 --shm-size=1g --env="DISPLAY" --net=host --gpus all --privileged -itd --name **CONTAINER_NAME** kimjoochan/cp2k:9.1 /bin/bash
$ docker exec -it **CONTAINER_NAME** /bin/bash

Then, use CP2K with cp2k.psmp prefix.

Enjoy computing!


⁠BUILD INFO

CP2K version 9.1
Source code revision git:d8d7100
cp2kflags: omp libint fftw3 libxc pexsi elpa elpa_nvidia_gpu parallel mpi3 scalapack cosma quip pw_cuda smm_dnn smm xsmm dbcsr_acc plumed2 spglib sirius libvori libbqb grid_cuda
compiler: GCC version 11.2.0

⁠HOW I BUILT THIS IMAGE

Built from nvidia/cuda:11.3.1-devel-ubuntu20.04 via following:

$ nvidia-docker run -v "/**HOME_DIRECTORY**:/home" -v "/etc/localtime:/etc/localtime:ro" -e TZ=Asia/Seoul -v "/tmp/.X11-unix:/tmp/.X11-unix" -e QT_X11_NO_MITSHM=1 --shm-size=1g --env="DISPLAY" --net=host --gpus all --privileged -itd --name CP2K nvidia/cuda:11.3.1-devel-ubuntu20.04 /bin/bash
$ docker exec -it CP2K /bin/bash

cp2k-9.1 tar ball was downloaded and moved to /mnt

: tar xf cp2k-9.1.tar.bz2
: cd cp2k-9.1/tools/toolchain
: ./install_requirements_ubuntu.sh
: apt-get update
: apt-get upgrade
: apt-get install libsvn-dev subversion-tools parallel sudo
: ldconfig 
: ./install_cp2k_toolchain.sh -j 16 --install-all --mpi-mode=openmpi --math-mode=openblas --gpu-ver=A100 --libint-lmax=7 --enable-cuda --with-mpich=no --with-intelmpi=no --with-openmpi

Will stop at ELPA installation step due to error. It happens because cudatoolkit library was not found on the path.

: export PATH=/usr/local/cuda-11.3/bin:$PATH
: export LD_LIBRARY_PATH=/usr/local/cuda-11.3/lib64:$LD_LIBRARY_PATH
: ./install_cp2k_toolchain.sh -j 16 --install-all --mpi-mode=openmpi --math-mode=openblas --gpu-ver=A100 --libint-lmax=7 --enable-cuda --with-mpich=no --with-intelmpi=no --with-openmpi
: cp /mnt/cp2k-9.1/tools/toolchain/install/arch/* /mnt/cp2k-9.1/arch/
: source /mnt/cp2k-9.1/tools/toolchain/install/setup
: nano /mnt/cp2k-9.1/arch/local_cuda.psmp

GPUVER variable was changed from A100 to V100.

: cd /mnt/cp2k-9.1
: make -j 32 ARCH=local_cuda VERSION=psmp

Then the following lines were added to the end of the /etc/bash.bashrc file.

source /mnt/cp2k-9.1/tools/toolchain/install/setup
export PATH=/user/local/cuda-11.3/bin:/mnt/cp2k-9.1/exe/local_cuda:$PATH

⁠For Regression Test

: adduser gromacs
: cd /etc
: chmod +wx sudoers
: nano sudoers

At the end of the file, the following line was added.

gromacs   ALL=(ALL)NOPASSWD:ALL

Now the user gromacs is sudo enabled.

: chmod -wx sudoers
: nano /mnt/cp2k-9.1/tools/regtesting/do_regtest.py

Default values of arguments such as --mpiranks, ---ompthreads, --maxtasks, --timeout was changed accordingly.

: cd /mnt/cp2k-9.1
: su gromacs
: make -j 128 ARCH=local_cuda VERSION=psmp test

Tag summary

Content type

Image

Digest

Size

10.3 GB

Last updated

over 4 years ago

docker pull kimjoochan/cp2k:9.1