Defined OpenMP support
This commit is contained in:
parent
d4b4d14288
commit
f3b22d03f6
67
metis.spec
67
metis.spec
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Name: metis
|
Name: metis
|
||||||
Version: 5.1.0
|
Version: 5.1.0
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering
|
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering
|
||||||
License: ASL 2.0 and BSD and LGPLv2+
|
License: ASL 2.0 and BSD and LGPLv2+
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -36,9 +36,9 @@ Patch2: %{name}-width-datatype.patch
|
|||||||
Patch4: %{name}-GKREGEX-GKRAND-LIBSUFFIX-fix.patch
|
Patch4: %{name}-GKREGEX-GKRAND-LIBSUFFIX-fix.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: openmpi-devel
|
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: help2man
|
BuildRequires: help2man
|
||||||
|
BuildRequires: chrpath
|
||||||
|
|
||||||
%description
|
%description
|
||||||
METIS is a set of serial programs for partitioning graphs,
|
METIS is a set of serial programs for partitioning graphs,
|
||||||
@ -47,13 +47,14 @@ orderings for sparse matrices.
|
|||||||
The algorithms implemented in METIS are based on the multilevel
|
The algorithms implemented in METIS are based on the multilevel
|
||||||
recursive-bisection, multilevel k-way, and multi-constraint
|
recursive-bisection, multilevel k-way, and multi-constraint
|
||||||
partitioning schemes developed in our lab.
|
partitioning schemes developed in our lab.
|
||||||
|
METIS is distributed with OpenMP support.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: The Metis headers and development-related files
|
Summary: The OpenMP Metis headers and development-related files
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
%description devel
|
%description devel
|
||||||
Header and library files of Metis.
|
Header and library files of Metis, OpenMP version.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
@ -65,39 +66,34 @@ if [ %{__isa_bits} = "64" ]; then
|
|||||||
fi
|
fi
|
||||||
%patch4 -p0
|
%patch4 -p0
|
||||||
|
|
||||||
|
## Remove default compiler flag
|
||||||
|
sed -e 's|-O3||g' -i GKlib/GKlibSystem.cmake
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
pushd build
|
||||||
# Build metis
|
|
||||||
cd build
|
|
||||||
export LDFLAGS="%{__global_ldflags} -Wl,-z,now"
|
|
||||||
%cmake \
|
%cmake \
|
||||||
-DCMAKE_C_COMPILER=%{_bindir}/gcc \
|
-DCMAKE_C_COMPILER:FILEPATH=%{_bindir}/gcc \
|
||||||
-DCMAKE_CXX_COMPILER=%{_bindir}/g++ \
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{_bindir}/g++ \
|
||||||
-DGKLIB_PATH=../GKlib \
|
-DGKLIB_PATH=../GKlib \
|
||||||
-DSHARED=1 \
|
-DSHARED:BOOL=TRUE \
|
||||||
-DOPENMP=%{_includedir}/openmpi-%{_arch} \
|
-DOPENMP:BOOL=ON \
|
||||||
-DPCRE=%{_includedir} \
|
-DPCRE:BOOL=ON \
|
||||||
-DCMAKE_CXX_FLAGS="%{optflags} -Wl,-z,relro -DNDEBUG -Wl,-z,now -fopenmp -pthread" \
|
-DCMAKE_CXX_FLAGS:STRING="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread" \
|
||||||
-DCMAKE_C_FLAGS="%{optflags} -Wl,-z,relro -DNDEBUG -Wl,-z,now -fopenmp -pthread" \
|
-DCMAKE_C_FLAGS:STRING="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread" \
|
||||||
-DCMAKE_VERBOSE_MAKEFILE=1 \
|
-DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -fPIC -pie -Wl,-z,now" \
|
||||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} ..
|
-DCMAKE_EXE_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -fPIC -pie -Wl,-z,now" \
|
||||||
|
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} ..
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
cd ../
|
|
||||||
|
|
||||||
%check
|
|
||||||
cp -p %{buildroot}%{_bindir}/* graphs
|
|
||||||
pushd graphs
|
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./ndmetis mdual.graph
|
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./mpmetis metis.mesh 2
|
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis test.mgraph 4
|
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis copter2.graph 4
|
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./graphchk 4elt.graph
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
pushd build
|
pushd build
|
||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
|
## Remove rpaths
|
||||||
|
chrpath -d %{buildroot}%{_bindir}/*
|
||||||
|
|
||||||
## Generate manpages from binaries
|
## Generate manpages from binaries
|
||||||
%if 0%{?el6}
|
%if 0%{?el6}
|
||||||
LD_PRELOAD=%{buildroot}%{_libdir}/lib%{name}.so.0 \
|
LD_PRELOAD=%{buildroot}%{_libdir}/lib%{name}.so.0 \
|
||||||
@ -136,6 +132,16 @@ mkdir -p %{buildroot}%{_mandir}/man1
|
|||||||
mv *.1 %{buildroot}%{_mandir}/man1
|
mv *.1 %{buildroot}%{_mandir}/man1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
%check
|
||||||
|
cp -p %{buildroot}%{_bindir}/* graphs
|
||||||
|
pushd graphs
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./ndmetis mdual.graph
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./mpmetis metis.mesh 2
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis test.mgraph 4
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis copter2.graph 4
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./graphchk 4elt.graph
|
||||||
|
popd
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -148,13 +154,16 @@ popd
|
|||||||
%{_libdir}/lib%{name}.so.*
|
%{_libdir}/lib%{name}.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc Changelog
|
|
||||||
%{_includedir}/%{name}.h
|
%{_includedir}/%{name}.h
|
||||||
%{_libdir}/lib%{name}.so
|
%{_libdir}/lib%{name}.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 20 2016 Antonio Trande <sagitter@fedoraproject.org> - 5.1.0-9
|
||||||
|
- Defined OpenMP support
|
||||||
|
- Some cleanups of the SPEC file
|
||||||
|
|
||||||
* Wed Dec 23 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.1.0-8
|
* Wed Dec 23 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.1.0-8
|
||||||
- Used always 'cmake' compiler
|
- Used always 'cmake' command
|
||||||
|
|
||||||
* Thu Oct 29 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.1.0-7
|
* Thu Oct 29 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.1.0-7
|
||||||
- Rebuild for cmake 3.4.0
|
- Rebuild for cmake 3.4.0
|
||||||
|
Loading…
Reference in New Issue
Block a user