Accepting request 651310 from science
OBS-URL: https://build.opensuse.org/request/show/651310 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/metis?expand=0&rev=4
This commit is contained in:
commit
e8c5fab52b
4
_multibuild
Normal file
4
_multibuild
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>serial</package>
|
||||||
|
<package>gnu-hpc</package>
|
||||||
|
</multibuild>
|
15
metis-makefile-c-directives.patch
Normal file
15
metis-makefile-c-directives.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Index: metis-5.1.0/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- metis-5.1.0.orig/Makefile
|
||||||
|
+++ metis-5.1.0/Makefile
|
||||||
|
@@ -51,6 +51,10 @@ endif
|
||||||
|
ifneq ($(cc), not-set)
|
||||||
|
CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc)
|
||||||
|
endif
|
||||||
|
+ifneq ($(cflags), not-set)
|
||||||
|
+ CONFIG_FLAGS += -DCMAKE_C_FLAGS="$(cflags)" -DCMAKE_CXX_FLAGS="$(cflags)"
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
|
||||||
|
VERNUM=5.1.0
|
||||||
|
PKGNAME=metis-$(VERNUM)
|
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 22 16:27:05 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Edit description to put time-sensitive wording into context.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 26 09:27:45 UTC 2018 - eich@suse.com
|
||||||
|
|
||||||
|
- General spec file clean up.
|
||||||
|
- Touch-up to the HPC build.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 30 13:22:30 UTC 2017 - jjolly@suse.com
|
||||||
|
|
||||||
|
- Implemented suse-hpc packaging
|
||||||
|
- Added metis-makefile-c-directives.patch
|
||||||
|
- Provides cflags option to help provide metis native build process
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jun 20 08:38:47 UTC 2014 - dmitry_r@opensuse.org
|
Fri Jun 20 08:38:47 UTC 2014 - dmitry_r@opensuse.org
|
||||||
|
|
||||||
|
210
metis.spec
210
metis.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package metis
|
# spec file for package metis
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -12,58 +12,134 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
Name: metis
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
Version: 5.1.0
|
|
||||||
|
%define vers 5.1.0
|
||||||
|
%define _vers 5_1_0
|
||||||
|
%define short_ver 5.1
|
||||||
|
%define src_ver %{version}
|
||||||
|
%define pname metis
|
||||||
%define somajor 5
|
%define somajor 5
|
||||||
|
|
||||||
|
%if "%{flavor}" == ""
|
||||||
|
ExclusiveArch: do_not_build
|
||||||
|
%define package_name %pname
|
||||||
|
%bcond_with hpc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "serial"
|
||||||
|
%bcond_with hpc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "gnu-hpc"
|
||||||
|
%bcond_without hpc
|
||||||
|
%global compiler_family gnu
|
||||||
|
%undefine c_f_ver
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{flavor}" == "gnu6-hpc"
|
||||||
|
%bcond_without hpc
|
||||||
|
%define compiler_family gnu
|
||||||
|
%define c_f_ver 6
|
||||||
|
%undefine mpi_flavor
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without hpc}
|
||||||
|
%if 0%{!?package_name:1}
|
||||||
|
%define package_name %{pname}
|
||||||
|
%endif
|
||||||
|
%define p_prefix %_prefix
|
||||||
|
%define p_includedir %_includedir
|
||||||
|
%define p_libdir %_libdir
|
||||||
|
%define p_bindir %_bindir
|
||||||
|
%define p_mandir %_mandir
|
||||||
|
%define p_datadir %_datadir
|
||||||
|
%define p_infodir %_infodir
|
||||||
|
%define libname lib%{pname}%{somajor}
|
||||||
|
|
||||||
|
%else
|
||||||
|
|
||||||
|
%define package_name %{hpc_package_name %_vers}
|
||||||
|
%define p_prefix %hpc_prefix
|
||||||
|
%define p_includedir %hpc_includedir
|
||||||
|
%define p_libdir %hpc_libdir
|
||||||
|
%define p_bindir %hpc_bindir
|
||||||
|
%define p_mandir %hpc_mandir
|
||||||
|
%define p_datadir %hpc_datadir
|
||||||
|
%define p_infodir %hpc_infodir
|
||||||
|
%define libname lib%{pname}%{hpc_package_name_tail %{_vers}}
|
||||||
|
|
||||||
|
%{hpc_init -c %{compiler_family} %{?c_f_ver:-v %{c_f_ver}} %{?ext:-e %{ext}}}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: %{package_name}
|
||||||
|
Version: %{vers}
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering
|
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Productivity/Scientific/Math
|
Group: Productivity/Scientific/Math
|
||||||
Url: http://glaros.dtc.umn.edu/gkhome/metis/metis/overview
|
Url: http://glaros.dtc.umn.edu/gkhome/metis/metis/overview
|
||||||
Source0: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/%{name}-%{version}.tar.gz
|
Source0: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/%{pname}-%{version}.tar.gz
|
||||||
# PATCH-FIX-OPENSUSE metis-cmake.patch
|
# PATCH-FIX-OPENSUSE metis-cmake.patch
|
||||||
Patch1: metis-cmake.patch
|
Patch1: metis-cmake.patch
|
||||||
# PATCH-FIX-OPENSUSE metis-programs-no-compilation-time.patch -- Fix W: file-contains-date-and-time
|
# PATCH-FIX-OPENSUSE metis-programs-no-compilation-time.patch -- Fix W: file-contains-date-and-time
|
||||||
Patch2: metis-programs-no-compilation-time.patch
|
Patch2: metis-programs-no-compilation-time.patch
|
||||||
|
Patch3: metis-makefile-c-directives.patch
|
||||||
BuildRequires: cmake >= 2.8
|
BuildRequires: cmake >= 2.8
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
%if %{with hpc}
|
||||||
|
%hpc_requires
|
||||||
|
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
||||||
|
BuildRequires: lua-lmod
|
||||||
|
BuildRequires: suse-hpc
|
||||||
|
%endif
|
||||||
|
|
||||||
Recommends: %{name}-doc = %{version}
|
Recommends: %{name}-doc = %{version}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
METIS is a family of programs for partitioning unstructured graphs and hypergraph
|
METIS is a family of programs for partitioning unstructured graphs and hypergraph
|
||||||
and computing fill-reducing orderings of sparse matrices. The underlying algorithms
|
and computing fill-reducing orderings of sparse matrices. The underlying algorithms
|
||||||
used by METIS are based on the state-of-the-art multilevel paradigm that has been
|
used by METIS are based on a multilevel paradigm that, at the time, had been
|
||||||
shown to produce high quality results and scale to very large problems.
|
shown to produce quality results and scale to large problems.
|
||||||
|
|
||||||
%package -n libmetis%{somajor}
|
%{?with_hpc:%{hpc_master_package}}
|
||||||
|
|
||||||
|
%package -n %{libname}
|
||||||
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering library
|
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering library
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
Obsoletes: %libname < %{version}
|
||||||
|
%{?with_hpc:Requires: %{name}-module = %version}
|
||||||
|
|
||||||
%description -n libmetis%{somajor}
|
%description -n %{libname}
|
||||||
METIS library provides to partitioning unstructured graphs and hypergraph
|
METIS library provides to partitioning unstructured graphs and hypergraph
|
||||||
and computing fill-reducing orderings of sparse matrices. The underlying algorithms
|
and computing fill-reducing orderings of sparse matrices. The underlying algorithms
|
||||||
used by METIS are based on the state-of-the-art multilevel paradigm that has been
|
used by METIS are based on a multilevel paradigm that, at the time, had been
|
||||||
shown to produce high quality results and scale to very large problems.
|
shown to produce quality results and scale to large problems.
|
||||||
|
|
||||||
|
%{?with_hpc:%{hpc_master_package -l -L}}
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Metis development files
|
Summary: Metis development files
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: libmetis%{somajor} = %{version}
|
Requires: %libname = %{version}
|
||||||
|
%{?with_hpc:%hpc_requires_devel}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
METIS library provides to partitioning unstructured graphs and hypergraph
|
METIS library provides to partitioning unstructured graphs and hypergraph
|
||||||
and computing fill-reducing orderings of sparse matrices. The underlying algorithms
|
and computing fill-reducing orderings of sparse matrices. The underlying algorithms
|
||||||
used by METIS are based on the state-of-the-art multilevel paradigm that has been
|
used by METIS are based on a multilevel paradigm that, at the time, had been
|
||||||
shown to produce high quality results and scale to very large problems.
|
shown to produce quality results and scale to large problems.
|
||||||
|
|
||||||
This package provides development files.
|
This package provides development files.
|
||||||
|
|
||||||
|
%{?with_hpc:%{hpc_master_package devel}}
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Metis documentation
|
Summary: Metis documentation
|
||||||
Group: Documentation/Other
|
Group: Documentation/Other
|
||||||
@ -72,57 +148,111 @@ BuildArch: noarch
|
|||||||
%description doc
|
%description doc
|
||||||
METIS is a family of programs for partitioning unstructured graphs and hypergraph
|
METIS is a family of programs for partitioning unstructured graphs and hypergraph
|
||||||
and computing fill-reducing orderings of sparse matrices. The underlying algorithms
|
and computing fill-reducing orderings of sparse matrices. The underlying algorithms
|
||||||
used by METIS are based on the state-of-the-art multilevel paradigm that has been
|
used by METIS are based on a multilevel paradigm that, at the time, had been
|
||||||
shown to produce high quality results and scale to very large problems.
|
shown to produce quality results and scale to large problems.
|
||||||
|
|
||||||
|
%{?with_hpc:%{hpc_master_package doc}}
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%{?with_hpc: %hpc_debug}
|
||||||
|
%setup -q -n %{pname}-%{version}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
# set width (32 or 64 bits) of the elementary data type, see Install.txt
|
# set width (32 or 64 bits) of the elementary data type, see Install.txt
|
||||||
sed -i 's|#define IDXTYPEWIDTH 32|#define IDXTYPEWIDTH %{__isa_bits}|' include/metis.h
|
sed -i 's|#define IDXTYPEWIDTH 32|#define IDXTYPEWIDTH %{__isa_bits}|' include/metis.h
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
|
||||||
-DCMAKE_C_FLAGS="%{optflags} -fopenmp -pthread" \
|
%if %{with hpc}
|
||||||
-DCMAKE_CXX_FLAGS="%{optflags} -fopenmp -pthread" \
|
%hpc_debug
|
||||||
..
|
%hpc_setup_compiler
|
||||||
|
%endif
|
||||||
|
|
||||||
|
make config shared=1 prefix=%{p_prefix} cflags="%{optflags} -fopenmp -pthread -fpie -pie" ldflags="-pie"
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
%{?with_hpc:%hpc_setup}
|
||||||
|
%{?with_hpc:%hpc_debug}
|
||||||
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
|
%if %{with hpc}
|
||||||
|
%{hpc_write_pkgconfig -n %{pname} -l lib%{pname}}
|
||||||
|
|
||||||
|
%hpc_write_modules_files
|
||||||
|
#%%Module1.0#####################################################################
|
||||||
|
|
||||||
|
proc ModulesHelp { } {
|
||||||
|
|
||||||
|
puts stderr " "
|
||||||
|
puts stderr "This module loads the %{pname} library built with the %{compiler_family} compiler toolchain."
|
||||||
|
puts stderr "\nVersion %{version}\n"
|
||||||
|
|
||||||
|
}
|
||||||
|
module-whatis "Name: %{pname} built with %{compiler_family} toolchain"
|
||||||
|
module-whatis "Version: %{version}"
|
||||||
|
module-whatis "Category: runtime library"
|
||||||
|
module-whatis "Description: %{summary}"
|
||||||
|
module-whatis "%{url}"
|
||||||
|
|
||||||
|
set version %{version}
|
||||||
|
|
||||||
|
prepend-path PATH %{hpc_bindir}
|
||||||
|
prepend-path LD_LIBRARY_PATH %{hpc_libdir}
|
||||||
|
|
||||||
|
setenv %{hpc_upcase %pname}_DIR %{hpc_prefix}
|
||||||
|
setenv %{hpc_upcase %pname}_BIN %{hpc_bindir}
|
||||||
|
setenv %{hpc_upcase %pname}_LIB %{hpc_libdir}
|
||||||
|
|
||||||
|
if {[file isdirectory %{hpc_includedir}]} {
|
||||||
|
prepend-path LIBRARY_PATH %{hpc_libdir}
|
||||||
|
prepend-path CPATH %{hpc_includedir}
|
||||||
|
prepend-path C_INCLUDE_PATH %{hpc_includedir}
|
||||||
|
prepend-path CPLUS_INCLUDE_PATH %{hpc_includedir}
|
||||||
|
prepend-path INCLUDE %{hpc_includedir}
|
||||||
|
|
||||||
|
setenv %{hpc_upcase %pname}_INC %{hpc_includedir}
|
||||||
|
}
|
||||||
|
|
||||||
|
family "%pname"
|
||||||
|
|
||||||
|
EOF
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cp -p %{buildroot}%{_bindir}/* graphs
|
cp -p %{buildroot}%{p_bindir}/* graphs
|
||||||
pushd graphs
|
pushd graphs
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./ndmetis mdual.graph
|
LD_LIBRARY_PATH=%{buildroot}%{p_libdir}:$LD_LIBRARY_PATH ./ndmetis mdual.graph
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./mpmetis metis.mesh 2
|
LD_LIBRARY_PATH=%{buildroot}%{p_libdir}:$LD_LIBRARY_PATH ./mpmetis metis.mesh 2
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis test.mgraph 4
|
LD_LIBRARY_PATH=%{buildroot}%{p_libdir}:$LD_LIBRARY_PATH ./gpmetis test.mgraph 4
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis copter2.graph 4
|
LD_LIBRARY_PATH=%{buildroot}%{p_libdir}:$LD_LIBRARY_PATH ./gpmetis copter2.graph 4
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./graphchk 4elt.graph
|
LD_LIBRARY_PATH=%{buildroot}%{p_libdir}:$LD_LIBRARY_PATH ./graphchk 4elt.graph
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%post -n libmetis%{somajor} -p /sbin/ldconfig
|
%post -n %libname -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n libmetis%{somajor} -p /sbin/ldconfig
|
%postun -n %libname -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%{?with_hpc:%dir %p_bindir}
|
||||||
%doc Changelog LICENSE.txt
|
%doc Changelog
|
||||||
%{_bindir}/*
|
%license LICENSE.txt
|
||||||
|
%{p_bindir}/*
|
||||||
|
|
||||||
%files -n libmetis%{somajor}
|
%files -n %{libname}
|
||||||
%defattr(-,root,root)
|
%{?with_hpc:%hpc_dirs}
|
||||||
%{_libdir}/libmetis.so.%{somajor}*
|
%{?hpc_modules_files}
|
||||||
|
%{p_libdir}/lib%{pname}.so.%{somajor}*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%{?with_hpc:%dir %{p_includedir}}
|
||||||
%{_includedir}/%{name}.h
|
%{p_includedir}/%{pname}.h
|
||||||
%{_libdir}/libmetis.so
|
%{p_libdir}/lib%{pname}.so
|
||||||
|
%{?with_hpc:%{hpc_pkgconfig_file -n %{pname}}}
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc manual/manual.pdf
|
%doc manual/manual.pdf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user