Commit f2a8a0cc authored by Lorenz Huedepohl's avatar Lorenz Huedepohl

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
variable.
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
build!
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.
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
AM_FCFLAGS = @AM_FCFLAGS@ @FC_MODINC@modules @FC_MODOUT@modules
AM_LDFLAGS = @AM_LDFLAGS@ @BLACS_LDFLAGS@
BLACS_LDFLAGS = @BLACS_LDFLAGS@
# libelpa
lib_LTLIBRARIES = libelpa.la
libelpa_la_SOURCES = src/elpa1.f90 src/elpa2.f90
if WITH_BGP
libelpa_la_SOURCES += src/elpa2_kernels_bg.f90
else
libelpa_la_SOURCES += src/elpa2_kernels.f90
endif
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 \
test/test_real_gen.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 = libelpa.la
test_real2_SOURCES = test/test_real2.f90
test_real2_LDADD = libelpa.la
test_complex_SOURCES = test/test_complex.f90
test_complex_LDADD = libelpa.la
test_complex2_SOURCES = test/test_complex2.f90
test_complex2_LDADD = libelpa.la
check_SCRIPTS = test_real.sh test_real2.sh test_complex.sh test_complex2.sh
TESTS = $(check_SCRIPTS)
test_real.sh:
echo "mpiexec -n 2 ./test_real > /dev/null 2>&1" > test_real.sh
chmod +x test_real.sh
test_real2.sh:
echo "mpiexec -n 2 ./test_real2 > /dev/null 2>&1" > test_real2.sh
chmod +x test_real2.sh
test_complex.sh:
echo "mpiexec -n 2 ./test_complex > /dev/null 2>&1" > test_complex.sh
chmod +x test_complex.sh
test_complex2.sh:
echo "mpiexec -n 2 ./test_complex2 > /dev/null 2>&1" > test_complex2.sh
chmod +x test_complex2.sh
CLEANFILES = test_real.sh test_real2.sh test_complex.sh test_complex2.sh
@FORTRAN_MODULE_DEPS@
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
well.
*** 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).
doi:10.1016/j.parco.2011.05.002.
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:
a(1,1)
a(1,2)
a(2,2)
...
a(1,i)
...
a(i,i)
...
a(1,n)
...
a(n,n)
* 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.
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* 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. */
#undef NO_MINUS_C_MINUS_O
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
This diff is collapsed.
AC_PREREQ([2.69])
AC_INIT([elpa],[2011.12.002], elpa-library@rzg.mpg.de)
AC_CONFIG_SRCDIR([src/elpa1.f90])
AM_INIT_AUTOMAKE([foreign -Wall subdir-objects])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_SILENT_RULES([yes])
AX_CHECK_GNU_MAKE()
if test x$_cv_gnu_make_command = x ; then
AC_MSG_ERROR([Need GNU Make])
fi
AC_CHECK_PROG(CPP_FOUND,cpp,yes,no)
if test "x${CPP_FOUND}" = xno; then
AC_MSG_ERROR([no cpp found])
fi
# gnu-make fortran module dependencies
m4_include([fdep/fortran_dependencies.m4])
FDEP_F90_GNU_MAKE_DEPS
AC_PROG_INSTALL
#AC_PROG_CPP
AM_PROG_CC_C_O
AM_PROG_AR
AC_LANG(Fortran)
m4_include([m4/ax_prog_fc_mpi.m4])
dnl check whether an mpi compiler is available;
dnl if not abort since it is mandatory
AX_PROG_FC_MPI([],[have_mpi=yes],[have_mpi=no
if test "x${have_mpi}" = xno; then
AC_MSG_ERROR([no mpi found])
fi])
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
AC_SUBST([ELPA_SO_VERSION], [0:0:0])
AC_FC_FREEFORM
AC_FC_MODULE_FLAG
AC_FC_MODULE_OUTPUT_FLAG
dnl check different elpa
AC_MSG_CHECKING([whether the BG/P kernel was specified])
AC_ARG_WITH([BGP-kernel],
[AS_HELP_STRING([--with-BGP-kernel],
[use kernel tuned for Bluegene/P])],
[with_bgp_kernel=yes],[with_bgp_kernel=no])
AM_CONDITIONAL([WITH_BGP],[test x"$with_bgp_kernel" = x"yes"])
AC_MSG_RESULT([${with_bgp_kernel}])
save_FCFLAGS=$FCFLAGS
save_LDFLAGS=$LDFLAGS
FCFLAGS="$FCFLAGS $BLACS_FCFLAGS"
LDFLAGS="$LDFLAGS $BLACS_LDFLAGS"
dnl check whether one can link with specified MKL (desired method)
AC_MSG_CHECKING([whether we can compile a Fortran program using MKL])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
program test_mkl
use mkl_service
character*198 :: string
call mkl_get_version_string(string)
write(*,'(a)') string
end program
])],
[can_compile_with_mkl=yes],
[can_compile_with_mkl=no]
)
AC_MSG_RESULT([${can_compile_with_mkl}])