ARCHER logo ARCHER banner

The ARCHER Service is now closed and has been superseded by ARCHER2.

  • ARCHER homepage
  • About ARCHER
    • About ARCHER
    • News & Events
    • Calendar
    • Blog Articles
    • Hardware
    • Software
    • Service Policies
    • Service Reports
    • Partners
    • People
    • Media Gallery
  • Get Access
    • Getting Access
    • TA Form and Notes
    • kAU Calculator
    • Cost of Access
  • User Support
    • User Support
    • Helpdesk
    • Frequently Asked Questions
    • ARCHER App
  • Documentation
    • User Guides & Documentation
    • Essential Skills
    • Quick Start Guide
    • ARCHER User Guide
    • ARCHER Best Practice Guide
    • Scientific Software Packages
    • UK Research Data Facility Guide
    • Knights Landing Guide
    • Data Management Guide
    • SAFE User Guide
    • ARCHER Troubleshooting Guide
    • ARCHER White Papers
    • Screencast Videos
  • Service Status
    • Detailed Service Status
    • Maintenance
  • Training
    • Upcoming Courses
    • Online Training
    • Driving Test
    • Course Registration
    • Course Descriptions
    • Virtual Tutorials and Webinars
    • Locations
    • Training personnel
    • Past Course Materials Repository
    • Feedback
  • Community
    • ARCHER Community
    • ARCHER Benchmarks
    • ARCHER KNL Performance Reports
    • Cray CoE for ARCHER
    • Embedded CSE
    • ARCHER Champions
    • ARCHER Scientific Consortia
    • HPC Scientific Advisory Committee
    • ARCHER for Early Career Researchers
  • Industry
    • Information for Industry
  • Outreach
    • Outreach (on EPCC Website)

You are here:

  • ARCHER
  • User Guides & Documentation
  • Essential Skills
  • Quick Start Guide
  • ARCHER User Guide
  • ARCHER Best Practice Guide
  • Scientific Software Packages
  • UK Research Data Facility Guide
  • Knights Landing Guide
  • Data Management Guide
  • SAFE User Guide
  • ARCHER Troubleshooting Guide
  • ARCHER White Papers
  • Screencast Videos

Contact Us

support@archer.ac.uk

Twitter Feed

Tweets by @ARCHER_HPC

ISO 9001 Certified

ISO 27001 Certified

Compiling CP2K 4.1 on ARCHER Phase 2 (Cray XC30, Ivy Bridge)

The instructions below were used to build CP2K 4.1.17463, which is currently installed on ARCHER

Set up your environment

Load the modules for the GNU compiler environment and FFTW 3:

module swap PrgEnv-cray PrgEnv-gnu
module load fftw

Module list for centrally installed executable:

  1) modules/3.2.10.2
  2) eswrap/1.3.2-1.020200.1274.0
  3) switch/1.0-1.0502.57058.1.58.ari
  4) craype-network-aries
  5) craype/2.4.2
  6) pbs/12.2.401.141761
  7) craype-ivybridge
  8) cray-mpich/7.2.6
  9) packages-archer
 10) bolt/0.6
 11) nano/2.2.6
 12) leave_time/1.0.0
 13) quickstart/1.0
 14) ack/2.14
 15) xalt/0.6.0
 16) epcc-tools/6.0
 17) gcc/5.1.0
 18) cray-libsci/13.2.0
 19) udreg/2.3.2-1.0502.9889.2.20.ari
 20) ugni/6.0-1.0502.10245.9.9.ari
 21) pmi/5.0.7-1.0000.10678.155.25.ari
 22) dmapp/7.0.1-1.0502.10246.8.47.ari
 23) gni-headers/4.0-1.0502.10317.9.2.ari
 24) xpmem/0.1-2.0502.57015.1.15.ari
 25) dvs/2.5_0.9.0-1.0502.1958.2.55.ari
 26) alps/5.2.3-2.0502.9295.14.14.ari
 27) rca/1.0.0-2.0502.57212.2.56.ari
 28) atp/1.8.3
 29) PrgEnv-gnu/5.2.56
 30) fftw/3.3.4.5

Build CP2K

First obtain a copy of the CP2K code, either from the CP2K package account on ARCHER or from the CP2K Website

.

CP2K depends on a number of external libraries for functionality (e.g. libxc, libint, PLUMED) and performance (libgrid, libxsmm). There have been pre-installed in the package account, and are available for users to link if building their own versions of the code.

The CP2K build process is controlled by an 'arch' file, located in the cp2k/arch directory. Example arch files for building on ARCHER are located in the package account ($CP2K/../../arch/). Four versions are provided:

  • ARCHER.sopt: Serial build
  • ARCHER.popt: MPI only build
  • ARCHER.psmp: MPI/OpenMP build

The ARCHER.psmp arch file is shown below:

CC       = cc
CPP      =
FC       = ftn -fopenmp -ffree-form
LD       = ftn -fopenmp
AR       = ar -r
DFLAGS   = -D__FFTW3 -D__LIBINT \
           -D__parallel -D__SCALAPACK -D__HAS_NO_SHARED_GLIBC \
           -D__STATM_RESIDENT -D__LIBXC -D__LIBXSMM -D__HAS_LIBGRID \
           -D__PLUMED2 -D__MPI_VERSION=3 -D__ELPA2 -D__MAX_CONTR=4

DATA_DIR = /work/y07/y07/cp2k/4.1.17463/data
LIB_LOC  = /usr/local/packages/cp2k/4.1.17463/libs
CPPFLAGS = -traditional -C $(DFLAGS) -P
CFLAGS   = $(DFLAGS)
FCFLAGS  = $(DFLAGS) -I$(LIB_LOC)/libxsmm/include -I$(LIB_LOC)/libxc/include/ -I$(LIB_LOC)/elpa/include/elpa_openmp-2015.05.001/modules/ -O3 -ffast-math -funroll-loops -fno-tree-vectorize -fno-omit-frame-pointer -g -march=core-avx-i -Waliasing -Wampersand -Wc-binding-type -Wconversion -Wintrinsic-shadow -Wintrinsics-std -Wline-truncation -Wno-tabs -Wrealloc-lhs-all -Wtarget-lifetime -Wunderflow -Wunused-but-set-variable -Wunused-variable -std=f2003
LDFLAGS  = $(FCFLAGS)
LIBS     = -L$(LIB_LOC)/libint/lib -lderiv -lint -lstdc++ \
           -L$(LIB_LOC)/libgrid -lgrid \
           -L$(LIB_LOC)/libxsmm/lib -lxsmmf -lxsmm -lxsmmext \
           -L$(LIB_LOC)/libxc/lib -lxcf90 -lxc \
           -L$(LIB_LOC)/elpa/lib -lelpa_openmp \
           -lfftw3 -lfftw3_threads -lz -ldl

include $(LIB_LOC)/plumed/lib/plumed/src/lib/Plumed.inc
EXTERNAL_OBJECTS=$(PLUMED_STATIC_DEPENDENCIES)

Congratulations, you should now have a set of CP2K executables in the cp2k/exe/ directory!

ibethune@eslogin004:~/cp2k/makefiles> ls ../exe/ARCHER
cp2k.psmp
cp2k_shell.psmp
dbcsr_example_1.psmp
dbcsr_example_2.psmp
dbcsr_example_3.psmp
dbcsr_performance_driver.psmp
dbcsr_test_csr_conversions.psmp
dbcsr_unittest.psmp
graph.psmp
libcp2k_unittest.psmp

Copyright © Design and Content 2013-2019 EPCC. All rights reserved.

EPSRC NERC EPCC