Accepting request 663856 from home:StefanBruens:branches:science

- Refactor spec for _multibuild, currently non-HPC flavors only.
- Setup MPI environment when building MPI flavors, fixes build on
  Tumbleweed, Leap 15.x, SLE 15.

OBS-URL: https://build.opensuse.org/request/show/663856
OBS-URL: https://build.opensuse.org/package/show/science/mumps?expand=0&rev=8
This commit is contained in:
Egbert Eich 2019-01-14 16:47:01 +00:00 committed by Git OBS Bridge
parent 2f0e197c03
commit d46eaf21c6
3 changed files with 199 additions and 302 deletions

6
_multibuild Normal file
View File

@ -0,0 +1,6 @@
<multibuild>
<package>serial</package>
<package>openmpi</package>
<package>openmpi2</package>
<package>mvapich2</package>
</multibuild>

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jan 8 22:53:16 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Refactor spec for _multibuild, currently non-HPC flavors only.
- Setup MPI environment when building MPI flavors, fixes build on
Tumbleweed, Leap 15.x, SLE 15.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Nov 21 14:23:53 UTC 2015 - scorot@free.fr Sat Nov 21 14:23:53 UTC 2015 - scorot@free.fr

View File

@ -16,20 +16,65 @@
# #
%if 0%{?sles_version} %global flavor @BUILD_FLAVOR@
%define _mpi openmpi mvapich2
%else %define pname mumps
%define _mpi openmpi
%if "%flavor" == ""
%define package_name %{pname}
ExclusiveArch: do_not_build
%endif %endif
%if "%{flavor}" == "serial"
%define my_prefix %_prefix
%define my_bindir %_bindir
%define my_libdir %_libdir
%define my_incdir %_includedir
%define my_datadir %_datadir
# Stub MPI library
%define mumps_f77_mpilibs '-lmpiseq"
%endif
%if "%{flavor}" == "openmpi"
%define my_suffix -openmpi
%define mpi_family openmpi
%define mpiprefix %{_libdir}/mpi/gcc/%{mpi_family}
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
%endif
%if "%{flavor}" == "openmpi2"
%define my_suffix -openmpi2
%define mpi_family openmpi2
%define mpiprefix %{_libdir}/mpi/gcc/%{mpi_family}
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
%endif
%if "%{flavor}" == "mvapich2"
%define my_suffix -mvapich2
%define mpi_family mvapich2
%define mpiprefix %{_libdir}/mpi/gcc/%{mpi_family}
%define mumps_f77_mpilibs -lfmpich -lmpich
%endif
%{?mpi_family:%{bcond_without mpi}}%{!?mpi_family:%{bcond_with mpi}}
%if %{with mpi}
%define my_prefix %{mpiprefix}
%define my_bindir %{my_prefix}/bin
%define my_libdir %{my_prefix}/%{_lib}/
%define my_incdir %{my_prefix}/include/
%define my_datadir %{my_prefix}/share/
%endif
Summary: A MUltifrontal Massively Parallel Sparse direct Solver Summary: A MUltifrontal Massively Parallel Sparse direct Solver
License: SUSE-Public-Domain License: SUSE-Public-Domain
Group: System/Libraries Group: System/Libraries
Name: mumps Name: mumps%{?my_suffix}
Version: 4.9.2 Version: 4.9.2
Release: 0 Release: 0
Url: http://mumps.enseeiht.fr/ Url: http://mumps.enseeiht.fr/
Source0: %{name}-%{version}.tar.bz2 Source0: %{pname}-%{version}.tar.bz2
Source1: Makefile.ptscotch.inc Source1: Makefile.ptscotch.inc
Source2: Makefile.scotch.inc Source2: Makefile.scotch.inc
Source3: Makefile.seq.inc Source3: Makefile.seq.inc
@ -40,14 +85,16 @@ Patch2: mumps-4.9.2-debian-tests-shlibs.patch
Patch3: mumps-4.9.2-debian-shared-mumps.patch Patch3: mumps-4.9.2-debian-shared-mumps.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-fortran BuildRequires: gcc-fortran
BuildRequires: libptscotch-openmpi-devel
BuildRequires: libscotch-devel BuildRequires: libscotch-devel
BuildRequires: openmpi-devel %if %{with mpi}
BuildRequires: scalapack-openmpi-devel Requires: %{pname} = %{version}
%if 0%{?sles_version} BuildRequires: %{pname}
BuildRequires: libptscotch-mvapich2-devel BuildRequires: %{pname}-devel
BuildRequires: mvapich2-devel BuildRequires: %{pname}-scotch
BuildRequires: scalapack-mvapich2-devel BuildRequires: %{pname}-scotch-devel
BuildRequires: libptscotch-%{mpi_family}-devel
BuildRequires: %{mpi_family}-devel
BuildRequires: scalapack-%{mpi_family}-devel
%endif %endif
BuildRequires: blas-devel BuildRequires: blas-devel
BuildRequires: lapack-devel BuildRequires: lapack-devel
@ -58,7 +105,11 @@ particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch. C interfaces, and can interface with ordering tools such as Scotch.
%if %{!with mpi}
This package contains the sequential library. This package contains the sequential library.
%else
This package contains the parallel library build with %{mpi_family}.
%endif
%package scotch %package scotch
@ -80,7 +131,15 @@ Summary: Files needed for developing mumps based applications
Group: Development/Libraries/Other Group: Development/Libraries/Other
Requires: blas-devel Requires: blas-devel
Requires: lapack-devel Requires: lapack-devel
Requires: mumps = %{version} Requires: %{name} = %{version}
%if %{with mpi}
Requires: mumps-ptscotch-%{mpi_family} = %{version}
Requires: mumps-devel = %{version}
Requires: mumps-scotch-devel = %{version}
Requires: %{mpi_family}-devel
Requires: ptscotch-%{mpi_family}-devel
Requires: scalapack-%{mpi_family}-devel
%endif
%description devel %description devel
MUMPS implements a direct solver for large sparse linear systems, with a MUMPS implements a direct solver for large sparse linear systems, with a
@ -95,68 +154,36 @@ Group: Development/Libraries/Other
Requires: blas-devel Requires: blas-devel
Requires: lapack-devel Requires: lapack-devel
Requires: mumps = %{version} Requires: mumps = %{version}
Requires: mumps-devel = %{version}
Requires: mumps-scotch = %{version} Requires: mumps-scotch = %{version}
%description scotch-devel %description scotch-devel
MUMPS implements a direct solver for large sparse linear systems, with a MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch. C interfaces, and can interface with ordering tools such as Scotch.
%package openmpi
%package -n %{pname}-ptscotch-%{mpi_family}
Summary: A MUltifrontal Massively Parallel Sparse direct Solver Summary: A MUltifrontal Massively Parallel Sparse direct Solver
Group: System/Libraries Group: System/Libraries
Requires: mumps = %{version} Requires: mumps = %{version}
%description openmpi %description -n %{pname}-ptscotch-%{mpi_family}
MUMPS implements a direct solver for large sparse linear systems, with a MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch. C interfaces, and can interface with ordering tools such as Scotch.
This package contains the parallel library build with openmpi. This package contains the parallel library build with %{mpi_family} and with
PTScotch enabled.
%package ptscotch-openmpi %package -n %{pname}-test-%{mpi_family}
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
Group: System/Libraries
Requires: mumps = %{version}
%description ptscotch-openmpi
MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch.
This package contains the parallel library build with openmpi and with
Scotch enabled.
%package openmpi-devel
Summary: Files needed for developing mumps based applications
Group: Development/Libraries/Parallel
Requires: blas-devel
Requires: lapack-devel
Requires: mumps-devel = %{version}
Requires: mumps-openmpi = %{version}
Requires: mumps-ptscotch-openmpi = %{version}
Requires: openmpi-devel
Requires: ptscotch-openmpi-devel
Requires: scalapack-openmpi-devel
%description openmpi-devel
MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch.
%package test-openmpi
Summary: Simple test programs and examples for mumps Summary: Simple test programs and examples for mumps
Group: System/Libraries Group: System/Libraries
%description test-openmpi %description -n %{pname}-test-%{mpi_family}
MUMPS implements a direct solver for large sparse linear systems, with a MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and operate on distributed matrices e.g. over a cluster. It has Fortran and
@ -165,71 +192,8 @@ C interfaces, and can interface with ordering tools such as Scotch.
This packages contains some test and examples programs for mumps. In addition, This packages contains some test and examples programs for mumps. In addition,
matlab and scilab extensions are provided in /usr/share/doc/packages/mumps. matlab and scilab extensions are provided in /usr/share/doc/packages/mumps.
%if 0%{?sles_version}
%package mvapich2
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
Group: System/Libraries
Requires: mumps = %{version}
%description mvapich2
MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch.
This package contains the parallel library build with mvapich2.
%package ptscotch-mvapich2
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
Group: System/Libraries
Requires: mumps = %{version}
%description ptscotch-mvapich2
MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch.
This package contains the parallel library build with mvapich2 and with
Scotch enabled.
%package mvapich2-devel
Summary: Files needed for developing mumps based applications
Group: Development/Libraries/Parallel
Requires: blas-devel
Requires: lapack-devel
Requires: mumps-devel = %{version}
Requires: mumps-mvapich2 = %{version}
Requires: mumps-ptscotch-mvapich2 = %{version}
Requires: mvapich2-devel
Requires: ptscotch-mvapich2-devel
Requires: scalapack-mvapich2-devel
%description mvapich2-devel
MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch.
%package test-mvapich2
Summary: Simple test programs and examples for mumps
Group: System/Libraries
%description test-mvapich2
MUMPS implements a direct solver for large sparse linear systems, with a
particular focus on symmetric positive definite matrices. It can
operate on distributed matrices e.g. over a cluster. It has Fortran and
C interfaces, and can interface with ordering tools such as Scotch.
This packages contains some test and examples programs for mumps. In addition,
matlab and scilab extensions are provided in /usr/share/doc/packages/mumps.
%endif
%prep %prep
%setup -q %setup -q -n %{pname}-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
@ -238,150 +202,118 @@ matlab and scilab extensions are provided in /usr/share/doc/packages/mumps.
%build %build
export SUSE_ASNEEDED=0 export SUSE_ASNEEDED=0
%if !%{with mpi}
# sequential with scotch support enabled # sequential with scotch support enabled
cp -f %{S:2} Makefile.inc cp -f %{S:2} Makefile.inc
make MUMPS_MPI=openmpi MUMPS_LIBF77="-lmpiseq_scotch" \ make \
MUMPS_LIBF77="-lmpiseq_scotch" \
OPTC="$RPM_OPT_FLAGS" \ OPTC="$RPM_OPT_FLAGS" \
PLAT="_scotch" all PLAT="_scotch" all
cp -a lib libmumps_scotch cp -a lib libmumps_scotch_seq
cp -af libseq/lib* libmumps_scotch cp -af libseq/lib* libmumps_scotch_seq
cp -af PORD/lib/libpord_scotch.so* libmumps_scotch cp -af PORD/lib/libpord_scotch.so* libmumps_scotch_seq
make clean make clean
rm -f Makefile.inc rm -f Makefile.inc
# sequential only # sequential without scotch
cp -f %{S:3} Makefile.inc cp -f %{S:3} Makefile.inc
make MUMPS_LIBF77="-lmpiseq_seq" PLAT="_seq" \ make \
OPTC="$RPM_OPT_FLAGS" all MUMPS_LIBF77="-lmpiseq_seq" \
OPTC="$RPM_OPT_FLAGS" \
PLAT="_seq" all
cp -a lib libmumps_seq cp -a lib libmumps_seq
cp -af libseq/lib* libmumps_seq cp -af libseq/lib* libmumps_seq
cp -af PORD/lib/libpord_seq.so* libmumps_seq cp -af PORD/lib/libpord_seq.so* libmumps_seq
make clean make clean
rm -f Makefile.inc rm -f Makefile.inc
%endif
%if %{with mpi}
# Set LD_LIBRARY_PATH and PATH
. %{my_bindir}/mpivars.sh
# ptscotch : parallel with scotch support enabled # ptscotch : parallel with scotch support enabled
%if 0%{?sles_version}
cp -f %{S:1} Makefile.inc cp -f %{S:1} Makefile.inc
export LD_LIBRARY_PATH=%{_libdir}/mpi/gcc/mvapich2/%_lib make \
make MUMPS_MPI=mvapich2 \ MUMPS_MPI=%{mpi_family} \
FC=%{_libdir}/mpi/gcc/mvapich2/bin/mpif77 \ FC=%{my_bindir}/mpif77 \
MUMPS_LIBF77="-L%{_libdir}/mpi/gcc/mvapich2/%_lib -lfmpich -lmpich" \ MUMPS_LIBF77="-L%{my_libdir} %{?mumps_f77_mpilibs}" \
OPTC="$RPM_OPT_FLAGS" \ OPTC="$RPM_OPT_FLAGS" \
INCPAR=-I%{_libdir}/mpi/gcc/mvapich2/include \ INCPAR=-I%{my_incdir}/ \
PLAT="_ptscotch" all PLAT="_ptscotch" all
# build test programs cp -a lib libmumps_ptscotch_%{mpi_family}
cp -a lib libmumps_ptscotch_mvapich2 cp -af PORD/lib/libpord_ptscotch.so* libmumps_ptscotch_%{mpi_family}/
cp -af PORD/lib/libpord_ptscotch.so* libmumps_ptscotch_mvapich2/
make clean make clean
rm -f Makefile.inc rm -f Makefile.inc
%endif
cp -f %{S:1} Makefile.inc # parallel without scotch
export LD_LIBRARY_PATH=%{_libdir}/mpi/gcc/openmpi/%_lib cp %{S:4} Makefile.inc
make MUMPS_MPI=openmpi \ make \
FC=%{_libdir}/mpi/gcc/openmpi/bin/mpif77 \ MUMPS_MPI=%{mpi_family} \
%if 0%{?suse_version} > 1230 FC=%{my_bindir}/mpif77 \
MUMPS_LIBF77="-L%{_libdir}/mpi/gcc/openmpi/%_lib -lmpi_mpifh -lmpi" \ MUMPS_LIBF77="-L%{my_libdir} %{?mumps_f77_mpilibs}" \
%else
MUMPS_LIBF77="-L%{_libdir}/mpi/gcc/openmpi/%_lib -lmpi_f77 -lmpi" \
%endif
OPTC="$RPM_OPT_FLAGS" \ OPTC="$RPM_OPT_FLAGS" \
INCPAR=-I%{_libdir}/mpi/gcc/openmpi/include \ PLAT="" all
PLAT="_ptscotch" all
# build test programs
cp -a lib libmumps_ptscotch_openmpi
cp -af PORD/lib/libpord_ptscotch.so* libmumps_ptscotch_openmpi/
make clean
rm -f Makefile.inc
%if 0%{?sles_version}
cp %{S:4} Makefile.inc
export LD_LIBRARY_PATH=%{_libdir}/mpi/gcc/mvapich2/%_lib
make MUMPS_MPI=mvapich2 \
FC=%{_libdir}/mpi/gcc/mvapich2/bin/mpif77 \
MUMPS_LIBF77="-L%{_libdir}/mpi/gcc/mvapich2/%_lib -lfmpich -lmpich" \
OPTC="$RPM_OPT_FLAGS" all
# build test programs # build test programs
cd examples make -C examples all
make all
cd .. cp -a lib lib_%{mpi_family}
# cp -af PORD/lib/libpord.so* lib_%{mpi_family}
cp -a lib lib_mvapich2 cp -a examples examples_%{mpi_family}
cp -af PORD/lib/libpord.so* lib_mvapich2
cp -a examples examples_mvapich2
make clean make clean
rm -f Makefile.inc rm -f Makefile.inc
%endif %endif
cp %{S:4} Makefile.inc
export LD_LIBRARY_PATH=%{_libdir}/mpi/gcc/openmpi/%_lib
make MUMPS_MPI=openmpi \
FC=%{_libdir}/mpi/gcc/openmpi/bin/mpif77 \
%if 0%{?suse_version} > 1230
MUMPS_LIBF77="-L%{_libdir}/mpi/gcc/openmpi/%_lib -lmpi_mpifh -lmpi" \
%else
MUMPS_LIBF77="-L%{_libdir}/mpi/gcc/openmpi/%_lib -lmpi_f77 -lmpi" \
%endif
OPTC="$RPM_OPT_FLAGS" all
# build test programs
cd examples
make all
cd ..
#
cp -a lib lib_openmpi
cp -af PORD/lib/libpord.so* lib_openmpi
cp -a examples examples_openmpi
make clean
rm -f Makefile.inc
%install %install
mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{my_bindir}
mkdir -p %{buildroot}%{my_libdir}
cp -P PORD/lib/*.so* %{buildroot}%{my_libdir}
%if "%{flavor}" == "serial"
mkdir -p %{buildroot}%{_includedir}/mumps mkdir -p %{buildroot}%{_includedir}/mumps
mkdir -p %{buildroot}%{_includedir}/pord mkdir -p %{buildroot}%{_includedir}/pord
mkdir -p %{buildroot}%{_bindir}
# install sequential libs
cp -P libmumps_seq/lib*.a %{buildroot}%{_libdir}
cp -P libmumps_scotch/*.a %{buildroot}%{_libdir}
cp -P libmumps_seq/lib*.so* %{buildroot}%{_libdir}
cp -P libmumps_scotch/*.so* %{buildroot}%{_libdir}
cp -P PORD/lib/*.so* %{buildroot}%{_libdir}
# install parallel libs
for mpi in %_mpi; do
mkdir -p %{buildroot}%{_libdir}/mpi/gcc/$mpi/%_lib
mkdir -p %{buildroot}%{_libdir}/mpi/gcc/$mpi/bin
cp -P lib_$mpi/lib*.a %{buildroot}%{_libdir}/mpi/gcc/$mpi/%_lib
cp -P libmumps_ptscotch_$mpi/*.a %{buildroot}%{_libdir}/mpi/gcc/$mpi/%_lib
cp -P lib_$mpi/lib*.so* %{buildroot}%{_libdir}/mpi/gcc/$mpi/%_lib
cp -P libmumps_ptscotch_$mpi/*.so* %{buildroot}%{_libdir}/mpi/gcc/$mpi/%_lib
install -m 755 examples_$mpi/*simpletest %{buildroot}%{_libdir}/mpi/gcc/$mpi/bin
install -m 755 examples_$mpi/c_example %{buildroot}%{_libdir}/mpi/gcc/$mpi/bin
done
install -m 644 include/* %{buildroot}%{_includedir}/mumps install -m 644 include/* %{buildroot}%{_includedir}/mumps
install -m 644 libseq/*.h %{buildroot}%{_includedir}/mumps install -m 644 libseq/*.h %{buildroot}%{_includedir}/mumps
install -m 644 PORD/include/* %{buildroot}%{_includedir}/pord install -m 644 PORD/include/* %{buildroot}%{_includedir}/pord
%endif
%if !%{with mpi}
# install sequential libs
cp -P libmumps_seq/lib*.a %{buildroot}%{my_libdir}
cp -P libmumps_seq/lib*.so* %{buildroot}%{my_libdir}
cp -P libmumps_scotch_seq/*.a %{buildroot}%{my_libdir}
cp -P libmumps_scotch_seq/*.so* %{buildroot}%{my_libdir}
%endif
%if %{with mpi}
# install parallel libs
cp -P lib_%{mpi_family}/lib*.a %{buildroot}%{my_libdir}
cp -P lib_%{mpi_family}/lib*.so* %{buildroot}%{my_libdir}
cp -P libmumps_ptscotch_%{mpi_family}/*.a %{buildroot}%{my_libdir}
cp -P libmumps_ptscotch_%{mpi_family}/*.so* %{buildroot}%{my_libdir}
install -m 755 examples_%{mpi_family}/*simpletest %{buildroot}%{my_bindir}
install -m 755 examples_%{mpi_family}/c_example %{buildroot}%{my_bindir}
%endif
# Don't want binaries in docdir # Don't want binaries in docdir
rm -rf examples/*.o examples/*simpletest examples/c_example rm -rf examples/*.o examples/*simpletest examples/c_example
# Remove parallel libs in sequential lib directory
rm -f %{buildroot}%{_libdir}/libpord.so*
rm -f %{buildroot}%{_libdir}/libpord_ptscotch.so*
# we make a symlink to the serial lib in the parallel lib prefix # we make a symlink to the serial lib in the parallel lib prefix
# because some scientific packages don't manage different directories # because some scientific packages don't manage different directories
# for the serial and parallel libs # for the serial and parallel libs
for mpi in %_mpi; do %if %{with mpi}
pushd %{buildroot}%{_libdir} for lib in libcmumps libdmumps libsmumps libzmumps libmumps_common libmpiseq libpord ; do
for f in *_seq.* *_scotch.*; do for plat in _seq _scotch ; do
rm -f %{buildroot}%{_libdir}/mpi/gcc/$mpi/%_lib/$f && \ for type in .a .so .so.%{version}; do
ln -s %{_libdir}/$f %{buildroot}%{_libdir}/mpi/gcc/$mpi/%_lib/$f name=${lib}${plat}${type}
done ln -s %{_libdir}/$name %{buildroot}%{my_libdir}/$name
done
done
done done
%endif
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -389,26 +321,18 @@ rm -rf %{buildroot}
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%if !%{with mpi}
%post scotch -p /sbin/ldconfig %post scotch -p /sbin/ldconfig
%postun scotch -p /sbin/ldconfig %postun scotch -p /sbin/ldconfig
%else
%post openmpi -p /sbin/ldconfig %post -n %{pname}-ptscotch-%{mpi_family} -p /sbin/ldconfig
%postun openmpi -p /sbin/ldconfig %postun -n %{pname}-ptscotch-%{mpi_family} -p /sbin/ldconfig
%post ptscotch-openmpi -p /sbin/ldconfig
%postun ptscotch-openmpi -p /sbin/ldconfig
%if 0%{?sles_version}
%post mvapich2 -p /sbin/ldconfig
%postun mvapich2 -p /sbin/ldconfig
%post ptscotch-mvapich2 -p /sbin/ldconfig
%postun ptscotch-mvapich2 -p /sbin/ldconfig
%endif %endif
%if !%{with mpi}
%files %files
%defattr(-,root,root,-) %license LICENSE
%doc ChangeLog README LICENSE VERSION doc SCILAB MATLAB %doc ChangeLog README VERSION doc SCILAB MATLAB
%{_libdir}/libcmumps_seq.so.* %{_libdir}/libcmumps_seq.so.*
%{_libdir}/libdmumps_seq.so.* %{_libdir}/libdmumps_seq.so.*
%{_libdir}/libsmumps_seq.so.* %{_libdir}/libsmumps_seq.so.*
@ -418,7 +342,6 @@ rm -rf %{buildroot}
%{_libdir}/libpord_seq.so.* %{_libdir}/libpord_seq.so.*
%files scotch %files scotch
%defattr(-,root,root,-)
%{_libdir}/libcmumps_scotch.so.* %{_libdir}/libcmumps_scotch.so.*
%{_libdir}/libdmumps_scotch.so.* %{_libdir}/libdmumps_scotch.so.*
%{_libdir}/libsmumps_scotch.so.* %{_libdir}/libsmumps_scotch.so.*
@ -428,82 +351,43 @@ rm -rf %{buildroot}
%{_libdir}/libpord_scotch.so.* %{_libdir}/libpord_scotch.so.*
%files devel %files devel
%defattr(-,root,root,-)
%{_includedir}/mumps %{_includedir}/mumps
%{_includedir}/pord %{_includedir}/pord
%{_libdir}/*_seq.so %{_libdir}/*_seq.so
%{_libdir}/*_seq.a %{_libdir}/*_seq.a
%files scotch-devel %files scotch-devel
%defattr(-,root,root,-)
%{_libdir}/*_scotch.so %{_libdir}/*_scotch.so
%{_libdir}/*_scotch.a %{_libdir}/*_scotch.a
%files openmpi
%defattr(-,root,root,-)
%{_libdir}/mpi/gcc/openmpi/%_lib/libcmumps.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libdmumps.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libsmumps.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libzmumps.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libmumps_common.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libpord.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/lib*seq.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/lib*_scotch.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libmumps_common_scotch.so.*
%files ptscotch-openmpi
%defattr(-,root,root,-)
%{_libdir}/mpi/gcc/openmpi/%_lib/libcmumps_ptscotch.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libdmumps_ptscotch.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libsmumps_ptscotch.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libzmumps_ptscotch.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libmumps_common_ptscotch.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libpord_ptscotch.so.*
%{_libdir}/mpi/gcc/openmpi/%_lib/libmumps_common_ptscotch.so.*
%files openmpi-devel
%defattr(-,root,root,-)
%{_libdir}/mpi/gcc/openmpi/%_lib/*.so
%{_libdir}/mpi/gcc/openmpi/%_lib/*.a
%if 0%{?sles_version}
%files mvapich2
%defattr(-,root,root,-)
%{_libdir}/mpi/gcc/mvapich2/%_lib/libcmumps.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libdmumps.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libsmumps.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libzmumps.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libmumps_common.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libpord.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/lib*seq.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/lib*_scotch.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libmumps_common_scotch.so.*
%files ptscotch-mvapich2
%defattr(-,root,root,-)
%{_libdir}/mpi/gcc/mvapich2/%_lib/libcmumps_ptscotch.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libdmumps_ptscotch.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libsmumps_ptscotch.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libzmumps_ptscotch.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libmumps_common_ptscotch.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libpord_ptscotch.so.*
%{_libdir}/mpi/gcc/mvapich2/%_lib/libmumps_common_ptscotch.so.*
%files mvapich2-devel
%defattr(-,root,root,-)
%{_libdir}/mpi/gcc/mvapich2/%_lib/*.so
%{_libdir}/mpi/gcc/mvapich2/%_lib/*.a
%files test-mvapich2
%defattr(-,root,root,-)
%doc examples
%{_libdir}/mpi/gcc/mvapich2/bin/*
%endif %endif
%files test-openmpi %if %{with mpi}
%defattr(-,root,root,-) %files -n %{pname}-%{mpi_family}
%{my_libdir}/libcmumps.so.*
%{my_libdir}/libdmumps.so.*
%{my_libdir}/libsmumps.so.*
%{my_libdir}/libzmumps.so.*
%{my_libdir}/libmumps_common.so.*
%{my_libdir}/libpord.so.*
# compat symlinks
%{my_libdir}/lib*_seq.so.*
%{my_libdir}/lib*_scotch.so.*
%files -n %{pname}-ptscotch-%{mpi_family}
%{my_libdir}/libcmumps_ptscotch.so.*
%{my_libdir}/libdmumps_ptscotch.so.*
%{my_libdir}/libsmumps_ptscotch.so.*
%{my_libdir}/libzmumps_ptscotch.so.*
%{my_libdir}/libmumps_common_ptscotch.so.*
%{my_libdir}/libpord_ptscotch.so.*
%files -n %{pname}-%{mpi_family}-devel
%{my_libdir}/*.so
%{my_libdir}/*.a
%files -n %{pname}-test-%{mpi_family}
%doc examples %doc examples
%{_libdir}/mpi/gcc/openmpi/bin/* %{my_bindir}/*
%endif
%changelog %changelog