[elpa] - initial import

Dominik Mierzejewski rathann at fedoraproject.org
Tue Jul 1 21:36:22 UTC 2014


commit 61aead22b4f8d9a3ada4e541904aa7ee007518fe
Author: Dominik 'Rathann' Mierzejewski <dominik at greysector.net>
Date:   Tue Jul 1 23:27:49 2014 +0200

    - initial import

 .gitignore           |    1 +
 elpa-atlas.patch     |   12 +++
 elpa-rpm.patch       |   92 +++++++++++++++++
 elpa-scalapack.patch |   12 +++
 elpa.spec            |  269 ++++++++++++++++++++++++++++++++++++++++++++++++++
 sources              |    1 +
 6 files changed, 387 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e32e815 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/ELPA_2013.11.008_20140321.tar.gz
diff --git a/elpa-atlas.patch b/elpa-atlas.patch
new file mode 100644
index 0000000..d37b8bd
--- /dev/null
+++ b/elpa-atlas.patch
@@ -0,0 +1,12 @@
+diff -up mpich/configure.ac.blacs mpich/configure.ac
+--- mpich/configure.ac.blacs	2014-03-21 12:10:21.000000001 +0100
++++ mpich/configure.ac	2014-06-29 22:47:36.214804126 +0200
+@@ -274,7 +274,7 @@ if test "x${can_link_with_mkl}" = "xyes"
+ else
+ 
+   dnl first check blas
+-  AC_SEARCH_LIBS([dgemm],[blas],[can_link_with_blas=yes],[can_link_with_blas=no])
++  AC_SEARCH_LIBS([dgemm],[satlas blas],[can_link_with_blas=yes],[can_link_with_blas=no])
+   AC_MSG_CHECKING([whether we can link a program with a blas lib])
+   AC_MSG_RESULT([${can_link_with_blas}])
+ 
diff --git a/elpa-rpm.patch b/elpa-rpm.patch
new file mode 100644
index 0000000..7be357d
--- /dev/null
+++ b/elpa-rpm.patch
@@ -0,0 +1,92 @@
+diff -up mpich/configure.ac.r mpich/configure.ac
+--- mpich/configure.ac.r	2014-06-26 12:57:49.488978955 +0200
++++ mpich/configure.ac	2014-06-26 12:57:49.489978947 +0200
+@@ -374,6 +374,7 @@ mkdir modules
+ AC_CONFIG_FILES([
+   Makefile
+   elpa.pc:elpa.pc.in
++  elpa_mt.pc:elpa_mt.pc.in
+ ])
+ AC_OUTPUT
+ grep "^#define" config.h > config-f90.h
+diff -up mpich/elpa_mt.pc.in.r mpich/elpa_mt.pc.in
+--- mpich/elpa_mt.pc.in.r	2014-06-26 12:57:49.489978947 +0200
++++ mpich/elpa_mt.pc.in	2014-06-26 12:57:49.489978947 +0200
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE_NAME@
++Description: ELPA is a Fortran-based high-performance computational library for the (massively) parallel solution of symmetric or Hermitian, standard or generalized eigenvalue problems.
++Version: @PACKAGE_VERSION@
++URL: @PACKAGE_URL@
++Libs: -L${libdir} -lelpa_mt
++fcflags= -I${libdir}/gfortran/modules
+diff -up mpich/elpa.pc.in.r mpich/elpa.pc.in
+--- mpich/elpa.pc.in.r	2013-10-28 15:48:06.000000001 +0100
++++ mpich/elpa.pc.in	2014-06-26 12:57:49.489978947 +0200
+@@ -7,6 +7,5 @@ Name: @PACKAGE_NAME@
+ Description: ELPA is a Fortran-based high-performance computational library for the (massively) parallel solution of symmetric or Hermitian, standard or generalized eigenvalue problems.
+ Version: @PACKAGE_VERSION@
+ URL: @PACKAGE_URL@
+-Libs: -L${libdir} -lelpa- at ELPA_LIB_VERSION@
+-Cflags: -I${includedir}/elpa- at ELPA_LIB_VERSION@
+-fcflags= -I${includedir}/elpa- at ELPA_LIB_VERSION@/modules
++Libs: -L${libdir} -lelpa
++fcflags= -I${libdir}/gfortran/modules
+diff -up mpich/Makefile.am.r mpich/Makefile.am
+--- mpich/Makefile.am.r	2014-02-27 14:47:20.000000001 +0100
++++ mpich/Makefile.am	2014-06-26 13:05:18.698163114 +0200
+@@ -19,8 +19,14 @@ endif
+ 
+ if WITH_OPENMP
+ libelpa_mt_la_SOURCES = src/elpa1.F90 src/elpa2.F90
++libelpa_mt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
++	$(LIBTOOLFLAGS) --mode=link $(FC) $(AM_FCLAGS) \
++	$(FCFLAGS) $(libelpa_la_LDFLAGS) $(LDFLAGS) -o $@
+ else
+ libelpa_la_SOURCES = src/elpa1.F90 src/elpa2.F90
++libelpa_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
++	$(LIBTOOLFLAGS) --mode=link $(FC) $(AM_FCLAGS) \
++	$(FCFLAGS) $(libelpa_la_LDFLAGS) $(LDFLAGS) -o $@
+ endif
+ 
+ if WITH_GENERIC_SIMPLE
+@@ -164,7 +170,11 @@ files_DATA = \
+ 
+ # pkg-config stuff
+ pkgconfigdir = $(libdir)/pkgconfig
++if WITH_OPENMP
++pkgconfig_DATA = elpa_mt.pc
++else
+ pkgconfig_DATA = elpa.pc
++endif
+ 
+ # test programs
+ if WITH_OPENMP
+@@ -193,19 +203,19 @@ check_SCRIPTS = test_real.sh test_real2.
+ TESTS = $(check_SCRIPTS)
+ 
+ test_real.sh:
+-	echo "mpiexec -n 2 ./test_real > /dev/null 2>&1" > test_real.sh
++	echo "mpiexec -n `getconf _NPROCESSORS_ONLN` ./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
++	echo "mpiexec -n `getconf _NPROCESSORS_ONLN` ./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
++	echo "mpiexec -n `getconf _NPROCESSORS_ONLN` ./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
++	echo "mpiexec -n `getconf _NPROCESSORS_ONLN` ./test_complex2 > /dev/null 2>&1" > test_complex2.sh
+ 	chmod +x test_complex2.sh	
+ 
+ 
diff --git a/elpa-scalapack.patch b/elpa-scalapack.patch
new file mode 100644
index 0000000..8f0122d
--- /dev/null
+++ b/elpa-scalapack.patch
@@ -0,0 +1,12 @@
+diff -up mpich/configure.ac.r mpich/configure.ac
+--- mpich/configure.ac.r	2014-05-19 22:31:26.000000000 +0200
++++ mpich/configure.ac	2014-06-07 16:30:09.806374359 +0200
+@@ -300,7 +300,7 @@ else
+   fi
+ 	
+   dnl now scalapack
+-  AC_SEARCH_LIBS([pdtran],[mpiscalapack],[can_link_with_scalapack=yes],[can_link_with_scalapack=no])
++  AC_SEARCH_LIBS([pdtran],[scalapack],[can_link_with_scalapack=yes],[can_link_with_scalapack=no])
+   AC_MSG_CHECKING([whether we can link a program with a scalapack lib])
+   AC_MSG_RESULT([${can_link_with_scalapack}])
+ 
diff --git a/elpa.spec b/elpa.spec
new file mode 100644
index 0000000..e3be2a8
--- /dev/null
+++ b/elpa.spec
@@ -0,0 +1,269 @@
+%global rel 008
+%global snap 20140321
+
+Summary: High-performance library for parallel solution of eigenvalue problems
+Name: elpa
+Version: 2013.11
+Release: 3.%{rel}%{?dist}
+URL: http://elpa.rzg.mpg.de/
+# http://elpa.rzg.mpg.de/elpa-tar-archive/elpa-2013-11.006/at_download/file
+Source0: ELPA_%{version}.%{rel}_%{snap}.tar.gz
+# fix scalapack detection on F21+
+Patch0: elpa-scalapack.patch
+# fix pkgconfig files and linking against mpi libraries
+Patch1: elpa-rpm.patch
+# build against atlas instead of reference blas
+Patch2: elpa-atlas.patch
+License: LGPLv3+
+BuildRequires: atlas-devel
+BuildRequires: gcc-gfortran
+BuildRequires: libtool
+BuildRequires: prelink
+
+%description
+ELPA is a Fortran-based high-performance computational library for the
+(massively) parallel solution of symmetric or Hermitian, standard or generalized
+eigenvalue problems.
+
+This is the kind of eigenvalue problem which is frequently encountered in
+Electronic Structure Theory (solution of Schrödinger's Equation or variants
+thereof), but also in many other fields. Typically, the solution effort scales
+as O(size^3), where "size" is a measure of the system size, for example the
+dimension of the associated matrices or the number of required
+eigenvalue/eigenvector pairs (less than or equal to the matrix dimension). Thus,
+an algebraically exact solution of the eigenproblem may quickly become the
+bottleneck in a practical application.
+
+%package common
+Summary: Common files for ELPA
+BuildArch: noarch
+
+%description common
+ELPA is a Fortran-based high-performance computational library for the
+(massively) parallel solution of symmetric or Hermitian, standard or generalized
+eigenvalue problems.
+
+This package contains common files for ELPA.
+
+%package mpich
+Summary: Fast library for parallel solution of eigenvalue problems (MPICH version)
+BuildRequires: mpich-devel
+BuildRequires: blacs-mpich-devel
+BuildRequires: scalapack-mpich-devel
+Requires: blacs-mpich
+Requires: scalapack-mpich
+Requires: %{name}-common = %{version}-%{release}
+
+%description mpich
+ELPA is a Fortran-based high-performance computational library for the
+(massively) parallel solution of symmetric or Hermitian, standard or generalized
+eigenvalue problems.
+
+This package contains ELPA built against MPICH.
+
+%package mpich-devel
+Summary: Development files for ELPA (MPICH version)
+Requires: %{name}-mpich%{?_isa} = %{version}-%{release}
+Requires: gcc-gfortran%{_isa}
+
+%description mpich-devel
+ELPA is a Fortran-based high-performance computational library for the
+(massively) parallel solution of symmetric or Hermitian, standard or generalized
+eigenvalue problems.
+
+This package contains the development files for ELPA (MPICH version).
+
+%package openmpi
+Summary: Fast library for parallel solution of eigenvalue problems (OpenMPI version)
+BuildRequires: openmpi-devel
+BuildRequires: blacs-openmpi-devel
+BuildRequires: scalapack-openmpi-devel
+Requires: blacs-openmpi
+Requires: scalapack-openmpi
+Requires: %{name}-common = %{version}-%{release}
+
+%description openmpi
+ELPA is a Fortran-based high-performance computational library for the
+(massively) parallel solution of symmetric or Hermitian, standard or generalized
+eigenvalue problems.
+
+This package contains ELPA built against OpenMPI.
+
+%package openmpi-devel
+Summary: Development files for ELPA (OpenMPI version)
+Requires: %{name}-openmpi%{?_isa} = %{version}-%{release}
+Requires: gcc-gfortran%{_isa}
+
+%description openmpi-devel
+ELPA is a Fortran-based high-performance computational library for the
+(massively) parallel solution of symmetric or Hermitian, standard or generalized
+eigenvalue problems.
+
+This package contains the development files for ELPA (OpenMPI version).
+
+%global configure_in \\\
+%configure \\\
+ --disable-silent-rules \\\
+ --disable-static \\\
+%ifarch x86_64 \
+ --with-sse-assembler \\\
+%else \
+ --with-generic \\\
+%endif \
+
+%prep
+%setup -q -c -T -a 0
+mv ELPA_%{version} mpich
+pushd mpich
+%patch0 -p1 -b .scalapack
+%patch1 -p1 -b .r
+%patch2 -p1 -b .atlas
+autoreconf -vifs
+popd
+cp -pr mpich openmpi
+mkdir _mt
+cp -pr mpich openmpi _mt/
+
+%build
+export LDFLAGS="-L%{_libdir}/atlas"
+export FCFLAGS=-ffree-line-length-none
+
+%{_mpich_load}
+export LDFLAGS="$LDFLAGS -L$MPI_LIB"
+pushd mpich
+%configure_in \
+ --libdir=%{_libdir}/mpich%{?_opt_cc_suffix}/lib
+
+# work around libtool bug
+sed -i -e 's/-l -l //' libtool
+make
+# %{?_smp_mflags}
+popd
+
+pushd _mt/mpich
+%configure_in \
+ --with-openmp \
+ --libdir=%{_libdir}/mpich%{?_opt_cc_suffix}/lib
+
+# work around libtool bug
+sed -i -e 's/-l -l //' libtool
+make
+# %{?_smp_mflags}
+popd
+%{_mpich_unload}
+
+%{_openmpi_load}
+export LDFLAGS="$LDFLAGS -L$MPI_LIB"
+pushd openmpi
+%configure_in \
+ --libdir=%{_libdir}/openmpi%{?_opt_cc_suffix}/lib
+
+# work around libtool bug
+sed -i -e 's/-l -l //' libtool
+make
+# %{?_smp_mflags}
+popd
+
+pushd _mt/openmpi
+%configure_in \
+ --with-openmp \
+ --libdir=%{_libdir}/openmpi%{?_opt_cc_suffix}/lib
+
+# work around libtool bug
+sed -i -e 's/-l -l //' libtool
+make
+# %{?_smp_mflags}
+popd
+%{_openmpi_unload}
+
+%install
+for s in '' _mt ; do
+  for mpi in mpich openmpi ; do
+    pushd ${s:-.}/${mpi}
+    make DESTDIR=%{buildroot} install
+    execstack -c .libs/libelpa${s}.so.0.* %{buildroot}%{_libdir}/${mpi}%{?_opt_cc_suffix}/lib/libelpa${s}.so.0.*
+    mkdir -p %{buildroot}%{_fmoddir}/${mpi}%{?_opt_cc_suffix}
+    mv %{buildroot}%{_includedir}/elpa/modules/elpa1.mod %{buildroot}%{_fmoddir}/${mpi}%{?_cc_name_suffix}/elpa1${s}.mod
+    mv %{buildroot}%{_includedir}/elpa/modules/elpa2.mod %{buildroot}%{_fmoddir}/${mpi}%{?_cc_name_suffix}/elpa2${s}.mod
+    rm %{buildroot}%{_libdir}/${mpi}%{?_opt_cc_suffix}/lib/libelpa${s}.la
+# fix-up fcflags include path per mpi implementation
+    sed -i -e "/^fcflags.*modules/s,$,/${mpi}," %{buildroot}%{_libdir}/${mpi}/lib/pkgconfig/elpa${s}.pc
+    popd
+  done
+done
+rm %{buildroot}%{_datadir}/*.F90
+rm %{buildroot}%{_bindir}/test*
+
+%if 1
+%check
+%{_mpich_load}
+pushd mpich
+make check
+popd
+pushd _mt/mpich
+make check
+popd
+%{_mpich_unload}
+
+# only non-mt openmpi build can be tested, see bug #1105902
+%{_openmpi_load}
+pushd openmpi
+make check
+popd
+%{_openmpi_unload}
+%endif
+
+%post mpich -p /sbin/ldconfig
+
+%postun mpich -p /sbin/ldconfig
+
+%post openmpi -p /sbin/ldconfig
+
+%postun openmpi -p /sbin/ldconfig
+
+%files common
+%doc mpich/COPYING/* mpich/README
+
+%files mpich
+%{_libdir}/mpich%{?_opt_cc_suffix}/lib/libelpa.so.0*
+%{_libdir}/mpich%{?_opt_cc_suffix}/lib/libelpa_mt.so.0*
+
+%files mpich-devel
+%{_libdir}/mpich%{?_opt_cc_suffix}/lib/libelpa.so
+%{_libdir}/mpich%{?_opt_cc_suffix}/lib/libelpa_mt.so
+%{_libdir}/mpich%{?_opt_cc_suffix}/lib/pkgconfig/elpa.pc
+%{_libdir}/mpich%{?_opt_cc_suffix}/lib/pkgconfig/elpa_mt.pc
+%{_fmoddir}/mpich%{?_cc_name_suffix}/elpa1.mod
+%{_fmoddir}/mpich%{?_cc_name_suffix}/elpa2.mod
+%{_fmoddir}/mpich%{?_cc_name_suffix}/elpa1_mt.mod
+%{_fmoddir}/mpich%{?_cc_name_suffix}/elpa2_mt.mod
+
+# only non-mt openmpi build, see bug #1105902
+%files openmpi
+%{_libdir}/openmpi%{?_opt_cc_suffix}/lib/libelpa.so.0*
+%exclude %{_libdir}/openmpi%{?_opt_cc_suffix}/lib/libelpa_mt.so.0*
+
+%files openmpi-devel
+%{_libdir}/openmpi%{?_opt_cc_suffix}/lib/libelpa.so
+%exclude %{_libdir}/openmpi%{?_opt_cc_suffix}/lib/libelpa_mt.so
+%{_libdir}/openmpi%{?_opt_cc_suffix}/lib/pkgconfig/elpa.pc
+%exclude %{_libdir}/openmpi%{?_opt_cc_suffix}/lib/pkgconfig/elpa_mt.pc
+%{_fmoddir}/openmpi%{?_cc_name_suffix}/elpa1.mod
+%{_fmoddir}/openmpi%{?_cc_name_suffix}/elpa2.mod
+%exclude %{_fmoddir}/openmpi%{?_cc_name_suffix}/elpa1_mt.mod
+%exclude %{_fmoddir}/openmpi%{?_cc_name_suffix}/elpa2_mt.mod
+
+%changelog
+* Sun Jun 29 2014 Dominik Mierzejewski <rpm at greysector.net> 2013.11-3.008
+- fix typo in execstack -c call
+- link against atlas
+
+* Thu Jun 26 2014 Dominik Mierzejewski <rpm at greysector.net> 2013.11-2.008
+- remove executable stack from installed libraries
+- fix undefined non-weak mpi symbols
+- reorder build section and drop some redundant parts
+- add missing gfortran Requires for -devel subpackages
+- use correct URL and provide link to source tarball
+
+* Tue Jun 24 2014 Dominik Mierzejewski <rpm at greysector.net> 2013.11-1.008
+- initial build
diff --git a/sources b/sources
index e69de29..80cd3a3 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+3252a6b370239a27afec8c6c47360442  ELPA_2013.11.008_20140321.tar.gz


More information about the scm-commits mailing list