Build 64 integer version
This commit is contained in:
parent
787b10aa99
commit
fc6e664b05
153
metis.spec
153
metis.spec
@ -6,9 +6,15 @@
|
|||||||
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
|
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
|
||||||
|
%global arch64 1
|
||||||
|
%else
|
||||||
|
%global arch64 0
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: metis
|
Name: metis
|
||||||
Version: 5.1.0
|
Version: 5.1.0
|
||||||
Release: 11%{?dist}
|
Release: 12%{?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
|
||||||
@ -30,7 +36,10 @@ Patch1: %{name}-shared-GKlib.patch
|
|||||||
Patch2: %{name}-width-datatype.patch
|
Patch2: %{name}-width-datatype.patch
|
||||||
|
|
||||||
## This patch sets up GKREGEX, GKRAND, libsuffix options to the Makefiles
|
## This patch sets up GKREGEX, GKRAND, libsuffix options to the Makefiles
|
||||||
Patch4: %{name}-GKREGEX-GKRAND-LIBSUFFIX-fix.patch
|
Patch3: %{name}-GKREGEX-GKRAND-LIBSUFFIX-fix.patch
|
||||||
|
|
||||||
|
## Rename library of 64 integer version
|
||||||
|
Patch4: %{name}_lib64.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
@ -53,29 +62,55 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%description devel
|
%description devel
|
||||||
Header and library files of Metis, OpenMP version.
|
Header and library files of Metis, OpenMP version.
|
||||||
|
|
||||||
|
%if 0%{?arch64}
|
||||||
|
%package -n metis64
|
||||||
|
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering (64bit INTEGER)
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
|
||||||
|
%description -n metis64
|
||||||
|
METIS is a set of serial programs for partitioning graphs,
|
||||||
|
partitioning finite element meshes, and producing fill reducing
|
||||||
|
orderings for sparse matrices.
|
||||||
|
The algorithms implemented in METIS are based on the multilevel
|
||||||
|
recursive-bisection, multilevel k-way, and multi-constraint
|
||||||
|
partitioning schemes developed in our lab.
|
||||||
|
METIS is distributed with OpenMP support.
|
||||||
|
This build has 64bit INTEGER support.
|
||||||
|
|
||||||
|
%package -n metis64-devel
|
||||||
|
Summary: LAPACK development libraries (64bit INTEGER)
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: metis64%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n metis64-devel
|
||||||
|
Header and library files of Metis,
|
||||||
|
OpenMP version (64bit INTEGER).
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -qc
|
||||||
|
|
||||||
|
pushd %{name}-%{version}
|
||||||
%patch0 -p0
|
%patch0 -p0
|
||||||
%patch1 -p0
|
%patch1 -p0
|
||||||
|
%patch3 -p0
|
||||||
if [ %{__isa_bits} = "64" ]; then
|
|
||||||
%patch2 -p0
|
|
||||||
fi
|
|
||||||
%patch4 -p0
|
|
||||||
|
|
||||||
## Remove default compiler flag
|
## Remove default compiler flag
|
||||||
sed -e 's|-O3||g' -i GKlib/GKlibSystem.cmake
|
sed -e 's|-O3||g' -i GKlib/GKlibSystem.cmake
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if 0%{?arch64}
|
||||||
|
cp -a %{name}-%{version} metis64
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
pushd build
|
pushd %{name}-%{version}/build
|
||||||
|
export CC=gcc
|
||||||
%cmake \
|
%cmake \
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{_bindir}/gcc \
|
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{_bindir}/g++ \
|
|
||||||
-DGKLIB_PATH=../GKlib \
|
-DGKLIB_PATH=../GKlib \
|
||||||
-DSHARED:BOOL=TRUE \
|
-DSHARED:BOOL=TRUE \
|
||||||
-DOPENMP:BOOL=ON \
|
-DOPENMP:BOOL=ON \
|
||||||
-DPCRE:BOOL=ON \
|
-DPCRE:BOOL=ON \
|
||||||
-DCMAKE_CXX_FLAGS:STRING="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread" \
|
|
||||||
-DCMAKE_C_FLAGS:STRING="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread" \
|
-DCMAKE_C_FLAGS:STRING="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread" \
|
||||||
-DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -fPIC -pie -Wl,-z,now" \
|
-DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -fPIC -pie -Wl,-z,now" \
|
||||||
-DCMAKE_EXE_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -fPIC -pie -Wl,-z,now" \
|
-DCMAKE_EXE_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -fPIC -pie -Wl,-z,now" \
|
||||||
@ -84,12 +119,31 @@ pushd build
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%if 0%{?arch64}
|
||||||
pushd build
|
cd metis64
|
||||||
%make_install
|
patch -p0 < %{PATCH2}
|
||||||
|
patch -p0 < %{PATCH4}
|
||||||
|
mkdir -p build64
|
||||||
|
pushd build64
|
||||||
|
export CC=gcc
|
||||||
|
%cmake \
|
||||||
|
-DGKLIB_PATH=../GKlib \
|
||||||
|
-DSHARED:BOOL=TRUE \
|
||||||
|
-DOPENMP:BOOL=ON \
|
||||||
|
-DPCRE:BOOL=ON \
|
||||||
|
-DCMAKE_C_FLAGS:STRING="%{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread" \
|
||||||
|
-DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -fPIC -pie -Wl,-z,now" \
|
||||||
|
-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}
|
||||||
|
popd
|
||||||
|
cd ../
|
||||||
|
%endif
|
||||||
|
|
||||||
## Remove rpaths
|
%install
|
||||||
chrpath -d %{buildroot}%{_bindir}/*
|
pushd %{name}-%{version}/build
|
||||||
|
%make_install
|
||||||
|
|
||||||
## Generate manpages from binaries
|
## Generate manpages from binaries
|
||||||
%if 0%{?el6}
|
%if 0%{?el6}
|
||||||
@ -129,24 +183,58 @@ mkdir -p %{buildroot}%{_mandir}/man1
|
|||||||
mv *.1 %{buildroot}%{_mandir}/man1
|
mv *.1 %{buildroot}%{_mandir}/man1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# Save metis.h with IDXTYPEWIDTH = 32
|
||||||
|
mv %{buildroot}%{_includedir}/metis.h %{buildroot}%{_includedir}/metis32.h
|
||||||
|
|
||||||
|
%if 0%{?arch64}
|
||||||
|
pushd metis64/build64
|
||||||
|
%make_install
|
||||||
|
# Save metis.h with IDXTYPEWIDTH = 64
|
||||||
|
mv %{buildroot}%{_includedir}/metis.h %{buildroot}%{_includedir}/metis64.h
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Save metis.h with IDXTYPEWIDTH = 32
|
||||||
|
mv %{buildroot}%{_includedir}/metis32.h %{buildroot}%{_includedir}/metis.h
|
||||||
|
|
||||||
|
## Remove rpaths
|
||||||
|
chrpath -d %{buildroot}%{_bindir}/*
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cp -p %{buildroot}%{_bindir}/* graphs
|
cp -p %{buildroot}%{_bindir}/* %{name}-%{version}/graphs
|
||||||
pushd graphs
|
pushd %{name}-%{version}/graphs
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./ndmetis mdual.graph
|
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 ./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 test.mgraph 4
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis copter2.graph 4
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis copter2.graph 4
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./graphchk 4elt.graph
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./graphchk 4elt.graph
|
||||||
|
%if 0%{?arch64}
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./ndmetis64 mdual.graph
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./mpmetis64 metis.mesh 2
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis64 test.mgraph 4
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis64 copter2.graph 4
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./graphchk64 4elt.graph
|
||||||
|
%endif
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%if 0%{?arch64}
|
||||||
|
%post -n metis64 -p /sbin/ldconfig
|
||||||
|
%postun -n metis64 -p /sbin/ldconfig
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{!?_licensedir:%global license %doc}
|
%{!?_licensedir:%global license %doc}
|
||||||
%doc Changelog manual/manual.pdf
|
%doc %{name}-%{version}/Changelog %{name}-%{version}/manual/manual.pdf
|
||||||
%license LICENSE.txt
|
%license %{name}-%{version}/LICENSE.txt
|
||||||
%{_bindir}/*
|
%{_bindir}/cmpfillin
|
||||||
|
%{_bindir}/gpmetis
|
||||||
|
%{_bindir}/graphchk
|
||||||
|
%{_bindir}/m2gmetis
|
||||||
|
%{_bindir}/mpmetis
|
||||||
|
%{_bindir}/ndmetis
|
||||||
%{_mandir}/man1/*.1.gz
|
%{_mandir}/man1/*.1.gz
|
||||||
%{_libdir}/lib%{name}.so.*
|
%{_libdir}/lib%{name}.so.*
|
||||||
|
|
||||||
@ -154,7 +242,28 @@ popd
|
|||||||
%{_includedir}/%{name}.h
|
%{_includedir}/%{name}.h
|
||||||
%{_libdir}/lib%{name}.so
|
%{_libdir}/lib%{name}.so
|
||||||
|
|
||||||
|
%if 0%{?arch64}
|
||||||
|
%files -n metis64
|
||||||
|
%{!?_licensedir:%global license %doc}
|
||||||
|
%doc metis64/Changelog metis64/manual/manual.pdf
|
||||||
|
%license metis64/LICENSE.txt
|
||||||
|
%{_bindir}/cmpfillin64
|
||||||
|
%{_bindir}/gpmetis64
|
||||||
|
%{_bindir}/graphchk64
|
||||||
|
%{_bindir}/m2gmetis64
|
||||||
|
%{_bindir}/mpmetis64
|
||||||
|
%{_bindir}/ndmetis64
|
||||||
|
%{_libdir}/lib%{name}64.so.*
|
||||||
|
|
||||||
|
%files -n metis64-devel
|
||||||
|
%{_includedir}/%{name}64.h
|
||||||
|
%{_libdir}/lib%{name}64.so
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 15 2016 Antonio Trande <sagitter@fedoraproject.org> - 5.1.0-12
|
||||||
|
- Build 64 integer version
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-11
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-11
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
52
metis_lib64.patch
Normal file
52
metis_lib64.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
--- libmetis/CMakeLists.orig.txt 2016-02-16 19:06:56.480139000 +0100
|
||||||
|
+++ libmetis/CMakeLists.txt 2016-02-16 19:07:55.511134162 +0100
|
||||||
|
@@ -3,14 +3,14 @@
|
||||||
|
# Find sources.
|
||||||
|
file(GLOB metis_sources *.c)
|
||||||
|
# Build libmetis.
|
||||||
|
-add_library(metis ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources})
|
||||||
|
-set_target_properties(metis PROPERTIES SOVERSION 0)
|
||||||
|
+add_library(metis64 ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources})
|
||||||
|
+set_target_properties(metis64 PROPERTIES SOVERSION 0)
|
||||||
|
if(UNIX)
|
||||||
|
- target_link_libraries(metis m)
|
||||||
|
+ target_link_libraries(metis64 m)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(METIS_INSTALL)
|
||||||
|
- install(TARGETS metis
|
||||||
|
+ install(TARGETS metis64
|
||||||
|
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||||
|
RUNTIME DESTINATION lib${LIB_SUFFIX}
|
||||||
|
ARCHIVE DESTINATION lib${LIB_SUFFIX})
|
||||||
|
--- programs/CMakeLists.orig.txt 2013-03-30 17:24:45.000000000 +0100
|
||||||
|
+++ programs/CMakeLists.txt 2016-02-16 22:42:18.625946692 +0100
|
||||||
|
@@ -2,19 +2,19 @@
|
||||||
|
include_directories(../libmetis)
|
||||||
|
link_directories(/home/karypis/local/lib)
|
||||||
|
# Build program.
|
||||||
|
-add_executable(gpmetis gpmetis.c cmdline_gpmetis.c io.c stat.c)
|
||||||
|
-add_executable(ndmetis ndmetis.c cmdline_ndmetis.c io.c smbfactor.c)
|
||||||
|
-add_executable(mpmetis mpmetis.c cmdline_mpmetis.c io.c stat.c)
|
||||||
|
-add_executable(m2gmetis m2gmetis.c cmdline_m2gmetis.c io.c)
|
||||||
|
-add_executable(graphchk graphchk.c io.c)
|
||||||
|
-add_executable(cmpfillin cmpfillin.c io.c smbfactor.c)
|
||||||
|
-foreach(prog gpmetis ndmetis mpmetis m2gmetis graphchk cmpfillin)
|
||||||
|
- target_link_libraries(${prog} metis)
|
||||||
|
+add_executable(gpmetis64 gpmetis.c cmdline_gpmetis.c io.c stat.c)
|
||||||
|
+add_executable(ndmetis64 ndmetis.c cmdline_ndmetis.c io.c smbfactor.c)
|
||||||
|
+add_executable(mpmetis64 mpmetis.c cmdline_mpmetis.c io.c stat.c)
|
||||||
|
+add_executable(m2gmetis64 m2gmetis.c cmdline_m2gmetis.c io.c)
|
||||||
|
+add_executable(graphchk64 graphchk.c io.c)
|
||||||
|
+add_executable(cmpfillin64 cmpfillin.c io.c smbfactor.c)
|
||||||
|
+foreach(prog gpmetis64 ndmetis64 mpmetis64 m2gmetis64 graphchk64 cmpfillin64)
|
||||||
|
+ target_link_libraries(${prog} metis64)
|
||||||
|
# target_link_libraries(${prog} metis profiler)
|
||||||
|
endforeach(prog)
|
||||||
|
|
||||||
|
if(METIS_INSTALL)
|
||||||
|
- install(TARGETS gpmetis ndmetis mpmetis m2gmetis graphchk cmpfillin
|
||||||
|
+ install(TARGETS gpmetis64 ndmetis64 mpmetis64 m2gmetis64 graphchk64 cmpfillin64
|
||||||
|
RUNTIME DESTINATION bin)
|
||||||
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user