Compiling Quantum Espresso 5.0 on ARCHER (XC30) using Intel's MKL library
This page provides compilation instructions for Quantum Espresso 5.0 on ARCHER (Cray XC30, Ivy Bridge) using Intel compilers and linking to Intel's MKL library to provide BLAS, LAPACK, SCALAPACK, and FFT.
First obtain the source code by visiting the QEForge download page. For more information about releases and the Quantum Espresso distribution see the QEForge information page and the download information page on the Quantum Espresso website. For example, to build version 5.0.3 you should download espresso+PHonon-5.0.3.tar.gz.
Uncompress the downloaded tar file. Then issue the following commands to prepare the environment before running the configure script:
module swap PrgEnv-cray PrgEnv-intel export CC=cc export FC=ftn export F77=ftn export F90=ftn
Now enter the directory formed from uncompressing the downloaded tar file and run the configure script, as follows:
./configure --prefix=path_to_desired_installation_location
Once the configure script has finished, edit the file make.sys (or make.inc for later versions of QE) with a text editor and replace existing lines or add new ones - whatever is required - to ensure that all the following lines are present in make.sys exactly as stated:
LDFLAGS=-static -I$(INTEL_PATH)/mkl/include/ -I$(INTEL_PATH)/mkl/include/intel64/lp64/ BLAS_LIBS=$(INTEL_PATH)/mkl/lib/intel64/libmkl_sequential.a $(INTEL_PATH)/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group LAPACK_LIBS=$(INTEL_PATH)/mkl/lib/intel64/libmkl_intel_lp64.a $(INTEL_PATH)/mkl/lib/intel64/libmkl_core.a SCALAPACK_LIBS=$(INTEL_PATH)/mkl/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group FFT_LIBS=
Then run the build command
make all
Once this has completed the Quantum Espresso executables (e.g. pw.x and others) should be located in
path_to_desired_installation_location/bin
To avoid confusion, note that these are actually symbolic links to the executables located in subdirectories for the specific subcomponents of Quantum Espresso such as PW, NEB, etc. This can be seen as follows:
ls -all bin/pw.x lrwxrwxrwx 1 cse cse 14 May 13 17:17 bin/pw.x -> ../PW/src/pw.x