Commit a049abdf authored by Andreas Marek's avatar Andreas Marek

Merge branch 'master' into ELPA_GPU

parents e9b94af0 716b7f7f
This diff is collapsed.
......@@ -103,11 +103,11 @@ It this is not desired, it is possible to build *ELPA* with only one (not necess
real and complex valued case, respectively. This can be done with the "--with-real-..-kernel-only" and
"--with-complex-..-kernel-only" configure options. For details please do a "configure --help"
### Non MPI one node shared-memory version of ELPA ###
### No MPI, one node shared-memory version of ELPA ###
Since release 2016.05.001 it is possible to build *ELPA* without any MPI support. This version can be used
by applications, which do not have any MPI parallelisation. To set this version, use the
"--enable-shared-memory-only" configure flag. It is strongly recommmended to also set the "--enable-openmp"
"--with-mpi=0" configure flag. It is strongly recommmended to also set the "--enable-openmp"
option, otherwise no parallelisation whatsoever will be present.
### Doxygen documentation ###
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
## Current Release ##
The current release is ELPA 2015.11.001
The current release is ELPA 2016.05.001
## About *ELPA*
......
......@@ -85,7 +85,7 @@ please have a look at the man pages and/or the online documentation (see above)
#### Shared-memory version of *ELPA* ####
If the *ELPA* library has been compiled with the configure option "--enable-shared-memory-only",
If the *ELPA* library has been compiled with the configure option "--with-mpi=0",
no MPI will be used.
Still the **same** call sequence as in the MPI case can be used (see above).
......
AC_PREREQ([2.69])
# Remember to change the version also in elpa.spec
AC_INIT([elpa],[2016.05.001], [elpa-library@mpcdf.mpg.de])
AC_SUBST([PACKAGE_VERSION])
AC_CONFIG_SRCDIR([src/elpa1.F90])
......@@ -19,8 +21,6 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_SILENT_RULES([yes])
rm -rf config.h config-f90.h
# Set the libtool library version, see LIBRARY_INTERFACE
#
# See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
......@@ -68,25 +68,21 @@ if test x"${enable_openmp}" = x"yes"; then
AC_DEFINE([WITH_OPENMP], [1], [use OpenMP threading])
fi
AC_MSG_CHECKING(whether --enable-shared-memory-only is specified)
AC_ARG_ENABLE([shared-memory-only],
AS_HELP_STRING([--enable-shared-memory-only],
[do not use MPI; ELPA will be build for one node shared-memory runs only]),
[],
[enable_shared_memory_only=no])
AC_MSG_RESULT([${enable_shared_memory_only}])
AM_CONDITIONAL([WITH_MPI],[test x"$enable_shared_memory_only" = x"no"])
if test x"${enable_shared_memory_only}" = x"no"; then
AC_DEFINE([WITH_MPI], [1], [use MPI])
dnl mpi
AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi=[[yes|no]]], [compile with MPI. Default: yes])],,[with_mpi=yes])
AM_CONDITIONAL([WITH_MPI],[test x"with_mpi" = x"yes"])
if test x"${with_mpi}" = x"yes"; then
AC_DEFINE([WITH_MPI], [1], [use MPI])
fi
dnl check whether mpi compilers are available;
dnl if not abort since it is mandatory
# C
AC_LANG([C])
AX_PROG_CC_MPI([test x"$enable_shared_memory_only" = xno],[use_mpi=yes],[use_mpi=no])
AX_PROG_CC_MPI([test x"$with_mpi" = x"yes"],[found_mpi_c=yes],[found_mpi_c=no])
if test x"$with_mpi" = x"yes"; then
if test x"$found_mpi_c" = x"no"; then
AC_MSG_ERROR([Could not compile an MPI C program])
fi
fi
if test x"${enable_openmp}" = x"yes"; then
AX_ELPA_OPENMP
......@@ -111,7 +107,12 @@ AC_MSG_RESULT([${want_single_precision}])
AC_LANG([Fortran])
m4_include([m4/ax_prog_fc_mpi.m4])
AX_PROG_FC_MPI([test x"$enable_shared_memory_only" = xno],[use_mpi=yes],[use_mpi=no])
AX_PROG_FC_MPI([test x"$with_mpi" = x"yes"],[found_mpi_f=yes],[found_mpi_f=no])
if test x"$with_mpi" = x"yes"; then
if test x"$found_mpi_f" = x"no"; then
AC_MSG_ERROR([Could not compile an MPI Fortran program])
fi
fi
if test x"${enable_openmp}" = x"yes"; then
AX_ELPA_OPENMP
if test "$ac_cv_prog_fc_openmp" = unsupported; then
......@@ -495,9 +496,9 @@ else
AC_MSG_ERROR([could not link with lapack: specify path])
fi
if test x"${enable_shared_memory_only}" = x"no"; then
if test x"${with_mpi}" = x"yes"; then
dnl test whether scalapack already contains blacs
scalapack_libs="mpiscalapack scalapack"
scalapack_libs="mpiscalapack scalapack scalapack-openmpi"
old_LIBS="$LIBS"
for lib in ${scalapack_libs}; do
LIBS="-l${lib} ${old_LIBS}"
......@@ -514,6 +515,12 @@ else
dnl Test for stand-alone blacs
AC_SEARCH_LIBS([bi_f77_init],[mpiblacsF77init],[],[],[-lmpiblacs])
dnl for debian
AC_SEARCH_LIBS([blacs_gridinit],[blacs-openmpi],[have_blacs=yes],[have_blacs=no],[-lblacsCinit-openmpi -lscalapack-openmpi])
if test x"${have_blacs}" = x"no"; then
unset ac_cv_search_blacs_gridinit
fi
AC_SEARCH_LIBS([blacs_gridinit],[mpiblacs blacs],[have_blacs=yes],[have_blacs=no])
if test x"${have_blacs}" = x"no"; then
......@@ -961,26 +968,6 @@ AC_CONFIG_FILES([
AC_OUTPUT
if test -e config.h ; then
grep "^#define" config.h > config-f90.h
else
echo "Warning! No config.h was generated, check for errors and re-run configure!"
exit 1
fi
echo "Generating elpa/elpa_generated.h..."
mkdir -p elpa
grep -h "^ *!c>" $srcdir/src/elpa_c_interface.F90 | sed 's/^ *!c>//;' > elpa/elpa_generated.h || exit 1
echo "Generating Fortran interfaces for C kernels"
grep -h "^ *!f>" $srcdir/src/elpa2_kernels/*.c | sed 's/^ *!f>//;' > elpa/elpa_generated_fortran_interfaces.h || exit 1
#grep -h "^ *!f>" $srcdir/src/elpa2_kernels/*.cpp | sed 's/^ *!f>//;' >> elpa/elpa_generated_fortran_interfaces.h || exit 1
echo "Generating test/shared_sources/generated.h..."
mkdir -p test/shared_sources
grep -h "^ *!c>" $srcdir/test/shared_sources/*.F90 | sed 's/^ *!c>//;' > test/shared_sources/generated.h || exit 1
if test "${can_compile_avx}" = "no" ; then
# if test x"${want_avx}" = x"yes" ; then
AC_MSG_WARN([Could not compile AVX instructions])
......@@ -995,3 +982,5 @@ fi
if test "${can_compile_sse}" = "no" ; then
AC_MSG_WARN([Could not compile SSE instructions])
fi
make -f $srcdir/generated_headers.am generated-headers top_srcdir="$srcdir"
#
# spec file for package elpa
#
# Copyright (c) 2015 Lorenz Hüdepohl
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
%define so_version 4
# OpenMP support requires an MPI implementation with MPI_THREAD_MULTIPLE support,
# which is only available for a sufficiently configured openmpi >= 1.8
# Set to 0 to disable
%define with_openmp 1
Name: elpa
Version: 2016.05.001
Release: 2
Summary: A massively parallel eigenvector solver
License: LGPL-3.0
Group: System/Libraries
Url: https://elpa.rzg.mpg.de/
Source0: https://elpa.mpcdf.mpg.de/html/Releases/%{version}/%{name}-%{version}.tar.gz
Requires: openmpi
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: openmpi-devel
BuildRequires: blas
BuildRequires: blas-devel
BuildRequires: lapack
BuildRequires: lapack-devel
BuildRequires: pkg-config
%if %{defined fedora}
BuildRequires: scalapack-openmpi
BuildRequires: scalapack-openmpi-devel
BuildRequires: blacs-openmpi
BuildRequires: blacs-openmpi-devel
BuildRequires: environment-modules
%endif
%if %{defined suse_version}
BuildRequires: libscalapack2-openmpi-devel
%endif
# For make check, mpirun of openmpi needs an installed openssh
BuildRequires: openssh
%description
A new efficient distributed parallel direct eigenvalue solver for
symmetric matrices. It contains both an improved one-step ScaLAPACK type solver
(ELPA1) and the two-step solver ELPA2.
ELPA uses the same matrix layout as ScaLAPACK. The actual parallel linear
algebra routines are completely rewritten. ELPA1 implements the same linear
algebra as traditional solutions (reduction to tridiagonal form by Householder
transforms, divide & conquer solution, eigenvector backtransform). In ELPA2,
the reduction to tridiagonal form and the corresponding backtransform are
replaced by a two-step version, giving an additional significant performance
improvement.
ELPA has demonstrated good scalability for large matrices on up to 294.000
cores of a BlueGene/P system.
%package -n lib%{name}%{so_version}
Summary: A massively parallel eigenvector solver
Group: System/Libraries
Provides: %{name} = %{version}
Requires: %{name}-tools >= %{version}
%description -n lib%{name}%{so_version}
A new efficient distributed parallel direct eigenvalue solver for
symmetric matrices. It contains both an improved one-step ScaLAPACK type solver
(ELPA1) and the two-step solver ELPA2.
ELPA uses the same matrix layout as ScaLAPACK. The actual parallel linear
algebra routines are completely rewritten. ELPA1 implements the same linear
algebra as traditional solutions (reduction to tridiagonal form by Householder
transforms, divide & conquer solution, eigenvector backtransform). In ELPA2,
the reduction to tridiagonal form and the corresponding backtransform are
replaced by a two-step version, giving an additional significant performance
improvement.
ELPA has demonstrated good scalability for large matrices on up to 294.000
cores of a BlueGene/P system.
%package tools
Summary: Utility program for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}
%description tools
A small tool program for %{name}, elpa2_print_kernels, which prints the available and
currently selected numerical kernel for ELPA2.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}
Requires: openmpi
Requires: libstdc++-devel
Requires: lapack-devel
Requires: blas-devel
Requires: libscalapack2-openmpi-devel
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package devel-static
Summary: Development files for %{name} - static libraries
Group: Development/Libraries
Requires: %{name}-devel
%description devel-static
This package provides the static libraries for developing applications
that use %{name}.
%if %{defined with_openmp}
%package -n lib%{name}_openmp%{so_version}
Requires: openmpi >= 1.8
BuildRequires: openmpi-devel >= 1.8
Summary: A massively parallel eigenvector solver
Group: System/Libraries
Provides: %{name}_openmp = %{version}
Requires: %{name}_openmp-tools >= %{version}
%description -n lib%{name}_openmp%{so_version}
OpenMP parallelized version of %{name}, use with an Open MPI implementation
that was configured and tested with MPI_THREAD_MULTIPLE support.
%package -n %{name}_openmp-tools
Summary: Utility program for %{name}_openmp
Group: Development/Libraries
Provides: %{name}_openmp = %{version}
%description -n %{name}_openmp-tools
A small tool program for %{name}_openmp, elpa2_print_kernels_openmp, which
prints the available and currently selected numerical kernel for ELPA2.
%package -n %{name}_openmp-devel
Summary: Development files for %{name}_openmp
Group: Development/Libraries
Requires: %{name}_openmp = %{version}
Requires: openmpi
Requires: libstdc++-devel
Requires: lapack-devel
Requires: blas-devel
Requires: libscalapack2-openmpi-devel
%description -n %{name}_openmp-devel
The %{name}_openmp-devel package contains libraries and header files for
developing applications that use %{name}_openmp.
%package -n %{name}_openmp-devel-static
Summary: Development files for %{name} - static libraries
Group: Development/Libraries
Requires: %{name}-devel
%description -n %{name}_openmp-devel-static
This package provides the static libraries for developing applications
that use %{name}_openmp.
%endif
%prep
%setup
%build
%if %{defined fedora}
module load mpi/openmpi-%{_arch}
%endif
mkdir build
pushd build
%define _configure ../configure
%configure --docdir=%{_docdir}/%{name}-%{version}
make %{?_smp_mflags} V=1
popd
%if %{defined with_openmp}
mkdir build_openmp
pushd build_openmp
%configure --docdir=%{_docdir}/%{name}_openmp-%{version} --enable-openmp
make %{?_smp_mflags} V=1
popd
%endif
%check
%if %{defined fedora}
module load mpi/openmpi-%{_arch}
%endif
pushd build
make check TEST_FLAGS="1500 50 16" || { echo "Tests failed: Content of ./test-suite.log:"; cat ./test-suite.log; echo; exit 1; }
popd
%if %{defined with_openmp}
pushd build_openmp
make check TEST_FLAGS="1500 50 16" || { echo "Tests failed: Content of ./test-suite.log:"; cat ./test-suite.log; echo; exit 1; }
popd
%endif
%install
%if %{defined with_openmp}
pushd build_openmp
make V=1 install DESTDIR=%{buildroot}
popd
%endif
pushd build
make V=1 install DESTDIR=%{buildroot}
popd
%post -n lib%{name}%{so_version} -p /sbin/ldconfig
%postun -n lib%{name}%{so_version} -p /sbin/ldconfig
%if %{defined with_openmp}
%post -n lib%{name}_openmp%{so_version} -p /sbin/ldconfig
%postun -n lib%{name}_openmp%{so_version} -p /sbin/ldconfig
%endif
%files -n lib%{name}%{so_version}
# See http://en.opensuse.org/openSUSE:Shared_library_packaging_policy
# to explain this package's name
%defattr(0755,root,root)
%{_libdir}/lib%{name}.so.*
%doc
%defattr(0644,root,root)
%{_docdir}/%{name}-%{version}/*
%dir %{_docdir}/%{name}-%{version}
%files tools
%attr(0755,root,root) %{_bindir}/elpa2_print_kernels
%attr(0644,root,root) %_mandir/man1/elpa2_print_kernels.1.gz
%files devel
%defattr(0644,root,root)
%{_libdir}/pkgconfig/%{name}-%{version}.pc
%{_includedir}/%{name}-%{version}
%{_libdir}/lib%{name}.so
%{_libdir}/lib%{name}.la
%_mandir/man3/*
%files devel-static
%defattr(0644,root,root)
%{_libdir}/lib%{name}.a
%if %{defined with_openmp}
%files -n lib%{name}_openmp%{so_version}
%defattr(0755,root,root)
%{_libdir}/lib%{name}_openmp.so.*
%doc
%defattr(0644,root,root)
%{_docdir}/%{name}_openmp-%{version}/*
%dir %{_docdir}/%{name}_openmp-%{version}
%files -n %{name}_openmp-tools
%defattr(0755,root,root)
%{_bindir}/elpa2_print_kernels_openmp
%files -n %{name}_openmp-devel
%defattr(0644,root,root)
%{_libdir}/pkgconfig/%{name}_openmp-%{version}.pc
%{_includedir}/%{name}_openmp-%{version}
%{_libdir}/lib%{name}_openmp.so
%{_libdir}/lib%{name}_openmp.la
%files -n %{name}_openmp-devel-static
%defattr(0644,root,root)
%{_libdir}/lib%{name}_openmp.a
%endif
%changelog
define extract_interface
@echo "Generating $@...";
@grep -h "^ *$1" $^ | sed 's/^ *$1//;' > $@ || { rm $@; exit 1; }
endef
elpa test:
mkdir $@
test/shared_sources: | test
mkdir $@
config-f90.h: config.h
@echo "Generating $@...";
@grep "^#define" $^ > $@ || { rm $@; exit 1; }
elpa/elpa_generated.h: $(top_srcdir)/src/elpa_c_interface.F90 | elpa
$(call extract_interface,!c>)
test/shared_sources/generated.h: $(wildcard $(top_srcdir)/test/shared_sources/*.F90) | test/shared_sources
$(call extract_interface,!c>)
elpa/elpa_generated_fortran_interfaces.h: $(wildcard $(top_srcdir)/src/elpa2_kernels/*.c) | elpa
$(call extract_interface,!f>)
generated_headers= config-f90.h elpa/elpa_generated.h test/shared_sources/generated.h elpa/elpa_generated_fortran_interfaces.h
generated-headers: $(generated_headers)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment