# # spec file for package mumps # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # 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. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?sles_version} %define _mpi openmpi mvapich2 %else %define _mpi openmpi %endif Summary: A MUltifrontal Massively Parallel Sparse direct Solver License: SUSE-Public-Domain Group: System/Libraries Name: mumps Version: 4.9.2 Release: 0 Url: http://mumps.enseeiht.fr/ Source0: %{name}-%{version}.tar.bz2 Source1: Makefile.ptscotch.inc Source2: Makefile.scotch.inc Source3: Makefile.seq.inc Source4: Makefile.par.inc Patch0: mumps-4.9.2-debian-shared-libseq.patch Patch1: mumps-4.9.2-debian-shared-pord.patch Patch2: mumps-4.9.2-debian-tests-shlibs.patch Patch3: mumps-4.9.2-debian-shared-mumps.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: blacs-openmpi-devel BuildRequires: gcc-fortran BuildRequires: libptscotch-openmpi-devel BuildRequires: libscotch-devel BuildRequires: openmpi-devel BuildRequires: scalapack-openmpi-devel %if 0%{?sles_version} BuildRequires: blacs-mvapich2-devel BuildRequires: libptscotch-mvapich2-devel BuildRequires: mvapich2-devel BuildRequires: scalapack-mvapich2-devel %endif BuildRequires: blas-devel BuildRequires: lapack-devel %description 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 sequential library. %package scotch Summary: A MUltifrontal Massively Parallel Sparse direct Solver Group: System/Libraries Requires: mumps = %{version} %description scotch 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 sequential library with Scotch support enabled. %package devel Summary: Files needed for developing mumps based applications Group: Development/Libraries/Other Requires: blas-devel Requires: lapack-devel Requires: mumps = %{version} %description 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 scotch-devel Summary: Files needed for developing mumps based applications Group: Development/Libraries/Other Requires: blas-devel Requires: lapack-devel Requires: mumps = %{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 Summary: A MUltifrontal Massively Parallel Sparse direct Solver Group: System/Libraries Requires: mumps = %{version} %description 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. %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: blacs-openmpi-devel 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 Group: System/Libraries %description test-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 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: blacs-mvapich2-devel 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 %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %build export SUSE_ASNEEDED=0 # sequential with scotch support enabled cp -f %{S:2} Makefile.inc make MUMPS_MPI=openmpi 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 make clean rm -f Makefile.inc # sequential only cp -f %{S:3} Makefile.inc make MUMPS_LIBF77="-lmpiseq_seq" PLAT="_seq" \ OPTC="$RPM_OPT_FLAGS" 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 # 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" \ OPTC="$RPM_OPT_FLAGS" \ INCPAR=-I%{_libdir}/mpi/gcc/mvapich2/include \ PLAT="_ptscotch" all # build test programs cp -a lib libmumps_ptscotch_mvapich2 cp -af PORD/lib/libpord_ptscotch.so* libmumps_ptscotch_mvapich2/ 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 \ MUMPS_LIBF77="-L%{_libdir}/mpi/gcc/openmpi/%_lib -lmpi_f77 -lmpi" \ 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 %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 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 \ MUMPS_LIBF77="-L%{_libdir}/mpi/gcc/openmpi/%_lib -lmpi_f77 -lmpi" \ 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}%{_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 # 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 done %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %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 %endif %files %defattr(-,root,root,-) %doc ChangeLog README LICENSE VERSION doc SCILAB MATLAB %{_libdir}/libcmumps_seq.so.* %{_libdir}/libdmumps_seq.so.* %{_libdir}/libsmumps_seq.so.* %{_libdir}/libzmumps_seq.so.* %{_libdir}/libmumps_common_seq.so.* %{_libdir}/libmpiseq_seq.so.* %{_libdir}/libpord_seq.so.* %files scotch %defattr(-,root,root,-) %{_libdir}/libcmumps_scotch.so.* %{_libdir}/libdmumps_scotch.so.* %{_libdir}/libsmumps_scotch.so.* %{_libdir}/libzmumps_scotch.so.* %{_libdir}/libmumps_common_scotch.so.* %{_libdir}/libmpiseq_scotch.so.* %{_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,-) %doc examples %{_libdir}/mpi/gcc/openmpi/bin/* %changelog