commit: 7a9027cbd4c3510b8e5010422505a70e1420b7a4 Author: Grégory Salvan <apieum <AT> gmail <DOT> com> AuthorDate: Sun Feb 21 23:58:20 2016 +0000 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> CommitDate: Mon Feb 22 08:36:31 2016 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=7a9027cb
fix parallelmetis for metis version 4 .../files/netgen-5.x-parallelmetis4-fix.patch | 36 ++++++++++++++++++++++ sci-mathematics/netgen/netgen-5.3.1.ebuild | 1 + 2 files changed, 37 insertions(+) diff --git a/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch b/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch new file mode 100644 index 0000000..0170fb8 --- /dev/null +++ b/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch @@ -0,0 +1,36 @@ +diff -uwrN -x.git netgen-5.3.1/libsrc/meshing/parallelmesh.cpp netgen/libsrc/meshing/parallelmesh.cpp +--- netgen-5.3.1/libsrc/meshing/parallelmesh.cpp 2016-02-22 00:22:28.885598956 +0100 ++++ netgen/libsrc/meshing/parallelmesh.cpp 2016-02-22 00:46:17.030638283 +0100 +@@ -962,10 +962,15 @@ + } + + +-#ifdef METIS5 ++#ifdef METIS + void Mesh :: ParallelMetis (Array<int> & volume_weights , Array<int> & surface_weights, Array<int> & segment_weights) + { ++ ++ #ifdef METIS5 + PrintMessage (3, "call metis 5 with weights ..."); ++ #else ++ PrintMessage (3, "call metis 4 with weights ..."); ++ #endif + + // cout << "segment_weights " << segment_weights << endl; + // cout << "surface_weights " << surface_weights << endl; +@@ -1034,9 +1039,15 @@ + + + metis::idx_t ncommon = 3; ++ #ifdef METIS5 + METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &nwgt[0], NULL, &ncommon, &nparts, + NULL, NULL, + &edgecut, &epart[0], &npart[0]); ++ #else ++ int numflag = 0; ++ METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &numflag, &nparts, ++ &edgecut, &epart[0], &npart[0]); ++ #endif + /* + METIS_PartMeshNodal (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &nparts, + NULL, NULL, diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild index d39d45c..9aac92d 100644 --- a/sci-mathematics/netgen/netgen-5.3.1.ebuild +++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild @@ -44,6 +44,7 @@ src_prepare() { # Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_fixes.patch epatch "${FILESDIR}/${PN}-5.x-fedora-fixes.patch" epatch "${FILESDIR}/${PN}-5.x-includes-fixes.patch" + epatch "${FILESDIR}/${PN}-5.x-parallelmetis4-fix.patch" if use mpi; then export CC=mpicc export CXX=mpic++