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:
parent
2f0e197c03
commit
d46eaf21c6
6
_multibuild
Normal file
6
_multibuild
Normal file
@ -0,0 +1,6 @@
|
||||
<multibuild>
|
||||
<package>serial</package>
|
||||
<package>openmpi</package>
|
||||
<package>openmpi2</package>
|
||||
<package>mvapich2</package>
|
||||
</multibuild>
|
@ -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
|
||||
|
||||
|
488
mumps.spec
488
mumps.spec
@ -16,20 +16,65 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?sles_version}
|
||||
%define _mpi openmpi mvapich2
|
||||
%else
|
||||
%define _mpi openmpi
|
||||
%global flavor @BUILD_FLAVOR@
|
||||
|
||||
%define pname mumps
|
||||
|
||||
%if "%flavor" == ""
|
||||
%define package_name %{pname}
|
||||
ExclusiveArch: do_not_build
|
||||
%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
|
||||
License: SUSE-Public-Domain
|
||||
Group: System/Libraries
|
||||
Name: mumps
|
||||
Name: mumps%{?my_suffix}
|
||||
Version: 4.9.2
|
||||
Release: 0
|
||||
Url: http://mumps.enseeiht.fr/
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source0: %{pname}-%{version}.tar.bz2
|
||||
Source1: Makefile.ptscotch.inc
|
||||
Source2: Makefile.scotch.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
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: libptscotch-openmpi-devel
|
||||
BuildRequires: libscotch-devel
|
||||
BuildRequires: openmpi-devel
|
||||
BuildRequires: scalapack-openmpi-devel
|
||||
%if 0%{?sles_version}
|
||||
BuildRequires: libptscotch-mvapich2-devel
|
||||
BuildRequires: mvapich2-devel
|
||||
BuildRequires: scalapack-mvapich2-devel
|
||||
%if %{with mpi}
|
||||
Requires: %{pname} = %{version}
|
||||
BuildRequires: %{pname}
|
||||
BuildRequires: %{pname}-devel
|
||||
BuildRequires: %{pname}-scotch
|
||||
BuildRequires: %{pname}-scotch-devel
|
||||
BuildRequires: libptscotch-%{mpi_family}-devel
|
||||
BuildRequires: %{mpi_family}-devel
|
||||
BuildRequires: scalapack-%{mpi_family}-devel
|
||||
%endif
|
||||
BuildRequires: blas-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
|
||||
C interfaces, and can interface with ordering tools such as Scotch.
|
||||
|
||||
%if %{!with mpi}
|
||||
This package contains the sequential library.
|
||||
%else
|
||||
This package contains the parallel library build with %{mpi_family}.
|
||||
%endif
|
||||
|
||||
|
||||
%package scotch
|
||||
@ -80,7 +131,15 @@ Summary: Files needed for developing mumps based applications
|
||||
Group: Development/Libraries/Other
|
||||
Requires: blas-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
|
||||
MUMPS implements a direct solver for large sparse linear systems, with a
|
||||
@ -95,68 +154,36 @@ Group: Development/Libraries/Other
|
||||
Requires: blas-devel
|
||||
Requires: lapack-devel
|
||||
Requires: mumps = %{version}
|
||||
Requires: mumps-devel = %{version}
|
||||
Requires: mumps-scotch = %{version}
|
||||
|
||||
|
||||
%description scotch-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 openmpi
|
||||
|
||||
%package -n %{pname}-ptscotch-%{mpi_family}
|
||||
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
|
||||
Group: System/Libraries
|
||||
Requires: mumps = %{version}
|
||||
|
||||
%description openmpi
|
||||
%description -n %{pname}-ptscotch-%{mpi_family}
|
||||
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.
|
||||
This package contains the parallel library build with %{mpi_family} and with
|
||||
PTScotch enabled.
|
||||
|
||||
|
||||
%package ptscotch-openmpi
|
||||
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
|
||||
%package -n %{pname}-test-%{mpi_family}
|
||||
Summary: Simple test programs and examples for mumps
|
||||
Group: System/Libraries
|
||||
|
||||
%description test-openmpi
|
||||
%description -n %{pname}-test-%{mpi_family}
|
||||
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
|
||||
@ -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,
|
||||
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
|
||||
%setup -q
|
||||
%setup -q -n %{pname}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
@ -238,150 +202,118 @@ matlab and scilab extensions are provided in /usr/share/doc/packages/mumps.
|
||||
%build
|
||||
export SUSE_ASNEEDED=0
|
||||
|
||||
%if !%{with mpi}
|
||||
# sequential with scotch support enabled
|
||||
cp -f %{S:2} Makefile.inc
|
||||
make MUMPS_MPI=openmpi MUMPS_LIBF77="-lmpiseq_scotch" \
|
||||
make \
|
||||
MUMPS_LIBF77="-lmpiseq_scotch" \
|
||||
OPTC="$RPM_OPT_FLAGS" \
|
||||
PLAT="_scotch" all
|
||||
cp -a lib libmumps_scotch
|
||||
cp -af libseq/lib* libmumps_scotch
|
||||
cp -af PORD/lib/libpord_scotch.so* libmumps_scotch
|
||||
cp -a lib libmumps_scotch_seq
|
||||
cp -af libseq/lib* libmumps_scotch_seq
|
||||
cp -af PORD/lib/libpord_scotch.so* libmumps_scotch_seq
|
||||
make clean
|
||||
rm -f Makefile.inc
|
||||
|
||||
# sequential only
|
||||
# sequential without scotch
|
||||
cp -f %{S:3} Makefile.inc
|
||||
make MUMPS_LIBF77="-lmpiseq_seq" PLAT="_seq" \
|
||||
OPTC="$RPM_OPT_FLAGS" all
|
||||
make \
|
||||
MUMPS_LIBF77="-lmpiseq_seq" \
|
||||
OPTC="$RPM_OPT_FLAGS" \
|
||||
PLAT="_seq" all
|
||||
cp -a lib libmumps_seq
|
||||
cp -af libseq/lib* libmumps_seq
|
||||
cp -af PORD/lib/libpord_seq.so* libmumps_seq
|
||||
make clean
|
||||
rm -f Makefile.inc
|
||||
%endif
|
||||
|
||||
%if %{with mpi}
|
||||
# Set LD_LIBRARY_PATH and PATH
|
||||
. %{my_bindir}/mpivars.sh
|
||||
|
||||
# ptscotch : parallel with scotch support enabled
|
||||
%if 0%{?sles_version}
|
||||
cp -f %{S:1} 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" \
|
||||
make \
|
||||
MUMPS_MPI=%{mpi_family} \
|
||||
FC=%{my_bindir}/mpif77 \
|
||||
MUMPS_LIBF77="-L%{my_libdir} %{?mumps_f77_mpilibs}" \
|
||||
OPTC="$RPM_OPT_FLAGS" \
|
||||
INCPAR=-I%{_libdir}/mpi/gcc/mvapich2/include \
|
||||
INCPAR=-I%{my_incdir}/ \
|
||||
PLAT="_ptscotch" all
|
||||
# build test programs
|
||||
cp -a lib libmumps_ptscotch_mvapich2
|
||||
cp -af PORD/lib/libpord_ptscotch.so* libmumps_ptscotch_mvapich2/
|
||||
cp -a lib libmumps_ptscotch_%{mpi_family}
|
||||
cp -af PORD/lib/libpord_ptscotch.so* libmumps_ptscotch_%{mpi_family}/
|
||||
make clean
|
||||
rm -f Makefile.inc
|
||||
%endif
|
||||
|
||||
cp -f %{S:1} 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
|
||||
# parallel without scotch
|
||||
cp %{S:4} Makefile.inc
|
||||
make \
|
||||
MUMPS_MPI=%{mpi_family} \
|
||||
FC=%{my_bindir}/mpif77 \
|
||||
MUMPS_LIBF77="-L%{my_libdir} %{?mumps_f77_mpilibs}" \
|
||||
OPTC="$RPM_OPT_FLAGS" \
|
||||
INCPAR=-I%{_libdir}/mpi/gcc/openmpi/include \
|
||||
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
|
||||
PLAT="" all
|
||||
|
||||
%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
|
||||
cd examples
|
||||
make all
|
||||
cd ..
|
||||
#
|
||||
cp -a lib lib_mvapich2
|
||||
cp -af PORD/lib/libpord.so* lib_mvapich2
|
||||
cp -a examples examples_mvapich2
|
||||
make -C examples all
|
||||
|
||||
cp -a lib lib_%{mpi_family}
|
||||
cp -af PORD/lib/libpord.so* lib_%{mpi_family}
|
||||
cp -a examples examples_%{mpi_family}
|
||||
make clean
|
||||
rm -f Makefile.inc
|
||||
%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
|
||||
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}/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 libseq/*.h %{buildroot}%{_includedir}/mumps
|
||||
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
|
||||
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
|
||||
# because some scientific packages don't manage different directories
|
||||
# for the serial and parallel libs
|
||||
for mpi in %_mpi; do
|
||||
pushd %{buildroot}%{_libdir}
|
||||
for f in *_seq.* *_scotch.*; do
|
||||
rm -f %{buildroot}%{_libdir}/mpi/gcc/$mpi/%_lib/$f && \
|
||||
ln -s %{_libdir}/$f %{buildroot}%{_libdir}/mpi/gcc/$mpi/%_lib/$f
|
||||
done
|
||||
|
||||
%if %{with mpi}
|
||||
for lib in libcmumps libdmumps libsmumps libzmumps libmumps_common libmpiseq libpord ; do
|
||||
for plat in _seq _scotch ; do
|
||||
for type in .a .so .so.%{version}; do
|
||||
name=${lib}${plat}${type}
|
||||
ln -s %{_libdir}/$name %{buildroot}%{my_libdir}/$name
|
||||
done
|
||||
done
|
||||
done
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
@ -389,26 +321,18 @@ rm -rf %{buildroot}
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%if !%{with mpi}
|
||||
%post scotch -p /sbin/ldconfig
|
||||
%postun scotch -p /sbin/ldconfig
|
||||
|
||||
%post openmpi -p /sbin/ldconfig
|
||||
%postun openmpi -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
|
||||
%else
|
||||
%post -n %{pname}-ptscotch-%{mpi_family} -p /sbin/ldconfig
|
||||
%postun -n %{pname}-ptscotch-%{mpi_family} -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%if !%{with mpi}
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc ChangeLog README LICENSE VERSION doc SCILAB MATLAB
|
||||
%license LICENSE
|
||||
%doc ChangeLog README VERSION doc SCILAB MATLAB
|
||||
%{_libdir}/libcmumps_seq.so.*
|
||||
%{_libdir}/libdmumps_seq.so.*
|
||||
%{_libdir}/libsmumps_seq.so.*
|
||||
@ -418,7 +342,6 @@ rm -rf %{buildroot}
|
||||
%{_libdir}/libpord_seq.so.*
|
||||
|
||||
%files scotch
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libcmumps_scotch.so.*
|
||||
%{_libdir}/libdmumps_scotch.so.*
|
||||
%{_libdir}/libsmumps_scotch.so.*
|
||||
@ -428,82 +351,43 @@ rm -rf %{buildroot}
|
||||
%{_libdir}/libpord_scotch.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/mumps
|
||||
%{_includedir}/pord
|
||||
%{_libdir}/*_seq.so
|
||||
%{_libdir}/*_seq.a
|
||||
|
||||
%files scotch-devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/*_scotch.so
|
||||
%{_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
|
||||
|
||||
%files test-openmpi
|
||||
%defattr(-,root,root,-)
|
||||
%if %{with mpi}
|
||||
%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
|
||||
%{_libdir}/mpi/gcc/openmpi/bin/*
|
||||
%{my_bindir}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user