How to use CP2K on ENEA-grid

Application Name: CP2K
Discipline: Computational Materials Science



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, Quantum Monte Carlo, Ehrenfest dynamics, vibrational analysis, core level spectroscopy, energy minimization, and transition state optimization using NEB or dimer method. CP2K is written in Fortran 2003 and can be run efficiently in parallel using a combination of multi-threading, MPI, and CUDA. It is freely available under the GPL license.

In this page you can find the launching and submission syntax for CP2K code on the ENEA-GRID. Please, read the following documentation for running serial/parallel application on CRESCO clusters using LSF framework: Batch Jobs / LSF. This is not a tutorial about using codes like CP2K, for that, you may find documentation and tutorial on the official web site www.cp2k.org/.

ENEA-GRID/CRESCO utilization rules (link).

CP2K can be compiled in various modes:
sopt : serial
popt : parallel (MPI only)
ssmp : serial with OpenMP
psmp : parallel (mixed-mode MPI+OpenMP)


JOB SUBMISSION SCRIPT on CRESCO6

To submit on CRESCO6 use the script named cp2k . To know the installed versions simply type:
cp2k --version
For help on how to use the script:
cp2k --help



CRESCO
Cluster

CRESCO6
front-ends
cresco6x001 cresco6x002
LSF submission
bsub -n N -q queue bsub_options -o lsf_file.out -e file.err cp2k version mode input.inp output.out

export OMP_NUM_THREADS=nthreads
bsub -n N -q queue -R "span[ptile=pt]" bsub_options -o lsf_file.out -e file.err cp2k version mode input.inp output.out
where:
version = CP2K version (e.g. 6.1.0)
mode = sopt, popt, psmp


Example of job submission
  • To submit a job on CRESCO6 using the 6.1.0 version with only MPI parallelism and using 96 cores (i.e. 2 nodes):
    bsub -n 96 -q cresco6_48h24 -o lsf_file.out -e file.err cp2k 6.1.0 popt input.inp output.out
  • To submit the same job using 96 cores (i.e. 2nodes) on CRESCO6 using the 6.1.0 version but with hybrid MPI+OpenMP parallelism with 4 OpenMP threads (i.e. 24 MPI processes and 4 OpenMP threads, 24*4=96 total processes), you need to set and export the OMP_NUM_THREADS variable and remember that CRESCO6 has 48 cores per node (so ptile=48):

    export OMP_NUM_THREADS=4
    bsub -n 96 -q cresco6_48h24 -R "span[ptile=48]" -o lsf_file.out -e file.err cp2k 6.1.0 psmp input.inp output.out
  • To submit a job on CRESCO6 using the intel compiler and the serial version:
    bsub -n 1 -q cresco6_h4 -o lsf_file.out -e file.err cp2k 6.1.0 sopt input.inp output.out
N.B.. The syntax of the script to launch CP2K under CRESCO6 is different from that used in CRESCOn (with n <6).



JOB SUBMISSION SCRIPT on CRESCOn (with n <6)


In clusters CRESCOn (with n <6) the following CP2K versions are installed:
v. 2.6.2 to be launched with the script cp2k_2.6.2 (installed in CRESCO3 & CRESCO4)
v. 4.1.0 to be launched with the script cp2k_4.1.0 (installed in CRESCO4)
Moreover, the intel compiler (ifort) or the gnu fortran compiler (gfortran) can be used. When submitting a job, the compiler, the version and the number of threads per node (in case the OpenMP version is used) must be specified using the following syntax:

CRESCO
Cluster

CRESCO4
front-end
cresco4x001
cresco4x002
LSF submission
bsub -n N -q queue bsub_options -o file.out -e file.err cp2k_2.6.2 input.inp output.out compiler version

bsub -n N -q queue -R "span[ptile=pt]" bsub_options -o file.out -e file.err cp2k_2.6.2 input.inp output.out compiler version threads


Example of job submission
  • To submit a job on CRESCO4 using the intel compiler and the MPI version with 400 processors:
    bsub -n 400 -q cresco4_256h24 -o file.out -e file.err cp2k_2.6.2 input.inp output.out ifort popt
  • To submit a job on CRESCO4 using the gfortran compiler and the MPI+OpenMP version with 64 processors and 2 threads per core (pt*threads=16 since CRESCO4 has 16 cores per node):
    bsub -n 64 -q cresco4_16h24 -R "span[ptile=8]" -o file.out -e file.err cp2k_2.6.2 input.inp output.out gfortran psmp 2
  • To submit a job on CRESCO4 using the intel compiler and the serial version:
    bsub -n 1 -q cresco4_h144 -o file.out -e file.err cp2k_2.6.2 input.inp output.out ifort sopt

N.B.
  • It is not necessary to set the MPI enviroment;
  • From each cresco cluster it is possible to use RESTART files generated by the other cresco clusters;
  • For an interactive submission on the front-ends CRESCO3 or CRESCO4 use the command:
    • cp2k_2.6.2 input.inp output.out compiler version (threads)
Extra
  • Pseudopotentials: different types of pseudopotentials are in the directory
  • /afs/.enea.it/software/cp2k/html/data_v262   (link)
  • Many possible basis sets are in the directory
  • /afs/.enea.it/software/cp2k/html/data_v262   (link)
  • Some useful bsub options:
  • -W time_in_minute, -R "span[ptile=8]", -R "span[ptile=16]",
    -R "span[ptile=24]", -R "same[model]", -R K40, -R S2050,
    -R "select[model==intel_E5530]", -R "select[model==intel_E5620]",
    -R "select[hname==crescoxx1 || hname==crescoxx2]", -R "select[hname!=crescoxx3]"



---



BENCHMARK

The figure below shows how cp2k scales with the number of processors on CRESCO4: the average CPU time for molecular dynamics step is reported as a function of the number of cpu used.
Input files were taken from the benchmark suite available in the cp2k package: a box containing n=32, 64, 128, 256, 512, 1024 H2O molecules with TZV2P basis functions. Other input parameters were: density cutoff=280Ry, eps_scf=10-5. Cp2k was compiled with the intel fortran compiler (version 14) and the FFTW3-mkl libraries.

Thematic areas

  • Documents

  • CRESCO Tools

  •  
    Cookies Policy