SHA256
1
0
forked from pool/metis

osc copypac from project:home:Dmitry_R:WIP package:metis revision:5

OBS-URL: https://build.opensuse.org/package/show/science/metis?expand=0&rev=1
This commit is contained in:
Dmitry Roshchin 2014-06-21 18:38:40 +00:00 committed by Git OBS Bridge
commit fef9a83ec4
7 changed files with 353 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

BIN
metis-5.1.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

83
metis-cmake.patch Normal file
View File

@ -0,0 +1,83 @@
Index: metis-5.1.0/CMakeLists.txt
===================================================================
--- metis-5.1.0.orig/CMakeLists.txt
+++ metis-5.1.0/CMakeLists.txt
@@ -1,8 +1,9 @@
cmake_minimum_required(VERSION 2.8)
project(METIS)
-set(GKLIB_PATH "GKlib" CACHE PATH "path to GKlib")
+set(GKLIB_PATH "${CMAKE_SOURCE_DIR}/GKlib" CACHE PATH "path to GKlib")
set(SHARED FALSE CACHE BOOL "build a shared library")
+INCLUDE(GNUInstallDirs)
if(MSVC)
set(METIS_INSTALL FALSE)
@@ -11,11 +12,11 @@ else()
endif()
# Configure libmetis library.
-if(SHARED)
- set(METIS_LIBRARY_TYPE SHARED)
-else()
- set(METIS_LIBRARY_TYPE STATIC)
-endif(SHARED)
+set(METIS_LIBRARY_TYPE SHARED)
+
+set(METIS_MAJOR_VERSION 5)
+set(METIS_MINOR_VERSION 1)
+set(METIS_PATCH_VERSION 0)
include(${GKLIB_PATH}/GKlibSystem.cmake)
# Add include directories.
Index: metis-5.1.0/libmetis/CMakeLists.txt
===================================================================
--- metis-5.1.0.orig/libmetis/CMakeLists.txt
+++ metis-5.1.0/libmetis/CMakeLists.txt
@@ -4,13 +4,16 @@ include_directories(.)
file(GLOB metis_sources *.c)
# Build libmetis.
add_library(metis ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources})
+SET_TARGET_PROPERTIES(metis PROPERTIES
+ VERSION ${METIS_MAJOR_VERSION}.${METIS_MINOR_VERSION}.${METIS_PATCH_VERSION}
+ SOVERSION ${METIS_MAJOR_VERSION})
if(UNIX)
target_link_libraries(metis m)
endif()
if(METIS_INSTALL)
install(TARGETS metis
- LIBRARY DESTINATION lib
- RUNTIME DESTINATION lib
- ARCHIVE DESTINATION lib)
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
Index: metis-5.1.0/programs/CMakeLists.txt
===================================================================
--- metis-5.1.0.orig/programs/CMakeLists.txt
+++ metis-5.1.0/programs/CMakeLists.txt
@@ -15,7 +15,7 @@ endforeach(prog)
if(METIS_INSTALL)
install(TARGETS gpmetis ndmetis mpmetis m2gmetis graphchk cmpfillin
- RUNTIME DESTINATION bin)
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
# Try to find subversion revision.
Index: metis-5.1.0/GKlib/CMakeLists.txt
===================================================================
--- metis-5.1.0.orig/GKlib/CMakeLists.txt
+++ metis-5.1.0/GKlib/CMakeLists.txt
@@ -8,6 +8,9 @@ include(GKlibSystem.cmake)
include_directories(".")
add_library(GKlib STATIC ${GKlib_sources})
+SET_TARGET_PROPERTIES(GKlib PROPERTIES
+ VERSION ${METIS_MAJOR_VERSION}.${METIS_MINOR_VERSION}.${METIS_PATCH_VERSION}
+ SOVERSION ${METIS_MAJOR_VERSION})
if(UNIX)
target_link_libraries(GKlib m)
endif(UNIX)

View File

@ -0,0 +1,60 @@
Index: metis-5.1.0/programs/gpmetis.c
===================================================================
--- metis-5.1.0.orig/programs/gpmetis.c
+++ metis-5.1.0/programs/gpmetis.c
@@ -154,7 +154,6 @@ void GPPrintInfo(params_t *params, graph
printf("******************************************************************************\n");
printf("%s", METISTITLE);
- printf(" (HEAD: %s, Built on: %s, %s)\n", SVNINFO, __DATE__, __TIME__);
printf(" size of idx_t: %zubits, real_t: %zubits, idx_t *: %zubits\n",
8*sizeof(idx_t), 8*sizeof(real_t), 8*sizeof(idx_t *));
printf("\n");
Index: metis-5.1.0/programs/graphchk.c
===================================================================
--- metis-5.1.0.orig/programs/graphchk.c
+++ metis-5.1.0/programs/graphchk.c
@@ -42,7 +42,6 @@ int main(int argc, char *argv[])
printf("**********************************************************************\n");
printf("%s", METISTITLE);
- printf(" (HEAD: %s, Built on: %s, %s)\n", SVNINFO, __DATE__, __TIME__);
printf(" size of idx_t: %zubits, real_t: %zubits, idx_t *: %zubits\n",
8*sizeof(idx_t), 8*sizeof(real_t), 8*sizeof(idx_t *));
printf("\n");
Index: metis-5.1.0/programs/m2gmetis.c
===================================================================
--- metis-5.1.0.orig/programs/m2gmetis.c
+++ metis-5.1.0/programs/m2gmetis.c
@@ -100,7 +100,6 @@ void M2GPrintInfo(params_t *params, mesh
{
printf("******************************************************************************\n");
printf("%s", METISTITLE);
- printf(" (HEAD: %s, Built on: %s, %s)\n", SVNINFO, __DATE__, __TIME__);
printf(" size of idx_t: %zubits, real_t: %zubits, idx_t *: %zubits\n",
8*sizeof(idx_t), 8*sizeof(real_t), 8*sizeof(idx_t *));
printf("\n");
Index: metis-5.1.0/programs/mpmetis.c
===================================================================
--- metis-5.1.0.orig/programs/mpmetis.c
+++ metis-5.1.0/programs/mpmetis.c
@@ -120,7 +120,6 @@ void MPPrintInfo(params_t *params, mesh_
printf("******************************************************************************\n");
printf("%s", METISTITLE);
- printf(" (HEAD: %s, Built on: %s, %s)\n", SVNINFO, __DATE__, __TIME__);
printf(" size of idx_t: %zubits, real_t: %zubits, idx_t *: %zubits\n",
8*sizeof(idx_t), 8*sizeof(real_t), 8*sizeof(idx_t *));
printf("\n");
Index: metis-5.1.0/programs/ndmetis.c
===================================================================
--- metis-5.1.0.orig/programs/ndmetis.c
+++ metis-5.1.0/programs/ndmetis.c
@@ -113,7 +113,6 @@ void NDPrintInfo(params_t *params, graph
{
printf("******************************************************************************\n");
printf("%s", METISTITLE);
- printf(" (HEAD: %s, Built on: %s, %s)\n", SVNINFO, __DATE__, __TIME__);
printf(" size of idx_t: %zubits, real_t: %zubits, idx_t *: %zubits\n",
8*sizeof(idx_t), 8*sizeof(real_t), 8*sizeof(idx_t *));
printf("\n");

55
metis.changes Normal file
View File

@ -0,0 +1,55 @@
-------------------------------------------------------------------
Fri Jun 20 08:38:47 UTC 2014 - dmitry_r@opensuse.org
- Update to version 5.1.0, changes sinse version 4.0
* strtoidx() addition for portable input file parsing
* Fixed some bad memory allocation calls
* Incorporated GKlib into METIS, which replaced many of its
internal functions.
* A nearly complete re-write of Metis' code-based that changed
expanded the functionality of the command-line programs and
API routines
* Multi-constraint partitioning can be used in conjunction with
minimization of the total communication volume.
* All graph and mesh partitioning routines take as input the
target sizes of the partitions, which among others, allow them
to compute partitioning solutions that are well-suited for
parallel architectures with heterogeneous computing capabilities.
* When multi-constraint partitioning is used, the target sizes of
the partitions are specified on a per partition-constraint pair.
* The multilevel k-way partitioning algorithms can compute a
partitioning solution in which each partition is contiguous.
* All partitioning and ordering routines can compute multiple
different solutions and select the best as the final solution.
* The mesh partitioning and mesh-to-graph conversion routines can
operate on mixed element meshes.
* The command-line programs provide full access to the entire
set of capabilities provided by Metis' API.
* Re-written the memory management subsystem to reduce overall
memory requirements.
* Added back Fortran support in the form of alternate API names
(see libmetis/frename.h).
* Changed the license to Apache Version 2
- Move metis shared library to separate package
- Enable build tests
- Use propper build parameters
* metis-cmake.patch
- Delete compilation time from metis programs to avoid unnecessary
package republishing
* metis-programs-no-compilation-time.patch
-------------------------------------------------------------------
Fri Aug 17 21:11:13 UTC 2012 - scorot@free.fr
- Buildreqs libtool for 12.2 an higher
- spec file reformating
-------------------------------------------------------------------
Sat Mar 17 15:22:23 UTC 2012 - scorot@free.fr
- remove %%debug_package macro which broke build on 11.3
-------------------------------------------------------------------
Sun Nov 8 22:41:52 UTC 2009 - andrea@opensuse.org
- new package

128
metis.spec Normal file
View File

@ -0,0 +1,128 @@
#
# spec file for package metis
#
# Copyright (c) 2014 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/
#
Name: metis
Version: 5.1.0
%define somajor 5
Release: 0
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering
License: Apache-2.0
Group: Productivity/Scientific/Math
Url: http://glaros.dtc.umn.edu/gkhome/metis/metis/overview
Source0: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE metis-cmake.patch
Patch1: metis-cmake.patch
# PATCH-FIX-OPENSUSE metis-programs-no-compilation-time.patch -- Fix W: file-contains-date-and-time
Patch2: metis-programs-no-compilation-time.patch
BuildRequires: cmake >= 2.8
BuildRequires: gcc
BuildRequires: gcc-c++
Recommends: %{name}-doc = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
METIS is a family of programs for partitioning unstructured graphs and hypergraph
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
shown to produce high quality results and scale to very large problems.
%package -n libmetis%{somajor}
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering library
Group: System/Libraries
%description -n libmetis%{somajor}
METIS library provides to partitioning unstructured graphs and hypergraph
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
shown to produce high quality results and scale to very large problems.
%package devel
Summary: Metis development files
Group: Development/Libraries/C and C++
Requires: libmetis%{somajor} = %{version}
%description devel
METIS library provides to partitioning unstructured graphs and hypergraph
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
shown to produce high quality results and scale to very large problems.
This package provides development files.
%package doc
Summary: Metis documentation
Group: Documentation/Other
BuildArch: noarch
%description doc
METIS is a family of programs for partitioning unstructured graphs and hypergraph
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
shown to produce high quality results and scale to very large problems.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
# 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
%build
%cmake \
-DCMAKE_C_FLAGS="%{optflags} -fopenmp -pthread" \
-DCMAKE_CXX_FLAGS="%{optflags} -fopenmp -pthread" \
..
make %{?_smp_mflags}
%install
%cmake_install
%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 -n libmetis%{somajor} -p /sbin/ldconfig
%postun -n libmetis%{somajor} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc Changelog LICENSE.txt
%{_bindir}/*
%files -n libmetis%{somajor}
%defattr(-,root,root)
%{_libdir}/libmetis.so.%{somajor}*
%files devel
%defattr(-,root,root)
%{_includedir}/%{name}.h
%{_libdir}/libmetis.so
%files doc
%defattr(-,root,root)
%doc manual/manual.pdf
%changelog