[Q-e-developers] ELPA for QE, instructions to build latest version working after r13250
Filippo SPIGA
filippo.spiga at quantum-espresso.org
Sun Jan 15 17:44:23 CET 2017
Hello everybody,
in QE v6.0, we support ELPA version 2016.05.003 [1]. This version of ELPA has the ability to deliver better performance than plain ScaLAPACK but it has also have a different API that the former versions or the early legacy ELPA we ship as part of the QE distribution.
A new released version of ELPA is available publicly which support KNL and GPU (2016.11.001_pre [2]). However the API have changed again. We reaised this issue to the ELPA developers but until hey fix and stabilize the library API, some changes need to be made in the source code to support 2016.11.001_pre.
Here a short guide how to compile ELPA first and QE with ELPA.
# Prerequisites
You need ScaLAPACK (and so, BLACS) installed correctly in your system. You can find them in the Intel MKL / Intel MPI bundles or you have to download source codes and install by yourself. My suggestion is to use Intel MKL.
# Download and compile ELPA
ELPA 2016.11.001_pre is available here = https://elpa.mpcdf.mpg.de/html/Releases/2016.11.001.pre/elpa-2016.11.001.pre.tar.gz
To compile simply run the configure and then "make". You need to check that $MKLROOT points where the MKL are installed. You can chose to enable OpenMP (--enable-openmp) or not (--disable-openmp). $SCALAPACK_FCFLAGS and $SCALAPACK_LDFLAGS will have to chance accordingly in order to link the correct math libraries.
./configure --enable-openmp --prefix=$PREFIX SCALAPACK_LDFLAGS="-L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm" SCALAPACK_FCFLAGS="-L${MKLROOT}/include"
$PREFIX is where you want to deploy the library (e.g. a central folder in a cluster or your home directory).
# Export ELPA environment variables:
In ELPA the way "make install" operates does create an additional directory under "include/" which confuses current autoconf. To avoid failing over and over, we made the configure relying on the user who has to specify where the right headers are located. Assuming $PREFIX points to the directory where you installed ELPA by doing "make install", here how to export some environment variables that we will use later with QE
export ELPA_HOME=$PREFIX
X=`ls -1 $ELPA_HOME/lib/pkgconfig/`
export ELPA_VERSION=`echo "${X%.*}"`
export ELPA_LIBS=$ELPA_HOME/lib
export ELPA_C_INCLUDE=$ELPA_HOME/include/$ELPA_VERSION/elpa
export ELPA_FORTRAN_INCLUDE=$ELPA_HOME/include/$ELPA_VERSION/modules
export PATH=$ELPA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ELPA_LIB:$LD_LIBRARY_PATH
# Compile QE with ELPA pre-compiled (this works only for r13250)
Example with MPI and OpenMP both enabled, ELPA linked statically:
./configure --enable-openmp --enable-parallel --with-scalapack=intel --with-elpa-lib=$ELPA_LIBS/libelpa_openmp.a --with-elpa-include=$ELPA_FORTRAN_INCLUDE
My personal hope is to see ELPA API fixed (or stabilized) by the time a new QE release is created. In the meanwhile, we will continue to monitor ELPA changes. Ideally, we do not want to support too many versions that have different or broken API.
HTH
Cheers
[1] https://elpa.mpcdf.mpg.de/html/Releases/2016.05.003/
[2] https://elpa.mpcdf.mpg.de/html/Releases/2016.11.001.pre/
--
Filippo SPIGA ~ Quantum ESPRESSO Foundation ~ http://www.quantum-espresso.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20170115/9b83d718/attachment.html>
More information about the developers
mailing list