2012-08-20 23:51:31 +02:00
|
|
|
#
|
|
|
|
# spec file for package mumps
|
|
|
|
#
|
2019-02-27 21:03:55 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-08-20 23:51:31 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-27 21:03:55 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-08-20 23:51:31 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
2019-01-14 17:47:01 +01:00
|
|
|
|
|
|
|
%define pname mumps
|
2019-02-08 11:32:58 +01:00
|
|
|
%define ver 5.1.2
|
|
|
|
%define so_ver 5
|
|
|
|
|
|
|
|
%define PNAME %(echo %{pname} | tr [a-z] [A-Z])
|
|
|
|
%define _ver %(echo %{ver} | tr . _)
|
2019-01-14 17:47:01 +01:00
|
|
|
|
|
|
|
%if "%flavor" == ""
|
|
|
|
%define package_name %{pname}
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%endif
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%if 0%{?is_opensuse} || 0%{?is_backports}
|
|
|
|
%undefine DisOMPI1
|
|
|
|
%undefine DisOMPI2
|
|
|
|
%undefine DisOMPI3
|
|
|
|
%else
|
|
|
|
%define DisOMPI1 ExclusiveArch: do_not_build
|
|
|
|
%undefine DisOMPI2
|
|
|
|
%define DisOMPI3 ExclusiveArch: do_not_build
|
|
|
|
%endif
|
|
|
|
|
2019-01-14 17:47:01 +01:00
|
|
|
%if "%{flavor}" == "serial"
|
|
|
|
# Stub MPI library
|
2019-02-08 11:32:58 +01:00
|
|
|
%define mumps_f77_mpilibs '-lmpiseq'
|
|
|
|
%bcond_with hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "scotch-serial"
|
|
|
|
# Stub MPI library
|
|
|
|
%define mumps_f77_mpilibs '-lmpiseq'
|
|
|
|
%bcond_with hpc
|
|
|
|
%bcond_without scotch
|
2019-01-14 17:47:01 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "openmpi"
|
|
|
|
%define mpi_family openmpi
|
|
|
|
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
|
2019-02-14 07:51:45 +01:00
|
|
|
%define mpi_ver 1
|
2019-02-08 11:32:58 +01:00
|
|
|
%bcond_with hpc
|
2019-01-14 17:47:01 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "openmpi2"
|
2019-02-14 07:51:45 +01:00
|
|
|
%define mpi_family openmpi
|
2019-01-14 17:47:01 +01:00
|
|
|
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
|
2019-02-14 07:51:45 +01:00
|
|
|
%define mpi_ver 2
|
2019-02-08 11:32:58 +01:00
|
|
|
%bcond_with hpc
|
2012-08-20 23:51:31 +02:00
|
|
|
%endif
|
|
|
|
|
2019-01-14 17:47:01 +01:00
|
|
|
%if "%{flavor}" == "mvapich2"
|
|
|
|
%define mpi_family mvapich2
|
|
|
|
%define mumps_f77_mpilibs -lfmpich -lmpich
|
2019-02-08 11:32:58 +01:00
|
|
|
%bcond_with hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "scotch-openmpi"
|
|
|
|
%define mpi_family openmpi
|
|
|
|
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
|
|
|
|
%bcond_with hpc
|
|
|
|
%bcond_without scotch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "scotch-openmpi2"
|
2019-02-14 07:51:45 +01:00
|
|
|
%define mpi_family openmpi
|
2019-02-08 11:32:58 +01:00
|
|
|
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
|
|
|
|
%bcond_with hpc
|
|
|
|
%bcond_without scotch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "scotch-openmpi3"
|
2019-02-14 07:51:45 +01:00
|
|
|
%define mpi_family openmpi
|
2019-02-08 11:32:58 +01:00
|
|
|
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
|
|
|
|
%bcond_with hpc
|
|
|
|
%bcond_without scotch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "scotch-mvapich2"
|
|
|
|
%define mpi_family mvapich2
|
|
|
|
%define mumps_f77_mpilibs -lfmpich -lmpich
|
|
|
|
%bcond_with hpc
|
|
|
|
%bcond_without scotch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-mvapich2-hpc"
|
|
|
|
%undefine c_f_ver
|
|
|
|
%global mpi_family mvapich2
|
|
|
|
%bcond_without hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-mpich-hpc"
|
|
|
|
%undefine c_f_ver
|
|
|
|
%global mpi_family mpich
|
|
|
|
%bcond_without hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-openmpi-hpc"
|
|
|
|
%{?DisOMPI1}
|
|
|
|
%undefine c_f_ver
|
|
|
|
# macro mpi is used by macros for master package
|
|
|
|
%global mpi_family openmpi
|
|
|
|
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
|
|
|
|
%define mpi_ver 1
|
|
|
|
%bcond_without hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-openmpi2-hpc"
|
|
|
|
%{?DisOMPI2}
|
|
|
|
%undefine c_f_ver
|
|
|
|
# macro mpi is used by macros for master package
|
|
|
|
%global mpi_family openmpi
|
|
|
|
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
|
|
|
|
%define mpi_ver 2
|
|
|
|
%bcond_without hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-openmpi3-hpc"
|
|
|
|
%{?DisOMPI3}
|
|
|
|
%undefine c_f_ver
|
|
|
|
# macro mpi is used by macros for master package
|
|
|
|
%global mpi_family openmpi
|
|
|
|
%define mumps_f77_mpilibs -lmpi_mpifh -lmpi
|
|
|
|
%define mpi_ver 3
|
|
|
|
%bcond_without hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-mvapich2-hpc"
|
|
|
|
%undefine c_f_ver
|
|
|
|
# macro mpi is used by macros for master package
|
|
|
|
%global mpi_family mvapich2
|
|
|
|
%define mumps_f77_mpilibs -lfmpich -lmpich
|
|
|
|
%undefine mpi_ver
|
|
|
|
%bcond_without hpc
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch i586 s390 ppc armv7l
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if !0%{?is_opensuse} && !0%{?with_hpc:1}
|
|
|
|
ExclusiveArch: do_not_build
|
2019-01-14 17:47:01 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%{?mpi_family:%{bcond_without mpi}}%{!?mpi_family:%{bcond_with mpi}}
|
|
|
|
|
2019-02-14 07:51:45 +01:00
|
|
|
# For compatibility package names
|
|
|
|
%if "%{mpi_family}" != "openmpi" || "%{mpi_ver}" != "1"
|
|
|
|
%define mpi_ext %{?mpi_ver}
|
|
|
|
%endif
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%if %{with scotch}
|
|
|
|
%if %{with mpi}
|
|
|
|
%define scotch ptscotch
|
|
|
|
%else
|
|
|
|
%define scotch scotch
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{without hpc}
|
|
|
|
%if %{without mpi}
|
|
|
|
%define my_prefix %_prefix
|
|
|
|
%define my_bindir %_bindir
|
|
|
|
%define my_libdir %_libdir
|
|
|
|
%define my_incdir %_includedir
|
|
|
|
%define my_datadir %_datadir
|
|
|
|
%else
|
2019-02-14 07:51:45 +01:00
|
|
|
%define my_suffix -%{mpi_family}%{?mpi_ext}
|
|
|
|
%define my_prefix %{_libdir}/mpi/gcc/%{mpi_family}%{?mpi_ext}
|
2019-01-14 17:47:01 +01:00
|
|
|
%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
|
2019-02-10 19:24:35 +01:00
|
|
|
%define package_name %{pname}%{?scotch:-%{scotch}}%{?my_suffix}
|
|
|
|
%define libname lib%{pname}%{?scotch:-%{scotch}}%{?so_ver}%{?my_suffix}
|
2019-02-08 11:32:58 +01:00
|
|
|
%else
|
|
|
|
%{!?compiler_family:%global compiler_family gnu}
|
2019-02-14 07:51:45 +01:00
|
|
|
%{?with_mpi:%{!?mpi_family:error "No MPI family specified!"}}
|
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?with_mpi:-m {%mpi_family}} %{?mpi_ver:-V %{mpi_ver}} %{?scotch:-e %{scotch}}}
|
2019-02-08 11:32:58 +01:00
|
|
|
%define my_prefix %{hpc_prefix}
|
|
|
|
%define my_bindir %{hpc_bindir}
|
|
|
|
%define my_libdir %{hpc_libdir}
|
|
|
|
%define my_incdir %{hpc_includedir}
|
|
|
|
%define my_datadir %{hpc_datadir}
|
2019-02-10 19:24:35 +01:00
|
|
|
%define package_name %{hpc_package_name %{?_ver}}
|
|
|
|
%define libname lib%{package_name}
|
2019-02-08 11:32:58 +01:00
|
|
|
%endif
|
2019-01-14 17:47:01 +01:00
|
|
|
|
2012-08-20 23:51:31 +02:00
|
|
|
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
|
2019-02-11 17:26:28 +01:00
|
|
|
License: CECILL-C
|
2019-02-14 07:51:45 +01:00
|
|
|
Group: Productivity/Scientific/Math
|
2019-02-08 11:32:58 +01:00
|
|
|
Name: %{package_name}
|
|
|
|
Version: %{ver}
|
2012-08-20 23:51:31 +02:00
|
|
|
Release: 0
|
|
|
|
Url: http://mumps.enseeiht.fr/
|
2019-02-08 11:32:58 +01:00
|
|
|
Source0: http://mumps.enseeiht.fr/MUMPS_%{version}.tar.gz#/%{pname}-%{version}.tar.bz2
|
|
|
|
Source1: Makefile.inc
|
2019-02-10 19:24:35 +01:00
|
|
|
Patch1: Makefiles-Serialize-libseq-libplat-mommond_mod-for-parallel-builds.patch
|
2019-02-08 11:32:58 +01:00
|
|
|
%if %{without hpc}
|
2012-08-20 23:51:31 +02:00
|
|
|
BuildRequires: gcc-fortran
|
2019-02-14 07:51:45 +01:00
|
|
|
%{?with_scotch:BuildRequires: %{scotch}%{?with_mpi:-%{mpi_family}%{?mpi_ext}}-devel}
|
|
|
|
%if %{with mpi}
|
|
|
|
BuildRequires: %{mpi_family}%{?mpi_ext}-devel
|
|
|
|
BuildRequires: libblacs2-%{mpi_family}%{?mpi_ext}-devel
|
2019-02-27 21:03:55 +01:00
|
|
|
BuildRequires: scalapack-%{mpi_family}%{?mpi_ext}-devel
|
2019-02-14 07:51:45 +01:00
|
|
|
%endif # mpi
|
2012-08-20 23:51:31 +02:00
|
|
|
BuildRequires: blas-devel
|
|
|
|
BuildRequires: lapack-devel
|
2019-02-14 07:51:45 +01:00
|
|
|
%else # hpc
|
2019-02-08 11:32:58 +01:00
|
|
|
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
|
|
|
BuildRequires: %{mpi_family}%{?mpi_ver}-%{compiler_family}%{?c_f_ver}-hpc-macros-devel
|
2019-02-27 21:03:55 +01:00
|
|
|
BuildRequires: fdupes
|
2019-02-08 11:32:58 +01:00
|
|
|
BuildRequires: libblacs2-%{compiler_family}-%{mpi_family}%{?mpi_ver}-hpc-devel
|
|
|
|
BuildRequires: libgomp1
|
2019-02-27 21:03:55 +01:00
|
|
|
BuildRequires: libscalapack2-%{compiler_family}-%{mpi_family}%{?mpi_ver}-hpc-devel
|
2019-02-08 11:32:58 +01:00
|
|
|
BuildRequires: suse-hpc
|
2019-02-14 07:51:45 +01:00
|
|
|
%endif # hpc
|
2012-08-20 23:51:31 +02:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%package -n %{libname}
|
2019-02-08 11:32:58 +01:00
|
|
|
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
|
2019-02-14 12:13:19 +01:00
|
|
|
Group: System/Libraries
|
2019-02-08 11:32:58 +01:00
|
|
|
%if %{without hpc}
|
|
|
|
%{?with_mpi:Recommends: %{name}-%{so_ver}-compat = %{version}}
|
2019-02-19 14:46:19 +01:00
|
|
|
# Explicitly include this library here:
|
|
|
|
# the solver doesn't have enough information to pick the correct MPI flavor
|
2019-02-25 06:41:34 +01:00
|
|
|
%{?with_mpi:Requires: libblacs2-%{mpi_family}%{?mpi_ext}}
|
2019-02-08 11:32:58 +01:00
|
|
|
%else
|
|
|
|
Requires: libscalapack2-%{compiler_family}-%{mpi_family}%{?mpi_ver}-hpc
|
|
|
|
%hpc_requires
|
2019-02-10 21:22:46 +01:00
|
|
|
Requires: lua-lmod >= 7.6.1
|
2019-02-08 11:32:58 +01:00
|
|
|
%endif
|
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%description -n %{libname}
|
2019-02-08 11:32:58 +01:00
|
|
|
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.
|
|
|
|
|
2019-01-14 17:47:01 +01:00
|
|
|
%if %{!with mpi}
|
2019-02-08 11:32:58 +01:00
|
|
|
This package contains the sequential library%{?scotch: with Scotch support enabled}.
|
2019-01-14 17:47:01 +01:00
|
|
|
%else
|
2019-02-14 07:51:45 +01:00
|
|
|
This package contains the parallel library%{?with_mpi: with %{mpi_family}%{?mpi_ver}}%{?scotch: with Scotch support enabled}.
|
2019-01-14 17:47:01 +01:00
|
|
|
%endif
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%package %{so_ver}-compat
|
2012-08-20 23:51:31 +02:00
|
|
|
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
|
2019-02-14 12:13:19 +01:00
|
|
|
Group: System/Libraries
|
2019-02-11 14:32:29 +01:00
|
|
|
Requires: lib%{pname}%{?scotch:-scotch}%{so_ver} = %{version}
|
2019-02-11 13:37:11 +01:00
|
|
|
%if %{without hpc} && %{with mpi}
|
2019-02-11 14:32:29 +01:00
|
|
|
# Install link targets for non-HPC MPI compat links from the MPI libdir - see below.
|
|
|
|
BuildRequires: %{pname}%{?scotch:-scotch}-devel-static = %version
|
2019-02-27 21:03:55 +01:00
|
|
|
BuildRequires: lib%{pname}%{?scotch:-scotch}%{so_ver} = %{version}
|
2019-02-11 13:37:11 +01:00
|
|
|
%endif
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%description %{so_ver}-compat
|
2012-08-20 23:51:31 +02:00
|
|
|
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.
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
This package provides links to the serial libraries from the MPI library
|
|
|
|
directory MUMPS built for %{mpi_family}%{?mpi_ver}.
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%package doc
|
|
|
|
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
|
|
|
|
Group: Documentation/HTML
|
|
|
|
BuildArch: noarch
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%description doc
|
2012-08-20 23:51:31 +02:00
|
|
|
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.
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
This package provides Documentation for %{package_name}.
|
2012-08-21 19:41:55 +02:00
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%if %{!with mpi}
|
|
|
|
This package contains the sequential library%{?scotch: with Scotch support enabled}.
|
|
|
|
%else
|
2019-02-14 07:51:45 +01:00
|
|
|
This package contains the parallel library%{?with_mpi: with %{mpi_family}%{?mpi_ver}}%{?scotch: with Scotch support enabled}.
|
2019-02-08 11:32:58 +01:00
|
|
|
%endif
|
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%package devel
|
2012-08-21 19:41:55 +02:00
|
|
|
Summary: Files needed for developing mumps based applications
|
2019-02-14 07:51:45 +01:00
|
|
|
Group: Development/Libraries/Parallel
|
2019-02-10 19:24:35 +01:00
|
|
|
Requires: %{libname} = %version
|
2019-02-08 16:30:20 +01:00
|
|
|
%if %{without hpc}
|
|
|
|
%if %{with mpi} || %{with scotch}
|
2019-01-14 17:47:01 +01:00
|
|
|
Requires: mumps-devel = %{version}
|
2019-02-08 16:30:20 +01:00
|
|
|
%endif
|
|
|
|
%if %{with mpi}
|
2019-02-14 07:51:45 +01:00
|
|
|
Requires: %{mpi_family}%{?mpi_ext}-devel
|
|
|
|
Requires: scalapack-%{mpi_family}%{?mpi_ext}-devel
|
2019-02-08 16:30:20 +01:00
|
|
|
%if %{with scotch}
|
|
|
|
Requires: mumps-scotch-devel = %{version}
|
2019-02-14 07:51:45 +01:00
|
|
|
Requires: ptscotch-%{mpi_family}%{?mpi_ext}-devel
|
2019-02-08 16:30:20 +01:00
|
|
|
%endif
|
|
|
|
%else # mpi
|
|
|
|
Requires: blas-devel
|
|
|
|
Requires: lapack-devel
|
|
|
|
%{?with_scotch:Requires: scotch-devel}
|
|
|
|
%endif # mpi
|
2019-02-28 13:54:20 +01:00
|
|
|
Recommends: gcc-fortran
|
2019-02-08 16:30:20 +01:00
|
|
|
%else # hpc
|
|
|
|
%hpc_requires_devel
|
2019-02-27 21:03:55 +01:00
|
|
|
Requires: libblacs2-%{compiler_family}-%{mpi_family}%{?mpi_ver}-hpc-devel
|
|
|
|
Requires: libscalapack2-%{compiler_family}-%{mpi_family}%{?mpi_ver}-hpc-devel
|
2019-02-08 11:32:58 +01:00
|
|
|
%endif
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%description devel
|
2012-08-20 23:51:31 +02:00
|
|
|
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.
|
|
|
|
|
2019-02-08 16:30:20 +01:00
|
|
|
Headers and development files for %{package_name}.
|
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%package devel-static
|
2019-02-08 16:30:20 +01:00
|
|
|
Summary: Files needed for developing mumps based applications
|
2019-02-14 07:51:45 +01:00
|
|
|
Group: Development/Libraries/Parallel
|
2019-02-10 19:24:35 +01:00
|
|
|
Requires: %{package_name}-devel
|
2019-02-08 16:30:20 +01:00
|
|
|
%{?with_mpi:Recommends: %{name}-%{so_ver}-compat-static = %{version}}
|
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%description devel-static
|
2019-02-08 16:30:20 +01:00
|
|
|
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.
|
|
|
|
|
|
|
|
Static libraries for %{package_name}.
|
|
|
|
|
2019-02-14 07:51:45 +01:00
|
|
|
%package devel-static-compat
|
2019-02-08 16:30:20 +01:00
|
|
|
Summary: Files needed for developing mumps based applications
|
2019-02-14 07:51:45 +01:00
|
|
|
Group: Development/Libraries/Parallel
|
|
|
|
Requires: %{pname}%{?scotch:-scotch}-devel-static = %version
|
2019-02-08 16:30:20 +01:00
|
|
|
|
2019-02-14 07:51:45 +01:00
|
|
|
%description devel-static-compat
|
2019-02-08 16:30:20 +01:00
|
|
|
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 provides links to the static serial libraries from the MPI
|
|
|
|
library directory MUMPS built for %{mpi_family}%{?mpi_ver}.
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%package examples
|
2019-02-14 12:13:19 +01:00
|
|
|
Summary: Test programs and examples for mumps
|
|
|
|
Group: Documentation/Other
|
2019-02-14 07:51:45 +01:00
|
|
|
Requires: %{libname} = %version
|
2019-02-25 06:36:03 +01:00
|
|
|
%if %{without hpc}
|
|
|
|
Provides: mumps(examples)(%{?mpi_family}) = %version
|
|
|
|
Conflicts: otherproviders(mumps(examples)(%{?mpi_family}))
|
|
|
|
%endif
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%description examples
|
2012-08-20 23:51:31 +02:00
|
|
|
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.
|
2019-02-08 11:32:58 +01:00
|
|
|
|
|
|
|
%if %{with hpc}
|
|
|
|
%{hpc_master_package -l -L}
|
|
|
|
%{hpc_master_package -L devel}
|
2019-02-14 07:51:45 +01:00
|
|
|
%{hpc_master_package -L examples}
|
2019-02-10 19:24:35 +01:00
|
|
|
%{hpc_master_package doc}
|
2019-02-08 11:32:58 +01:00
|
|
|
%endif
|
2012-08-20 23:51:31 +02:00
|
|
|
|
|
|
|
%prep
|
2019-02-08 11:32:58 +01:00
|
|
|
%setup -q -n %{PNAME}_%{version}
|
2019-02-10 19:24:35 +01:00
|
|
|
%patch1 -p1
|
2012-08-20 23:51:31 +02:00
|
|
|
|
|
|
|
%build
|
2019-02-19 15:38:58 +01:00
|
|
|
|
2012-08-20 23:51:31 +02:00
|
|
|
export SUSE_ASNEEDED=0
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%if %{with hpc}
|
|
|
|
%hpc_setup
|
|
|
|
module load openblas scalapack
|
|
|
|
%else
|
|
|
|
%{?with_mpi: source %{my_bindir}/mpivars.sh}
|
2019-01-14 17:47:01 +01:00
|
|
|
%endif
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%define PLAT %{?scotch:_%{scotch}}%{!?scotch:%{!?with_mpi:_seq}}
|
|
|
|
|
|
|
|
%if %{without scotch}
|
|
|
|
%define ORDERINGSF -Dpord
|
|
|
|
%else # scotch
|
|
|
|
%if %{with mpi}
|
|
|
|
%define scotch ptscotch
|
|
|
|
%define LSCOTCH -lptesmumps -lptscotch -lptscotcherr -lscotch
|
|
|
|
%define ORDERINGSF -Dscotch -Dpord -Dptscotch
|
|
|
|
%else # mpi
|
|
|
|
%define scotch scotch
|
|
|
|
%define LSCOTCH -lesmumps -lscotch -lscotcherr
|
|
|
|
%define ISCOTCH -I%_includedir
|
|
|
|
%define ORDERINGSF -Dscotch -Dpord
|
|
|
|
%endif
|
|
|
|
%endif # scotch
|
|
|
|
|
|
|
|
%if %{with hpc}
|
|
|
|
%define LIBBLAS -lopenblas -lscalapack
|
|
|
|
%define LAPAK -lscalapack
|
|
|
|
%else # hpc
|
|
|
|
%define LIBBLAS -lblas -llapack
|
|
|
|
%define LAPACK -llapack
|
|
|
|
%endif # hpc
|
|
|
|
|
2019-01-14 17:47:01 +01:00
|
|
|
%if %{with mpi}
|
|
|
|
# Set LD_LIBRARY_PATH and PATH
|
2019-02-08 11:32:58 +01:00
|
|
|
%define C_C mpicc
|
|
|
|
%define F_C mpif77
|
|
|
|
%define F_L mpif77
|
|
|
|
%define SCALAP -lscalapack -lblacs
|
2019-02-10 19:24:35 +01:00
|
|
|
%define MUMPS_LIBF77 %{!?with_hpc:-L%{my_libdir}} %{?mumps_f77_mpilibs}
|
|
|
|
%define INCPAR %{!?with_hpc:-I%{my_incdir}}
|
2019-02-08 11:32:58 +01:00
|
|
|
%define LIBPAR %{SCALAP} %{MUMPS_LIBF77}
|
|
|
|
%define INCS \\\$(INCPAR)
|
|
|
|
%define LIBS \\\$(LIBPAR)
|
|
|
|
%else # mpi
|
|
|
|
%define C_C gcc
|
|
|
|
%define F_C gfortran
|
|
|
|
%define F_L gfortran
|
|
|
|
%define LIBSEQNEEDED libseqneeded
|
|
|
|
%define MUMPS_LIBF77 -lmpiseq%{?PLAT}
|
|
|
|
%define INCS \\\$(INCSEQ)
|
|
|
|
%define LIBS \\\$(LIBSEQ)
|
|
|
|
%endif # mpi
|
2012-08-20 23:51:31 +02:00
|
|
|
|
|
|
|
cp -f %{S:1} Makefile.inc
|
2019-02-10 19:24:35 +01:00
|
|
|
echo \
|
|
|
|
"%{?C_C:CC=%C_C}
|
|
|
|
%{?F_C:FC=%F_C}
|
|
|
|
%{?F_L:FL=%F_L}
|
|
|
|
%{?SCALAP:SCALAP=%SCALAP}
|
|
|
|
%{?INCPAR:INCPAR=%INCPAR}
|
|
|
|
%{?LIBPAR:LIBPAR=%LIBPAR}
|
|
|
|
%{?LIBBLAS:LIBBLAS=%LIBBLAS}
|
|
|
|
%{?INCS:INCS=%INCS}
|
|
|
|
%{?LIBS:LIBS=%LIBS}
|
|
|
|
%{?LIBSEQNEEDED:LIBSEQNEEDED=%LIBSEQNEEDED}
|
|
|
|
%{?LSCOTCH:LSCOTCH=%LSCOTCH}
|
|
|
|
%{?ISCOTCH:ISCOTCH=%ISCOTCH}
|
|
|
|
%{?ORDERINGSF:ORDERINGSF=%ORDERINGSF}
|
|
|
|
%{?PLAT:PLAT=%PLAT}
|
|
|
|
OPTC=$RPM_OPT_FLAGS -fPIC
|
|
|
|
OPTF=\$(OPTC)" >> Makefile.inc
|
|
|
|
|
|
|
|
make %{?_smp_mflags} alllib
|
2019-02-08 11:32:58 +01:00
|
|
|
|
|
|
|
%{!?with_mpi:cp -P libseq/libmpiseq*.a lib/}
|
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
mkdir lib/tmp; cd lib/tmp;
|
2019-02-08 11:32:58 +01:00
|
|
|
%define LORDERINGS -lpord%{?PLAT} %{?scotch:-l%{scotch}}
|
|
|
|
%if %{without mpi}
|
2019-02-10 19:24:35 +01:00
|
|
|
rm -f *.o; ar -x ../libmpiseq%{?PLAT}.a
|
|
|
|
%F_C -shared *.o -Wl,-soname,libmpiseq%{?PLAT}.so.%{version} -o ../libmpiseq%{?PLAT}.so.%{version}
|
|
|
|
ln -s libmpiseq%{?PLAT}.so.%{version} ../libmpiseq%{?PLAT}.so
|
|
|
|
%endif
|
|
|
|
rm -f *.o; ar -x ../libpord%{?PLAT}.a
|
|
|
|
%C_C -shared *.o -Wl,-soname,libpord%{?PLAT}.so.%{version} -o ../libpord%{?PLAT}.so.%{version}
|
|
|
|
ln -s libpord%{?PLAT}.so.%{version} ../libpord%{?PLAT}.so
|
|
|
|
rm -f *.o; ar -x ../libmumps_common%{?PLAT}.a
|
|
|
|
%F_C -shared *.o -Wl,-soname,libmumps_common$%{?PLAT}.so.%{version} -L.. %{LORDERINGS} \
|
|
|
|
-lpthread %{MUMPS_LIBF77} -o ../libmumps_common%{?PLAT}.so.%{version}
|
|
|
|
ln -s libmumps_common%{?PLAT}.so.%{version} ../libmumps_common%{?PLAT}.so
|
2019-02-08 11:32:58 +01:00
|
|
|
for ARITH in c d s z ; do
|
2019-02-28 13:54:20 +01:00
|
|
|
%F_C -shared -Wl,--whole-archive ../lib${ARITH}mumps%{?PLAT}.a -Wl,--no-whole-archive \
|
|
|
|
-Wl,-soname,lib${ARITH}mumps%{?PLAT}.so.%{version} -L.. -lmumps_common%{?PLAT} \
|
|
|
|
%{LORDERINGS} %{MUMPS_LIBF77} %{LIBBLAS} %{?SCALAP} -o ../lib${ARITH}mumps%{?PLAT}.so.%{version}
|
2019-02-10 19:24:35 +01:00
|
|
|
ln -s lib${ARITH}mumps%{?PLAT}.so.%{version} ../lib${ARITH}mumps%{?PLAT}.so
|
2019-02-08 11:32:58 +01:00
|
|
|
done
|
|
|
|
cd -
|
2019-02-10 19:24:35 +01:00
|
|
|
rm -rf lib/tmp/
|
2012-08-20 23:51:31 +02:00
|
|
|
|
|
|
|
# build test programs
|
2019-02-10 19:24:35 +01:00
|
|
|
make -C examples clean
|
|
|
|
echo \
|
|
|
|
"LPORD=-L\$(LPORDDIR) -lpord\$(PLAT)
|
|
|
|
LIBEXT=.so" >> Makefile.inc
|
|
|
|
make -C examples \
|
|
|
|
OPTL="-pie -L../lib" all
|
|
|
|
# Make sure the user can build these later on
|
|
|
|
echo "OPTL=-pie -L%{my_libdir}" >> Makefile.inc
|
2012-08-20 23:51:31 +02:00
|
|
|
|
|
|
|
%install
|
2019-01-14 17:47:01 +01:00
|
|
|
mkdir -p %{buildroot}%{my_bindir}
|
|
|
|
mkdir -p %{buildroot}%{my_libdir}
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
# install libs
|
|
|
|
cp -P lib/lib*.a %{buildroot}%{my_libdir}
|
|
|
|
cp -P lib/lib*.so* %{buildroot}%{my_libdir}
|
2019-02-19 14:46:19 +01:00
|
|
|
%if %{with hpc} || %{without mpi} && %{without scotch}
|
|
|
|
mkdir -p %{buildroot}%{my_incdir}/mumps
|
|
|
|
mkdir -p %{buildroot}%{my_incdir}/pord
|
|
|
|
install -m 644 include/* %{buildroot}%{my_incdir}/mumps
|
|
|
|
install -m 644 libseq/*.h %{buildroot}%{my_incdir}/mumps
|
|
|
|
install -m 644 PORD/include/* %{buildroot}%{my_incdir}/pord
|
2019-01-14 17:47:01 +01:00
|
|
|
%endif
|
2019-02-08 11:32:58 +01:00
|
|
|
install -m 755 examples/*simpletest %{buildroot}%{my_bindir}
|
|
|
|
install -m 755 examples/c_example %{buildroot}%{my_bindir}
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%if %{with mpi}
|
2019-02-08 11:32:58 +01:00
|
|
|
%if %{without hpc}
|
2012-08-21 01:10:32 +02:00
|
|
|
# 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
|
2019-01-14 17:47:01 +01:00
|
|
|
for lib in libcmumps libdmumps libsmumps libzmumps libmumps_common libmpiseq libpord ; do
|
2019-02-08 11:32:58 +01:00
|
|
|
for type in .a .so .so.%{version}; do
|
|
|
|
name=${lib}_%{!?scotch:seq}%{?scotch:scotch}${type}
|
|
|
|
ln -s %{_libdir}/$name %{buildroot}%{my_libdir}/$name
|
|
|
|
done
|
2012-08-21 01:10:32 +02:00
|
|
|
done
|
2019-02-08 11:32:58 +01:00
|
|
|
%endif # hpc
|
|
|
|
%endif # mpi
|
|
|
|
|
|
|
|
%if %{with hpc}
|
|
|
|
%hpc_write_modules_files
|
|
|
|
#%%Module1.0#####################################################################
|
|
|
|
|
|
|
|
proc ModulesHelp { } {
|
|
|
|
|
|
|
|
puts stderr " "
|
|
|
|
puts stderr "This module loads the mumps library built with the %{compiler_family} compiler"
|
2019-02-14 07:51:45 +01:00
|
|
|
puts stderr "toolchain and the %{mpi_family}%{?mpi_ver} MPI stack."
|
2019-02-08 11:32:58 +01:00
|
|
|
puts stderr " "
|
|
|
|
|
|
|
|
puts stderr "\nVersion %{version}\n"
|
|
|
|
|
|
|
|
}
|
2019-02-14 07:51:45 +01:00
|
|
|
module-whatis "Name: %{pname} built with %{compiler_family} compiler%{?with_mpi: and %{mpi_family}%{?mpi_ver} MPI}"
|
2019-02-08 11:32:58 +01:00
|
|
|
module-whatis "Version: %{version}"
|
|
|
|
module-whatis "Category: runtime library"
|
|
|
|
module-whatis "%{url}"
|
|
|
|
|
|
|
|
set version %{version}
|
|
|
|
|
|
|
|
depends-on scalapack
|
|
|
|
|
|
|
|
prepend-path PATH %{hpc_bindir}
|
|
|
|
if {[file isdirectory %{hpc_includedir}]} {
|
|
|
|
prepend-path INCLUDE %{hpc_includedir}
|
|
|
|
}
|
|
|
|
prepend-path LD_LIBRARY_PATH %{hpc_libdir}
|
|
|
|
|
|
|
|
setenv %{PNAME}_DIR %{hpc_prefix}
|
|
|
|
setenv %{PNAME}_BIN %{hpc_bindir}
|
|
|
|
if {[file isdirectory %{hpc_includedir}]} {
|
|
|
|
setenv %{PNAME}_INC %{hpc_includedir}
|
|
|
|
}
|
|
|
|
setenv %{PNAME}_LIB %{hpc_libdir}
|
|
|
|
|
|
|
|
EOF
|
2019-01-14 17:47:01 +01:00
|
|
|
%endif
|
2012-08-21 01:10:32 +02:00
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
# Don't want binaries in docdir
|
|
|
|
rm -rf examples/*.o examples/*simpletest examples/c_example examples/multiple_arithmetics_example
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-01-14 17:47:01 +01:00
|
|
|
%if !%{with mpi}
|
2019-02-10 19:24:35 +01:00
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2019-01-14 17:47:01 +01:00
|
|
|
%else
|
2019-02-10 19:24:35 +01:00
|
|
|
%post -n %{libname}
|
2019-02-08 11:32:58 +01:00
|
|
|
/sbin/ldconfig -N %{my_libdir}
|
2019-02-27 21:03:55 +01:00
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%postun -n %{libname}
|
2019-02-08 11:32:58 +01:00
|
|
|
/sbin/ldconfig -N %{my_libdir}
|
|
|
|
%{?with_hpc:%{hpc_module_delete_if_default}}
|
2012-08-20 23:51:31 +02:00
|
|
|
%endif
|
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%files -n %{libname}
|
2019-02-08 11:32:58 +01:00
|
|
|
%if %{with hpc}
|
|
|
|
%{hpc_dirs}
|
|
|
|
%{hpc_modules_files}
|
|
|
|
%endif
|
2019-01-14 17:47:01 +01:00
|
|
|
%license LICENSE
|
2019-02-08 11:32:58 +01:00
|
|
|
%doc ChangeLog README VERSION CREDITS
|
|
|
|
%{my_libdir}/libcmumps%{?PLAT}.so.*
|
|
|
|
%{my_libdir}/libdmumps%{?PLAT}.so.*
|
|
|
|
%{my_libdir}/libsmumps%{?PLAT}.so.*
|
|
|
|
%{my_libdir}/libzmumps%{?PLAT}.so.*
|
|
|
|
%{my_libdir}/libmumps_common%{?PLAT}.so.*
|
|
|
|
%{my_libdir}/libpord%{?PLAT}.so.*
|
|
|
|
%if %{without mpi}
|
|
|
|
%{_libdir}/libmpiseq%{?PLAT}.so.*
|
2012-08-20 23:51:31 +02:00
|
|
|
%endif
|
|
|
|
|
2019-02-08 11:32:58 +01:00
|
|
|
%if %{with mpi} && %{without hpc}
|
|
|
|
%files %{so_ver}-compat
|
|
|
|
%if %{without scotch}
|
2019-01-14 17:47:01 +01:00
|
|
|
%{my_libdir}/lib*_seq.so.*
|
2019-02-08 11:32:58 +01:00
|
|
|
%else # scotch
|
2019-01-14 17:47:01 +01:00
|
|
|
%{my_libdir}/lib*_scotch.so.*
|
2019-02-08 11:32:58 +01:00
|
|
|
%endif # scotch
|
|
|
|
%endif # mpi && !hpc
|
2019-01-14 17:47:01 +01:00
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%files devel
|
2019-02-19 14:46:19 +01:00
|
|
|
%if %{with hpc} || ( %{without scotch} && %{without mpi} )
|
|
|
|
%{?with_hpc:%dir %{my_incdir}}
|
2019-02-08 11:32:58 +01:00
|
|
|
%{my_incdir}/mumps
|
|
|
|
%{my_incdir}/pord
|
|
|
|
%endif
|
2019-01-14 17:47:01 +01:00
|
|
|
%{my_libdir}/*.so
|
2019-02-08 16:30:20 +01:00
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%files devel-static
|
2019-02-08 16:30:20 +01:00
|
|
|
%{?with_mpi:%exclude %{my_libdir}/*%{!?scotch:_seq}%{?scotch:_scotch}.a}
|
2019-01-14 17:47:01 +01:00
|
|
|
%{my_libdir}/*.a
|
|
|
|
|
2019-02-08 16:30:20 +01:00
|
|
|
%if %{with mpi} && %{without hpc}
|
2019-02-14 07:51:45 +01:00
|
|
|
%files devel-static-compat
|
2019-02-08 16:30:20 +01:00
|
|
|
%{my_libdir}/*%{!?scotch:_seq}%{?scotch:_scotch}.a
|
|
|
|
%endif
|
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%if %{with hpc} || ( %{without mpi} && %{without scotch} )
|
|
|
|
%files doc
|
|
|
|
%doc doc SCILAB MATLAB
|
2019-01-14 17:47:01 +01:00
|
|
|
%endif
|
2012-08-20 23:51:31 +02:00
|
|
|
|
2019-02-10 19:24:35 +01:00
|
|
|
%files examples
|
|
|
|
%doc Makefile.inc examples
|
|
|
|
%{my_bindir}%{!?with_hpc:/*}
|
|
|
|
|
2012-08-20 23:51:31 +02:00
|
|
|
%changelog
|