Skip to content
Snippets Groups Projects
Commit 071bdc5d authored by Holly Judge's avatar Holly Judge
Browse files

Update README.md

parent 4ae6cb88
Branches
Tags
No related merge requests found
...@@ -36,9 +36,9 @@ depending on the type of simulation and the system in question. ...@@ -36,9 +36,9 @@ depending on the type of simulation and the system in question.
## Mechanics of Building Benchmark ## Mechanics of Building Benchmark
GNU make and Python 2.x are required for the build process, as are a Fortran GNU make and Python 3.x are required for the build process, as are a Fortran
2003 compiler and matching C compiler, e.g. gcc/gfortran (gcc >=4.6 works, later 2003 compiler and matching C compiler, e.g. gcc/gfortran (gcc >=4.6 works, later
version is recommended). versions are recommended).
CP2K can benefit from a number of external libraries for improved performance. CP2K can benefit from a number of external libraries for improved performance.
It is advised to use vendor-optimized versions of these libraries. If these are It is advised to use vendor-optimized versions of these libraries. If these are
...@@ -48,20 +48,19 @@ these libraries. ...@@ -48,20 +48,19 @@ these libraries.
Overview of build process: Overview of build process:
1. Install Libint. 1. Install Libint.
2. Install Libxc. 2. Install FFTW library (or use MKL's FFTW3 interface).
3. Install FFTW library (or use MKL's FFTW3 interface). 3. Check if LAPACK, BLAS, SCALAPACK and BLACS are provided and install if not.
4. Check if LAPACK, BLAS, SCALAPACK and BLACS are provided and install if not. 4. Install optional performance libraries - ELPA (CPU and GPU), libxsmm (CPU).
5. Install optional libraries - ELPA, libxsmm, libgrid. 5. Build CP2K and link to Libint, FFTW, LAPACK, BLAS, SCALAPACK and BLACS, and to relevant CUDA libraries if building for GPU.
6. Build CP2K and link to Libint, Libxc, FFTW, LAPACK, BLAS, SCALAPACK and BLACS, and to relevant CUDA libraries if building for GPU.
<!--- (CP2K is built using a Fortran 2003 compiler and matching C compiler such as gfortran/gcc (version 4.6 and above) and compiled with GNU make. CP2K makes use of a variety of different libraries. Some are essential for running in parallel and others may be used to increase the performance. The steps to build CP2K are as follows:) --> <!--- (CP2K is built using a Fortran 2003 compiler and matching C compiler such as gfortran/gcc (version 4.6 and above) and compiled with GNU make. CP2K makes use of a variety of different libraries. Some are essential for running in parallel and others may be used to increase the performance. The steps to build CP2K are as follows:) -->
### Download the source code ### Download the source code
wget https://github.com/cp2k/cp2k/releases/download/v7.1.0/cp2k-7.1.tar.bz2 wget https://github.com/cp2k/cp2k/releases/download/v8.1.0/cp2k-8.1.tar.bz2
bunzip2 cp2k-7.1.tar.bz2 bunzip2 cp2k-8.1.tar.bz2
tar xvf cp2k-7.1.tar tar xvf cp2k-8.1.tar
cd cp2k-7.1 cd cp2k-8.1
### Install or locate libraries ### Install or locate libraries
...@@ -78,9 +77,6 @@ The following commands will uncompress and install the LIBINT library required f ...@@ -78,9 +77,6 @@ The following commands will uncompress and install the LIBINT library required f
Note: The environment variables ``CC`` and ``CXX`` are optional and can be used to specify the C and C++ compilers to use for the build (the example above is configured to use the compiler wrappers ``cc`` and ``CC`` used on Cray systems). Note: The environment variables ``CC`` and ``CXX`` are optional and can be used to specify the C and C++ compilers to use for the build (the example above is configured to use the compiler wrappers ``cc`` and ``CC`` used on Cray systems).
**LIBXC**
Libxc - v4.0.3 or later : http://www.tddft.org/programs/octopus/wiki/index.php/Libxc
**FFTW** **FFTW**
...@@ -108,9 +104,8 @@ Note: The environment variables ``CC`` and ``CXX`` are optional and can be used ...@@ -108,9 +104,8 @@ Note: The environment variables ``CC`` and ``CXX`` are optional and can be used
**Optional libraries** **Optional libraries**
ELPA : https://elpa.mpcdf.mpg.de/elpa-tar-archive ELPA : https://elpa.mpcdf.mpg.de/elpa-tar-archive (version 2020.05.001 required)
libgrid : within CP2K distribution - cp2k/tools/autotune_grid libxsmm : https://github.com/hfp/libxsmm (version 1.16.1 required)
libxsmm : https://github.com/hfp/libxsmm
### Create the arch file ### Create the arch file
...@@ -140,19 +135,22 @@ CP2K is primarily a Fortran code, so only the Fortran compiler needs to be MPI-e ...@@ -140,19 +135,22 @@ CP2K is primarily a Fortran code, so only the Fortran compiler needs to be MPI-e
# Optional DFLAGS for linking performance libraries: # Optional DFLAGS for linking performance libraries:
-D__LIBXSMM \ -D__LIBXSMM \
-D__ELPA=201911 \ -D__ELPA=202005 \
-D__HAS_LIBGRID \
-D__SIRIUS \
-D__MKL : if relying on MKL for ScaLAPACK and/or an FFTW interface -D__MKL : if relying on MKL for ScaLAPACK and/or an FFTW interface
**Specification of compiler flags ``FCFLAGS`` (for gfortran):** **Specification of compiler flags ``FCFLAGS`` (for gfortran):**
FCFLAGS = $(DFLAGS) -ffree-form -fopenmp : Required FCFLAGS = $(DFLAGS) -ffree-form -fopenmp -std=f2008 : Required
FCFLAGS = $(DFLAGS) -ffree-form -fopenmp -O3 -ffast-math -funroll-loops : Recommended FCFLAGS = $(DFLAGS) -ffree-form -fopenmp -std=f2008 -O3 -ffast-math -funroll-loops : Recommended
**Specification of the ``CFLAGS``**
CFLAGS = $(DFLAGS) -fopenmp -std=c99 : Required
CFLAGS = $(DFLAGS) -fopenmp -std=c99 -O3 -funroll-loops : Recommended
If you want to link any libraries containing header files you should pass the If you want to link any libraries containing header files you should pass the
path to the directory containing these to FCFLAGS in the format path to the directory containing these to FCFLAGS and CFLAGS in the format
``-I/path_to_include_dir`` ``-I/path_to_include_dir``
-I$(path_to_libint)/include -I$(path_to_libint)/include
...@@ -261,3 +259,41 @@ The run walltime is reported near the end of logfile: ...@@ -261,3 +259,41 @@ The run walltime is reported near the end of logfile:
grep "CP2K " logfile | awk -F ' ' '{print $7}' grep "CP2K " logfile | awk -F ' ' '{print $7}'
The expected energies in each case can be verified and should be
similar to the below in each case.
**A) H2O-512**
grep 'Total energy:' logfile | awk -F ' ' '{print $3}'
-8807.9463577844
-8808.3828221706
-8808.5159163976
-8808.6959039118
-8808.8563562046
-8808.9223333935
-8808.8567123893
-8808.6802002026
-8808.4529914574
-8808.2521909391
-8808.1425217528
**B) LiH-HFX**
grep ' OT ' logfile
1 OT CG 0.15E+00 139.386 0.0014482195 -870.3838179520
2 OT LS 0.30E+00 19.767 1.0000000000 -870.7951031236
3 OT CG 0.30E+00 20.724 0.0001614074 -870.9275954835
4 OT LS 0.31E+00 19.665 1.0000000000 -870.9346994255
5 OT CG 0.31E+00 20.641 0.0000168390 -870.9347195049
6 OT LS 0.29E+00 19.760 1.0000000000 -870.9347906736
7 OT CG 0.29E+00 21.192 0.0000009576 -870.9347911831
**C) H2O-DFT-LS**
grep ENERGY logfile | awk -F ' ' '{print $9}'
-35222.0221539462
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment