Commit f2a8a0cc authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Convert ELPA_2014.06 to a branch

parent ae473b44
Welcome to the ELPA library git repository.
This central repository houses all versions of the ELPA library. At
the time of this writing (01/31/2013), the ELPA developers provide three
separate versions, each as a separate subdirectory available here:
- ELPA_2011.12
This is a stable version of the entire ELPA library including all
necessary files to build it. When using ELPA for production, we
recommend using this version, as it has seen a lot of testing and
production use.
This version should only ever see any updates if there are clear and
unambiguous bug-fixes to be made. Each bugfix must be documented in
the README file. (At the time of this writing, no known bugs exist.)
- ELPA_2013.02.BETA
This is a quasi stable version of the enire ELPA library including all
necessary files to build it.
It enhances ELPA_2011.12 by intrinsic kernels for Intel Westmere,
Intel Sandy Bridge, Intel Haswell (through complier -fma flag),
AMD Interlagos.
This version passed serveral extensive tests.
- ELPA_development_version
This is the development version of the ELPA library. Any useful new
changes should be made here, and a number of changes will be made in
the near future. If you want the version presently "branded" as
stable, please refer to ELPA_2011.12 at this time.
- ELPA_development_version_GPU
This is the development version of the ELPA library with GPU support.
Any useful new changes should be made here, and a number of changes will
be made in the near future. If you want the version presently "branded" as
stable, please refer to ELPA_2011.12 at this time.
- tar-archives
Snappshots of the various versions from above in a tar-ball.
ELPA Version numbering scheme:
We have decided to use the format "ELPA_year.month" to designate
specific stable point releases of the ELPA library. Point releases
will be made at irregular intervals, solely determined by when we
consider the development version absolutely stable. At the time of the
"branching", the new stable version should be an exact copy of the
development one.
in addition to the directories with the sources for the aforementioned
versions of ELPA there exist a directory "tar-archives", which contains
tar-balls with current snapshots of the different versions
How to install ELPA:
ELPA is shipped with a typical "configure" and "make" procedure. It is
recommended to use this way to install ELPA. If you do not want to install
ELPA as library, but to include it in your source code, you can find a
"Makefile.example" in ./test, to see how this is done. Please distibute then
all files of ELPA with your code.
The configure installation is best done in four steps
1) run configure:
please point to your blacs/scalapack installation and the
linkline with the variables "BLACS_LDFLAGS" and "BLACS_FCFLAGS".
"BLACS_LDFLAGS" should then contain the correct linkline for your
blacs/scalapack installation and "BLACS_FCFLAGS" the include path
and any other flags you need at compile time.
It is recommended that you use the "rpath functionality" in the linkline,
otherwise it will be necessary to update the LD_LIBRARY_PATH environment
You can either specify your own builds of lapack/blacs/scalapack
or use specialized Vendor packages, e.g. if available you can use
Intel's MKL. If you do not set these variables ELPA will not be
Please set the further optimisation that you would like with the
variable "FCFLAGS", "CFLAGS", and "CXXFLAGS", e.g. FCFLAGS="-O3 -xAVX"
Check the available options with "configure --help".
If available you can e.g. choose especially optimized elpa kernels
for your system.
Set the "prefix" - flag, if you wish another installation location than
the default "/usr/local/"
2) run "make"
3) run "make check"
a simple test of ELPA is done. At the moment the usage of "mpiexec"
is required. If this is not possible at your system, you can run the
binaries "test_real", "test_real2", "test_complex", and "test_complex2"
yourself. At the moment the tests check whether the residual and the
orthogonality of the found eigenvectors are lower than a threshold of
5e-12. If this test fails, or if you believe the threshold should be
even lower, please talk to us.
4) run "make install"
Note that a pckconfig file for ELPA is produced
How to use ELPA:
Using ELPA should be quite simple. It is similiar to ScalaPack but the API
is different. See the examples in the directory "./test". There is shown how
to evoke ELPA from a Fortran code.
If you installed ELPA with the build procedure a pk-config file is produced.
# libelpa
libelpa_la_SOURCES = src/elpa1.f90 src/elpa2.f90
libelpa_la_SOURCES += src/elpa2_kernels_bg.f90
libelpa_la_SOURCES += src/elpa2_kernels.f90
libelpa_la_LDFLAGS = -version-info $(ELPA_SO_VERSION)
# install any .mod files in the include/ dir
elpa_includedir = $(includedir)/elpa
nobase_elpa_include_HEADERS = $(wildcard modules/*)
# other files to distribute
filesdir = $(datarootdir)
files_DATA = \
test/read_real.f90 \
test/read_real_gen.f90 \
test/test_complex2.f90 \
test/test_complex.f90 \
test/test_complex_gen.f90 \
test/test_real2.f90 \
test/test_real.f90 \
# pkg-config stuff
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = elpa.pc
# test programs
#bindir = $(abs_top_builddir)
bin_PROGRAMS = test_real test_real2 test_complex test_complex2
test_real_SOURCES = test/test_real.f90
test_real_LDADD =
test_real2_SOURCES = test/test_real2.f90
test_real2_LDADD =
test_complex_SOURCES = test/test_complex.f90
test_complex_LDADD =
test_complex2_SOURCES = test/test_complex2.f90
test_complex2_LDADD =
check_SCRIPTS =
TESTS = $(check_SCRIPTS)
echo "mpiexec -n 2 ./test_real > /dev/null 2>&1" >
chmod +x
echo "mpiexec -n 2 ./test_real2 > /dev/null 2>&1" >
chmod +x
echo "mpiexec -n 2 ./test_complex > /dev/null 2>&1" >
chmod +x
echo "mpiexec -n 2 ./test_complex2 > /dev/null 2>&1" >
chmod +x
This diff is collapsed.
Welcome to the git-based distribution of the ELPA eigensolver library.
If you are reading this file, you have obtained the ELPA library
through the git repository that hosts the source code and also allows
you to contribute improvements to the project if necessary.
In your use of ELPA, please respect the copyright restrictions
found below and in the "COPYING" directory in this repository. In a
nutshell, if you make improvements to ELPA, copyright for such
improvements remains with you, but we request that you relicense any
such improvements under the same exact terms of the (modified) LGPL v3
that we are using here. Please do not simply absorb ELPA into your own
project and then redistribute binary-only without making your exact
version of the ELPA source code (unmodified or MODIFIED) available as
*** Citing:
A description of some algorithms present in ELPA can be found in:
T. Auckenthaler, V. Blum, H.-J. Bungartz, T. Huckle, R. Johanni,
L. Kr\"amer, B. Lang, H. Lederer, and P. R. Willems,
"Parallel solution of partial symmetric eigenvalue problems from
electronic structure calculations",
Parallel Computing 37, 783-794 (2011).
Please cite this paper when using ELPA. We also intend to publish an
overview description of the ELPA library as such, and ask you to
make appropriate reference to that as well, once it appears.
*** Copyright:
Copyright of the original code rests with the authors inside the ELPA
consortium. The code is distributed under the terms of the GNU Lesser General
Public License version 3 (LGPL).
Please also note the express "NO WARRANTY" disclaimers in the GPL.
Please see the file "COPYING" for details, and the files "gpl.txt" and
"lgpl.txt" for further information.
*** Using ELPA:
ELPA is designed to be compiled (Fortran) on its own, to be later
linked to your own application. In order to use ELPA, you must still
have a set of separate libraries that provide
- Basic Linear Algebra Subroutines (BLAS)
- Lapack routines
- Basic Linear Algebra Communication Subroutines (BLACS)
- Scalapack routines
- a working MPI library
Appropriate libraries can be obtained and compiled separately on many
architectures as free software. Alternatively, pre-packaged libraries
are usually available from any HPC proprietary compiler vendors.
For example, Intel's ifort compiler contains the "math kernel library"
(MKL), providing BLAS/Lapack/BLACS/Scalapack functionality. (except on
Mac OS X, where the BLACS and Scalapack part must still be obtained
and compiled separately).
A very usable general-purpose MPI library is OpenMPI (ELPA was tested
with OpenMPI 1.4.3 for example). Intel MPI seems to be a very well
performing option on Intel platforms.
Examples of how to use ELPA are included in the accompanying
test_*.f90 subroutines in the "test" directory. An example makefile
"Makefile.example" is also included as a minimal example of how to
build and link ELPA to any other piece of code. In general, however,
we suggest to use the build environment in order to install ELPA
as library to your system.
*** Structure of this repository:
* README file - this file. Please also consult the ELPA Wiki, and
consider adding any useful information that you may have.
* COPYING directory - the copyright and licensing information for ELPA.
* src directory - contains all the files that are needed for the
actual ELPA subroutines. If you are attempting to use ELPA in your
own application, these are the files which you need.
- elpa1.f90 contains routines for the one-stage solver,
The 1 stage solver (elpa1.f90) can be used standalone without elpa2.
- elpa2.f90 - ADDITIONAL routines needed for the two-stage solver
elpa2.f90 requires elpa1.f90 and a version of elpa2_kernels.f90, so
always compile them together.
- elpa2_kernels.f90 - optimized linear algebra kernels for ELPA.
This file is a generic version of optimized linear algebra kernels
for use with the ELPA library. The standard elpa2_kernels.f90 runs
on every platform but it is optimized for the Intel SSE instruction
set. Best perfomance is achieved with the Intel ifort compiler and
compile flags -O3 -xSSE4.2
For optimum performance on special architectures, you may wish to
investigate whether hand-tuned versions of this file give additional
gains. If so, simply remove elpa2_kernels.f90 from your compilation
and replace with the version of your choice. It would be great if
you could contribute such hand-tuned versions back to the
repository. (LGPL requirement for redistribution holds in any case)
- elpa2_kernels_bg.f90
Example of optimized ELPA kernels for the BlueGene/P
architecture. Use instead of the standard elpa2_kernels.f90
file. elpa2_kernels_bg.f90 contains assembler instructions for the
BlueGene/P processor which IBM's xlf Fortran compiler can handle.
* test directory
- Contains the Makefile that demonstrates how to compile and link to
the ELPA routines
- All files starting with test_... are for demonstrating the use
of the elpa library (but not needed for using it).
- All test programs solve a eigenvalue problem and check the correctnes
of the result by evaluating || A*x - x*lamba || and checking the
orthogonality of the eigenvectors
test_real Real eigenvalue problem, 1 stage solver
test_real_gen Real generalized eigenvalue problem, 1 stage solver
test_complex Complex eigenvalue problem, 1 stage solver
test_complex_gen Complex generalized eigenvalue problem, 1 stage solver
test_real2 Real eigenvalue problem, 2 stage solver
test_complex2 Complex eigenvalue problem, 2 stage solver
- There are two programs which read matrices from a file, solve the
eigenvalue problem, print the eigenvalues and check the correctness
of the result (all using elpa1 only)
read_real for the real eigenvalue problem
read_real_gen for the real generalized eigenvalue problem
A*x - B*x*lambda = 0
read_real has to be called with 1 command line argument (the file
containing the matrix). The file must be in ASCII (formatted) form.
read_real_gen has to be called with 3 command line arguments. The
first argument is either 'asc' or 'bin' (without quotes) and
determines the format of the following files. 'asc' refers to ASCII
(formatted) and 'bin' to binary (unformatted). Command line
arguments 2 and 3 are the names of the files which contain matrices
A and B.
The structure of the matrix files for read_real and read_real_gen
depends on the format of the files:
* ASCII format (both read_real and read_real_gen):
The files must contain the following lines:
- 1st line containing the matrix size
- then following the upper half of the matrix in column-major
(i.e. Fortran) order, one number per line:
* Binary format (read_real_gen only):
The files must contain the following records:
- 1st record: matrix size (type integer)
- 2nd record: a(1,1)
- 3rd record: a(1,2) a(2,2)
- ...
- ... a(1,i) ... a(i,i)
- ...
- ... a(1,n) ... a(n,n)
The type of the matrix elements a(i,j) is real*8.
This diff is collapsed.
/* Generated from by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
/* Define to 1 if you have the <inttypes.h> header file. */
/* Define to 1 if you have the <memory.h> header file. */
/* Define to 1 if you have the <stdint.h> header file. */
/* Define to 1 if you have the <stdlib.h> header file. */
/* Define to 1 if you have the <strings.h> header file. */
/* Define to 1 if you have the <string.h> header file. */
/* Define to 1 if you have the <sys/stat.h> header file. */
/* Define to 1 if you have the <sys/types.h> header file. */
/* Define to 1 if you have the <unistd.h> header file. */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
#undef LT_OBJDIR
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
/* Define to the full name of this package. */
/* Define to the full name and version of this package. */
/* Define to the one symbol short name of this package. */
/* Define to the home page for this package. */
/* Define to the version of this package. */
/* Define to 1 if you have the ANSI C header files. */
/* Version number of package */
#undef VERSION
This diff is collapsed.
AM_INIT_AUTOMAKE([foreign -Wall subdir-objects])
if test x$_cv_gnu_make_command = x ; then
if test "x${CPP_FOUND}" = xno; then
AC_MSG_ERROR([no cpp found])
# gnu-make fortran module dependencies
dnl check whether an mpi compiler is available;
dnl if not abort since it is mandatory
if test "x${have_mpi}" = xno; then
AC_MSG_ERROR([no mpi found])
AC_SUBST([ELPA_LIB_VERSION], [2011.12.002])
# this is the version of the API, should be changed in the major revision
# if and only if the actual API changes
dnl check different elpa
AC_MSG_CHECKING([whether the BG/P kernel was specified])
[use kernel tuned for Bluegene/P])],
AM_CONDITIONAL([WITH_BGP],[test x"$with_bgp_kernel" = x"yes"])
dnl check whether one can link with specified MKL (desired method)
AC_MSG_CHECKING([whether we can compile a Fortran program using MKL])
program test_mkl
use mkl_service
character*198 :: string
call mkl_get_version_string(string)
write(*,'(a)') string
end program
if test x"$can_compile_with_mkl" = x"yes" ; then
AC_MSG_CHECKING([whether we can link a Fortran program with MKL])
program test_mkl
use mkl_service
character*198 :: string
call mkl_get_version_string(string)
write(*,'(a)') string
end program
dnl if not mkl, check all the necessary individually
if test "x${can_link_with_mkl}" = "xyes" ; then
dnl first check blas
AC_MSG_CHECKING([whether we can link a program with a blas lib])
if test "x${can_link_with_blas}" = "xno" ; then
AC_MSG_ERROR([could not link with blas: specify path])
dnl now lapack
AC_MSG_CHECKING([whether we can link a program with a lapack lib])
if test "x${can_link_with_lapack}" = "xno" ; then
AC_MSG_ERROR([could not link with lapack: specify path])
dnl now blacs
AC_MSG_CHECKING([whether we can link a program with a blacs lib])
if test "x${can_link_with_blacs}" = "xno" ; then
AC_MSG_ERROR([could not link with blacs: specify path])
dnl now scalapack
AC_MSG_CHECKING([whether we can link a program with a scalapack lib])
if test "x${can_link_with_scalapack}" = "xno" ; then
AC_MSG_ERROR([could not link with scalapack: specify path])
dnl check whether we can link alltogehter
AC_MSG_CHECKING([whether we can link a Fortran program with all blacs/scalapack])
program dgemm_test
integer , parameter:: n_cols=3,l_cols=3
real :: hvm(n_cols,l_cols)
call dgemm('T','N',n_cols,n_cols,l_cols,1.,hvm,ubound(hvm,1), &
end program dgemm_test
if test "x${can_link_with_blacs_scalapack}" = "xyes" ; then
AC_MSG_ERROR([We can neither link with MKL or another Scalpack. Please specify BLACS_LDFLAGS and BLACS_FCFLAGS!])
dnl important: reset them again!