There is a maintenance of MPCDF Gitlab on Thursday, April 22st 2020, 9:00 am CEST - Expect some service interruptions during this time

elpa.spec 10.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#
# 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

22 23 24 25 26 27 28 29 30 31 32 33
# Logic to figure out if we are on SLES-11-SP4, which need special
# treatment (custom compiler package name, old RPM macros)
%if 0%{suse_version} > 0
%if 0%{suse_version} <= 1110
%define sle_11_sp4 1
%else
%define sle_11_sp4 0
%endif
%else
%define sle_11_sp4 0
%endif

34
Name:           elpa
35
Version:        2016.05.002
36 37 38 39 40 41 42
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
43
# For SLE_11_SP4:
44
%if %{sle_11_sp4} == 1
45 46 47
BuildRequires:  gcc48-c++
BuildRequires:  gcc48-fortran
%else
48 49
BuildRequires:  gcc-c++ >= 4.8
BuildRequires:  gcc-fortran >= 4.8
50 51
%endif
BuildRequires:  strace
52 53 54 55
BuildRequires:  openmpi-devel
BuildRequires:  blas-devel
BuildRequires:  lapack-devel
BuildRequires:  pkg-config
56 57 58
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
59 60 61 62 63 64 65 66 67 68 69 70 71

%if %{defined fedora}
BuildRequires:  scalapack-openmpi-devel
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
72
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197

%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
198
if [ ! -e configure ] ; then
199 200 201 202 203 204 205 206 207
        # It is possible to use the Open Build Server to automatically
        # checkout from git directly, extract this spec file and set the
        # version of the extracted spec file to some autogenerated
        # string based on the date and git hash of the checkout commit.
        # This line ensures that the spec file in the tar-ball has
        # that same version, so that autogen will inserted that version
        # in the configure script
        perl -pi -e "s/^Version:.*/Version: %{version}/" elpa.spec

208 209
        ./autogen.sh
fi
210 211

# Set-up compilers for SLE_11_SP4
212
%if %{sle_11_sp4} == 1
213 214 215 216 217 218 219 220 221
mkdir compilers
pushd compilers
ln -s /usr/bin/gfortran-4.8 gfortran
ln -s /usr/bin/gcc-4.8 gcc
export PATH=$PWD:$PATH
pushd
%endif

# Normal build
222 223 224
mkdir build
pushd build
%define _configure ../configure
225 226 227

# ancient SLE_11_SP4 cannot deal with configure in sub-directory
# via _configure macro
228
%if %{sle_11_sp4} == 1
229 230 231
ln -s ../configure .
%endif

232 233 234 235
%configure --docdir=%{_docdir}/%{name}-%{version}
make %{?_smp_mflags} V=1
popd

236 237

# OpenMP build
238 239 240
%if %{defined with_openmp}
mkdir build_openmp
pushd build_openmp
241 242 243 244 245 246 247

# ancient SLE_11_SP4 cannot deal with configure in sub-directory
# via _configure macro
%if %{?suse_version:%{suse_version}}%{!?suse_version:1200} <= 1110
ln -s ../configure .
%endif

248 249 250 251 252 253 254 255 256 257 258 259
%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
260
make check TEST_FLAGS="1500 50 16" || { echo "Tests failed: Content of ./test-suite.log:"; cat ./test-suite.log; echo; exit 1; }
261 262 263 264
popd

%if %{defined with_openmp}
pushd build_openmp
265
make check TEST_FLAGS="1500 50 16" || { echo "Tests failed: Content of ./test-suite.log:"; cat ./test-suite.log; echo; exit 1; }
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
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
291
%defattr(-,root,root)
292 293 294 295 296 297 298 299 300
%{_libdir}/lib%{name}.so.*
%{_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
301
%defattr(-,root,root)
302 303 304 305 306 307 308
%{_libdir}/pkgconfig/%{name}-%{version}.pc
%{_includedir}/%{name}-%{version}
%{_libdir}/lib%{name}.so
%{_libdir}/lib%{name}.la
%_mandir/man3/*

%files devel-static
309
%defattr(-,root,root)
310 311 312 313 314
%{_libdir}/lib%{name}.a

%if %{defined with_openmp}

%files -n lib%{name}_openmp%{so_version}
315
%defattr(-,root,root)
316 317 318 319 320
%{_libdir}/lib%{name}_openmp.so.*
%{_docdir}/%{name}_openmp-%{version}/*
%dir %{_docdir}/%{name}_openmp-%{version}

%files -n %{name}_openmp-tools
321
%defattr(-,root,root)
322 323 324
%{_bindir}/elpa2_print_kernels_openmp

%files -n %{name}_openmp-devel
325
%defattr(-,root,root)
326 327 328 329 330 331
%{_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
332
%defattr(-,root,root)
333 334 335
%{_libdir}/lib%{name}_openmp.a

%endif
336 337

%changelog