Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/
Date: Mon, 22 Feb 2016 08:38:28
Message-Id: 1456130191.7a9027cbd4c3510b8e5010422505a70e1420b7a4.jlec@gentoo
1 commit: 7a9027cbd4c3510b8e5010422505a70e1420b7a4
2 Author: Grégory Salvan <apieum <AT> gmail <DOT> com>
3 AuthorDate: Sun Feb 21 23:58:20 2016 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 22 08:36:31 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=7a9027cb
7
8 fix parallelmetis for metis version 4
9
10 .../files/netgen-5.x-parallelmetis4-fix.patch | 36 ++++++++++++++++++++++
11 sci-mathematics/netgen/netgen-5.3.1.ebuild | 1 +
12 2 files changed, 37 insertions(+)
13
14 diff --git a/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch b/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch
15 new file mode 100644
16 index 0000000..0170fb8
17 --- /dev/null
18 +++ b/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch
19 @@ -0,0 +1,36 @@
20 +diff -uwrN -x.git netgen-5.3.1/libsrc/meshing/parallelmesh.cpp netgen/libsrc/meshing/parallelmesh.cpp
21 +--- netgen-5.3.1/libsrc/meshing/parallelmesh.cpp 2016-02-22 00:22:28.885598956 +0100
22 ++++ netgen/libsrc/meshing/parallelmesh.cpp 2016-02-22 00:46:17.030638283 +0100
23 +@@ -962,10 +962,15 @@
24 + }
25 +
26 +
27 +-#ifdef METIS5
28 ++#ifdef METIS
29 + void Mesh :: ParallelMetis (Array<int> & volume_weights , Array<int> & surface_weights, Array<int> & segment_weights)
30 + {
31 ++
32 ++ #ifdef METIS5
33 + PrintMessage (3, "call metis 5 with weights ...");
34 ++ #else
35 ++ PrintMessage (3, "call metis 4 with weights ...");
36 ++ #endif
37 +
38 + // cout << "segment_weights " << segment_weights << endl;
39 + // cout << "surface_weights " << surface_weights << endl;
40 +@@ -1034,9 +1039,15 @@
41 +
42 +
43 + metis::idx_t ncommon = 3;
44 ++ #ifdef METIS5
45 + METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &nwgt[0], NULL, &ncommon, &nparts,
46 + NULL, NULL,
47 + &edgecut, &epart[0], &npart[0]);
48 ++ #else
49 ++ int numflag = 0;
50 ++ METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &numflag, &nparts,
51 ++ &edgecut, &epart[0], &npart[0]);
52 ++ #endif
53 + /*
54 + METIS_PartMeshNodal (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &nparts,
55 + NULL, NULL,
56
57 diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild
58 index d39d45c..9aac92d 100644
59 --- a/sci-mathematics/netgen/netgen-5.3.1.ebuild
60 +++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild
61 @@ -44,6 +44,7 @@ src_prepare() {
62 # Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_fixes.patch
63 epatch "${FILESDIR}/${PN}-5.x-fedora-fixes.patch"
64 epatch "${FILESDIR}/${PN}-5.x-includes-fixes.patch"
65 + epatch "${FILESDIR}/${PN}-5.x-parallelmetis4-fix.patch"
66 if use mpi; then
67 export CC=mpicc
68 export CXX=mpic++