Ada: 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 site www.cp2k.org and is accessible through an SVN repository which gives access to all of the versions.

Availability

The CP2K software is installed at IDRIS on the Ada machine. Use the command module avail cp2k 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)
  • 2.4_12578 (MPI, beta version)
  • 2.4.0_12993 (MPI and hybrid)
  • 2.5.1_13632 (default version, hybrid, includes the ELPA library)
  • 2.6.0 (hybrid, includes the ELPA library)
  • 3.0 (hybrid, ELPA)

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

Starting from version 3.0 poe cannot be used anymore. One has to use mpirun and the job_type = mpich.

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
# @ output           = $(job_name).$(jobid)
# @ error            = $(job_name).$(jobid)
# @ job_type         = parallel
# @ total_tasks      = 32
# @ parallel_threads = 4
# @ wall_clock_limit = 1:00:00
# @ queue
 
set -x
 
### Module initialisation ###
module load cp2k
 
### Command echoes ###
set -x
 
### Run the calculation ###
poe cp2k.psmp input_file

Here is an example of a hybrid submission script executed in the WORKDIR for CP2K >= 3.0 :

job.ll
# @ job_name         = CP2K
# @ output           = $(job_name).$(jobid)
# @ error            = $(job_name).$(jobid)
# @ job_type         = mpich
# @ total_tasks      = 32
# @ parallel_threads = 4
# @ environment = NTASKS=$(total_tasks)
# @ wall_clock_limit = 1:00:00
# @ queue
 
set -x
 
### Module initialisation ###
module load cp2k/3.0
module load intel/2015.2
 
### Command echoes ###
set -x
 
### Run the calculation ###
mpirun -np $NTASKS cp2k.psmp input_file

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

job.ll
# @ job_name         = CP2K
# @ job_type         = parallel
# @ output           = $(job_name).$(jobid)
# @ error            = $(job_name).$(jobid)
# @ wall_clock_limit = 01:00:00
# @ total_tasks      = 64
# @ queue
 
### Module initialisation ###
module load cp2k
 
### Command echoes ###
set -x
 
### Copy to the TMPDIR ###
cp ./* $TMPDIR
 
### Run the calculation ###
cd $TMPDIR
poe cp2k.popt input_file
 
### Copy to the submission folder ###
cd -
cp $TMPDIR/* .

You may obtain more complete advice about job submission in queue on Ada parallelised in MPI or parallelised in hybrid MPI/OpenMP mode.

Specific software parameters

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

Otherwise, the MKL library is used by default.