========================== CP2K ========================== What is CP2K? --------------- `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. On this page you will find the launching and submission syntax for CP2K code on `ENEA-GRID `_ . This is not a tutorial about using CP2K code; for that purpose you may find `documentation `_ and `tutorial `_ on the official web site www.cp2k.org/. ENEA-GRID/CRESCO utilization rules. -------------------------------------------- JOB SUBMISSION SCRIPT on CRESCO6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To submit on CRESCO6 use the script named cp2k . To know the installed versions simply type from a terminal: .. code-block:: bash cp2k --version For help on how to use the script type from a terminal: .. code-block:: bash cp2k-help To submit a job on CRESCO6 with `LSF `_ commands, the general syntax is: .. code-block:: bash export OMP_NUM_THREADS=nthreads bsub -n N -q queue bsub_options -o lsf_file.out -e file.err cp2k version mode input.inp output.out Where: .. raw:: html version CP2K version (e.g. 6.1.0)
mode sopt, popt, psmp

Examples: - To submit a job on CRESCO6 using the 6.1.0 version with only MPI parallelism and using 96 cores (i.e. 2 nodes): .. code-block:: bash 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): .. code-block:: bash 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: .. code-block:: bash bsub -n 1 -q cresco6_h4 -o lsf_file.out -e file.err cp2k 6.1.0 sopt input.inp output.out JOB SUBMISSION SCRIPT on XCRESCO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `XCRESCO `_ is a cluster (58 nodes + 2 login nodes) with 32 IBM powerpc cpus per node (with hyperthreading enabled) and 4 NVIDIA Volta V100 GPUs per node. In this cluster only CP2K with cuda support is installed. Jobs are submitted by means of `SLURM `_ with the sbatch command. Example of a script to submit a job in hybrid mode with omp package (32 tasks, 2 threads per task and 4 gpus (for a total of 2 nodes occupied)): .. code-block:: bash #!/bin/ksh #SBATCH --job-name=job_64_cores #SBATCH --output=%x.%j.out # Note: %x == job-name and %j == job_id #SBATCH --error=%x.%j.err # #SBATCH –nodes=2 # number of nodes requested #SBATCH --ntasks-per-node=16 # number of processes per single node #SBATCH --cpus-per-task=2 # number of cores per single process (i.e. number of threads for every process) #SBATCH --gpus-per-node=4 # number of requested gpus per node (from 1 to 4 in xcresco) #SBATCH --time=00:30:00 # max duration of a job format: , up to 24 h module purge module load profile/phys module load cp2k/2024.1 export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK mpirun cp2k.psmp -i file.inp -o file.out Submit the previous script (named, e.g. submit.sh) with the command: .. code-block:: bash sbatch submit.sh