MD dftd4 in version 2025.1

67 views
Skip to first unread message

Somayeh Ahmadkhani

unread,
Aug 12, 2025, 3:23:10 AMAug 12
to cp2k

Dear CP2K developers and users,

I am running CP2K for a water system containing approximately 2,600 molecules.
With CP2K version 7, I was able to save around 50 steps in a 12-hour run. However, after switching to a newer version, I now obtain data for only 2 steps in the same 12-hour period. Furthermore, when using the DFT-D4 correction, I can only obtain 1 step per 12 hours.

Could you please help me understand and resolve this performance issue?
I have attached my SBATCH script and input file for more details, in case they are useful.

Thank you in advance for your support.

Best regards,

my SBATCH script is as follows

#!/bin/bash

#SBATCH --job-name=cp2k

#SBATCH --ntasks=64

#SBATCH --mem=300G

#SBATCH --nodes=4

#SBATCH --time=12:00:00

#SBATCH --error=cp2k_job.err

module load intel/

module load impi/2021.14

module load cp2k/2025.1

export OMP_NUM_THREADS=1

ulimit -s unlimited

mpirun  cp2k.psmp -i PBE_water.inp -o out_put.out

PBE_water.inp
Message has been deleted

Frederick Stein

unread,
Aug 12, 2025, 4:35:33 AMAug 12
to cp2k
Dear Somayeh,
Generally, there a bunch of changes between versions 7 and 2025.2 making it hard to tell what the exact issue is. Can you provide more details regarding
- What hardware are you running on?
- How did you compile CP2K in both cases?
- Can you provide profiles? It might already help to run CP2K in ENERGE_FORCE mode instead of MD to get some ideas.
Best,
Frederick

Somayeh Ahmadkhani

unread,
Aug 12, 2025, 5:20:18 AMAug 12
to cp...@googlegroups.com

Dear Frederick,

Thank you for your reply. Please find the details below:

  • Hardware: I am running on an HPC cluster with CPU model and  I was shared my running script before.

  • System size: My system contains 2454  molecules of water around 7362 atoms in total.

  • Compilation details:

    • For CP2K version 7, as follows

      CP2K version 7.1

       Source code revision git:e635599

       cp2kflags: omp libint fftw3 libxc elpa parallel mpi3 scalapack xsmm spglib mkl

       compiler: Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.13.0 Build 20240602_000000

       compiler options:

         -I/sw/chem/cp2k/2024.1/cpu-clx/intel_2024.2-impi_2021.13//spglib-2.5

         .0/install/include -I/sw/chem/cp2k/2024.1/cpu-clx/intel_2024.2-impi_

         2021.13//elpa-new_release_2023.11.001/install/include/elpa_openmp-20

         23.11.001/modules -I/sw/chem/cp2k/2024.1/cpu-clx/intel_2024.2-impi_2

         021.13//elpa-new_release_2023.11.001/install/include/elpa_openmp-202

         3.11.001/elpa -I/sw/chem/cp2k/2024.1/cpu-clx/intel_2024.2-impi_2021.

         13//libxsmm-1.17/install/include -I/sw/chem/cp2k/7.1/clx.el9/intel_2

         024.2-impi_2021.13//libxc-4.3.4/install/include -I/sw/chem/cp2k/2024

         .1/cpu-clx/intel_2024.2-impi_2021.13//libint-v2.6.0-cp2k-lmax-5/inst

         all/include -I/sw/compiler/intel/oneapi/mkl/2024.2/include/fftw/ -I/

         sw/compiler/intel/oneapi/mkl/2024.2/include -I/sw/chem/cp2k/7.1/clx.

         el9/intel_2024.2-impi_2021.13/cp2k-7.1/src/start/ -I/sw/chem/cp2k/7.

         1/clx.el9/intel_2024.2-impi_2021.13/cp2k-7.1/obj/local-static/psmp/e

         xts/dbcsr -I/sw/comm/impi/mpi/2021.13/include/mpi -I/sw/comm/impi/mp

         i/2021.13/include -I/sw/comm/impi/mpi/2021.13/include/mpi -c -O2 -fP

         IC -fp-model precise -funroll-loops -qopenmp -qopenmp-simd -xCORE-AV

         X512 -m64 -D__parallel -D__MPI_F08 -D__SPGLIB -D__ELPA -D__LIBXSMM -

         D__LIBXC -D__LIBINT -D__FFTW3 -D__FFTW3_MKL -D__MKL -D__SCALAPACK -d

         iag-disable=8291 -diag-disable=8293 -diag-disable=10448 -fpp -fpscom

         p logicals -free -std08 -D__COMPILE_ARCH="local-static" "-D__COMPILE

         _DATE="Fri Sep 27 15:48:17 CEST 2024"" -D__COMPILE_HOST="bcn1357" -D

         __COMPILE_REVISION="git:e635599" -D__DATA_DIR="/sw/chem/cp2k/7.1/clx

         .el9/intel_2024.2-impi_2021.13/cp2k-7.1/data" -D__SHORT_FILE__="star

         t/cp2k.F" 

    • For CP2K version 2025.1,

       CP2K version 2025.1

       Source code revision git:9635df4

       cp2kflags: omp libint fftw3 fftw3_mkl libxc elpa parallel scalapack mpi_f08 cosma xsmm spglib mkl libdftd4 sirius hdf5

       compiler: Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.13.1 Build 20240703_000000

       compiler options:

         -I/home/bzfbpela/.local/easybuild/software/sirius/7.6.1-clx.el9.inte

         l//include/sirius -I/home/bzfbpela/.local/easybuild/software/pugixml

         /1.15-clx.el9.intel//include -I/home/bzfbpela/.local/easybuild/softw

         are/spla/1.6.1-clx.el9.intel//include -I/home/bzfbpela/.local/easybu

         ild/software/SpFFT/1.1.0-clx.el9.intel//include -I/sw/dataformats/hd

         f5/1.14.4.3/clx.el9/intel/include -I/sw/numerics/gsl/2.8/x86_64.el9/

         /include -I/home/bzfbpela/.local/easybuild/software/spglib/2.5.0-clx

         .el9.intel//include -I/home/bzfbpela/.local/easybuild/software/elpa/

         2024.05.001-clx.el9.intel-ifort//include/elpa_openmp-2024.05.001/mod

         ules -I/home/bzfbpela/.local/easybuild/software/elpa/2024.05.001-clx

         .el9.intel-ifort//include/elpa_openmp-2024.05.001/elpa -I/home/bzfbp

         ela/.local/easybuild/software/libxsmm/1.17-clx.el9.intel//include -I

         /home/bzfbpela/.local/easybuild/software/libxc/6.2.2-clx.el9.intel//

         include -I/home/bzfbpela/.local/easybuild/software/libint-CP2K/2.6.0

         -clx.el9.intel//include -I/home/bzfbpela/.local/easybuild/software/C

         OSMA/2.6.6-clx.el9.intel//include/cosma -I/home/bzfbpela/.local/easy

         build/software/dftd4/3.7.0-clx.el9.intel//include/ -I/home/bzfbpela/

         .local/easybuild/software/dftd4/3.7.0-clx.el9.intel//include//mctc-l

         ib/modules/ -I/home/bzfbpela/.local/easybuild/software/dftd4/3.7.0-c

         lx.el9.intel//include//dftd4/Intel-2021.1.0.20240703/ -I/sw/compiler

         /intel/oneapi/mkl/2024.2/include/fftw/ -I/sw/compiler/intel/oneapi/m

         kl/2024.2/include -I/home/bzfbpela/.local/easybuild/build/CP2K/2025.

         1/system-system-clx.el9.intel-ifort/cp2k-2025.1/src/start/ -I/home/b

         zfbpela/.local/easybuild/build/CP2K/2025.1/system-system-clx.el9.int

         el-ifort/cp2k-2025.1/obj/CP2K-2025.1-clx.el9.intel-ifort/psmp/exts/d

         bcsr -I/sw/comm/impi/mpi/2021.14/include/mpi -I/sw/comm/impi/mpi/202

         1.14/include -I/sw/comm/impi/mpi/2021.14/include/mpi -c -O2 -fPIC -f

         p-model=precise -funroll-loops -qopenmp -qopenmp-simd -xCORE-AVX512 

         -m64 -traceback -D__parallel -D__MPI_F08 -D__INTEL_COMPILER -D__DATA

         _DIR= -D__SIRIUS -D__SPLA -D__SPFFT -D__HDF5 -D__GSL -D__SPGLIB -D__

         ELPA -D__LIBXSMM -D__LIBXC -D__LIBINT -D__COSMA -D__DFTD4 -D__FFTW3 

         -D__FFTW3_MKL -D__MKL -D__SCALAPACK -diag-disable=8291 -diag-disable

         =8293 -diag-disable=10448 -fpp -fpscomp logicals -free -std08 -D__CO

         MPILE_ARCH="CP2K-2025.1-clx.el9.intel-ifort" "-D__COMPILE_DATE="Mon 

         Jun 16 17:51:46 CEST 2025"" -D__COMPILE_HOST="blogin7" -D__COMPILE_R

         EVISION="git:9635df4" -D__DATA_DIR="/home/bzfbpela/.local/easybuild/

         build/CP2K/2025.1/system-system-clx.el9.intel-ifort/cp2k-2025.1/data

         " -D__SHORT_FILE__="start/cp2k.F" 


  • Profiles: I will prepare and share profiling results shortly. In the meantime, I will run CP2K in ENERGY_FORCEmode, as you suggested, to gather more information.

I was also shared input file earlier.

Best regards,
Somayeh Ahmadkhani


On 12 Aug 2025, at 10:34 AM, Frederick Stein <f.s...@hzdr.de> wrote:

Dear Somayeh,
Generally, there a bunch of changes between versions 7 and 2025.2 making it hard to tell what the exact issue is. Can you provide more details regarding
- What hardware are you running on?
- How many atoms (or molecules etc.) does you system contain? My first guess considering your box size size and your files names is ca. 4096 H2O molecules.

Frederick Stein

unread,
Aug 12, 2025, 5:34:17 AMAug 12
to cp2k
Dear Somayeh,
If D4 is significantly more expensive than D3, how have you determined the cutoffs for D4? Have you made a convergence test on the accuracy of energies and forces?
Best,
Frederick

Que Zhu

unread,
Aug 13, 2025, 3:44:39 AMAug 13
to cp...@googlegroups.com
CPK7 is so old.Why not try the latest version?


Somayeh Ahmadkhani <so.ahm...@gmail.com> 于2025年8月12日周二 15:23写道:
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/42185194-bb4f-4c3d-9bdc-6bfde1149b7dn%40googlegroups.com.

Johann Pototschnig

unread,
Aug 14, 2025, 9:37:20 AMAug 14
to cp2k
You could try switching off the reference code:

D4_REFERENCE_CODE .FALSE.

but I am not certain, if it will improve. 

At the the end of the output there is timing information, e.g.:
-------------------------------------------------------------------------------
 -                                                                             -
 -                                T I M I N G                                  -
 -                                                                             -
 -------------------------------------------------------------------------------
 SUBROUTINE                       CALLS  ASD         SELF TIME        TOTAL TIME
                                MAXIMUM       AVERAGE  MAXIMUM  AVERAGE  MAXIMUM
 CP2K                                 1  1.0    0.005    0.005    1.673    1.673
 qs_energies                         25  2.0    0.001    0.001    1.659    1.659
 scf_env_do_scf                      25  3.0    0.000    0.000    1.384    1.384
 scf_env_do_scf_inner_loop          377  4.1    0.027    0.027    1.382    1.382
 qs_scf_new_mos                     377  5.1    0.003    0.003    1.266    1.266
...


Can you provide this.

It can be adjusted via:
&GLOBAL &TIMINGS THRESHOLD 0.1 &END TIMINGS &END GLOBAL

Reply all
Reply to author
Forward
0 new messages