Turing: CP2K

Introduction

CP2K is a free software (GPL) written in Fortran 95. This chemistry software carries out atomic and molecular simulations in different states (solid, liquid, …) through various methodological means (DFT with GPW approach, classical pair potentials, …).

This product is continually being modified on the www.cp2k.org site and is accessible through an SVN repository which gives access to all of the versions.

Availability

CP2K software is installed at IDRIS on the Turing machine. Use the module avail cp2k command to consult all of the installed versions.

The old versions are designated as follows: version-number_SVN-revision-number.

The program has been compiled in parallel MPI and/or hybrid MPI-OpenMP. The following versions are available:

  • 2.3_12343 (MPI and hybrid)
  • 2.4.0_12993 (Hybrid)
  • 2.5.1_13632 (Default version, hybrid, includes the ELPA library)
  • 2.6.0 (Hybrid, includes the ELPA library)

The binaries are called cp2k.popt for the MPI version and cp2k.psmp for the MPI/OpenMP hybrid version.

Launching script

The use of the module command allows placing yourself in the environment adapted to CP2K. The module load cp2k command loads the default version. If you wish to use a different one, refer to command module documentation.

Here is an example of a hybrid submission script executed in the WORKDIR :

job.ll
# @ job_name         = CP2K
# @ job_type         = BLUEGENE
# @ output           = $(job_name).$(jobid)
# @ error            = $(job_name).$(jobid)
# @ wall_clock_limit = 1:00:00
# @ bg_size          = 64
# @ queue
 
### Module initialisation ###
module load cp2k
 
### Command echoes ###
set -x
 
### Run the calculation ###
runjob --np 1024 --ranks-per-node=16 --envs "OMP_NUM_THREADS=4" : $CP2K_EXEDIR/cp2k.psmp fichier_entrée

Here is an example of an MPI submission script for a computation executed in the TMPDIR :

job.ll
# @ job_name         = CP2K
# @ job_type         = BLUEGENE
# @ output           = $(job_name).$(jobid)
# @ error            = $(job_name).$(jobid)
# @ wall_clock_limit = 1:00:00
# @ bg_size          = 64
# @ queue
 
### Module initialisation ###
module load cp2k/2.3_12343
 
### Command echoes ###
set -x
 
### Copy to the TMPDIR ###
cp ./* $TMPDIR
 
### Run the calculation ###
cd $TMPDIR
runjob --np 2048 --ranks-per-node=32 : $CP2K_EXEDIR/cp2k.popt fichier_entrée
 
### Copy to the submission folder ###
cd -
cp $TMPDIR/* .

Specific software parameters

It is strongly advised to use the binaries compiled in the MPI/OpenMP hybrid mode on Turing for performance reasons (see the submission script examples above) because of the very specfic architecture of this machine. For more information, consult the dedicated page at process mapping on Turing.

Load balancing

In order for the data to be distributed among the MPI processes in the most equitable way, you can add the following to your entry file:

&FORCE_EVAL 
 &DFT
  &MGRID
     SKIP_LOAD_BALANCE_DISTRIBUTED .FALSE.
  &END MGRID
 &END DFT
&END FORCE_EVAL

ELPA Library

The ELPA library, specialised in the calculation of eigenvalues, is integrated into the 2.5 version of CP2K. Depending on the nature of your system and the type of calculation which you wish to execute, this library will permit a reduction in elapsed time. To activate it, you need to add the following to your entry file:

&GLOBAL
   PREFERRED_DIAG_LIBRARY ELPA
&END GLOBAL

If this is not activated, the ScaLAPACK library is used by default.