1 |
commit: ff32a770a509011f0f527f2972e7f4825d3f6281 |
2 |
Author: Grégory Salvan <apieum <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Feb 20 21:18:33 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=ff32a770 |
7 |
|
8 |
added fedora metis patch |
9 |
|
10 |
.../netgen/files/netgen-5.x-fedora-metis.patch | 93 ++++++++++++++++++++++ |
11 |
sci-mathematics/netgen/netgen-5.3.1.ebuild | 2 + |
12 |
2 files changed, 95 insertions(+) |
13 |
|
14 |
diff --git a/sci-mathematics/netgen/files/netgen-5.x-fedora-metis.patch b/sci-mathematics/netgen/files/netgen-5.x-fedora-metis.patch |
15 |
new file mode 100644 |
16 |
index 0000000..68b3396 |
17 |
--- /dev/null |
18 |
+++ b/sci-mathematics/netgen/files/netgen-5.x-fedora-metis.patch |
19 |
@@ -0,0 +1,93 @@ |
20 |
+--- ./netgen-5.3.1/libsrc/meshing/parallelmesh.cpp 2016-02-20 21:55:59.227450843 +0100 |
21 |
++++ ./netgen/libsrc/meshing/parallelmesh.cpp 2016-02-20 21:46:32.331435233 +0100 |
22 |
+@@ -14,7 +14,7 @@ |
23 |
+ |
24 |
+ #if METIS_VER_MAJOR >= 5 |
25 |
+ #define METIS5 |
26 |
+- typedef idx_t idxtype; |
27 |
++ typedef metis::idx_t idxtype; |
28 |
+ #else |
29 |
+ #define METIS4 |
30 |
+ typedef idxtype idx_t; |
31 |
+@@ -794,10 +794,10 @@ |
32 |
+ eptr.Append (eind.Size()); |
33 |
+ Array<idx_t> epart(ne), npart(nn); |
34 |
+ |
35 |
+- int nparts = ntasks-1; |
36 |
+- int edgecut; |
37 |
++ metis::idx_t nparts = ntasks-1; |
38 |
++ metis::idx_t edgecut; |
39 |
+ |
40 |
+- int ncommon = 3; |
41 |
++ metis::idx_t ncommon = 3; |
42 |
+ METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &ncommon, &nparts, |
43 |
+ NULL, NULL, |
44 |
+ &edgecut, &epart[0], &npart[0]); |
45 |
+@@ -1029,11 +1029,11 @@ |
46 |
+ eptr.Append (eind.Size()); |
47 |
+ Array<idx_t> epart(ne), npart(nn); |
48 |
+ |
49 |
+- int nparts = ntasks-1; |
50 |
+- int edgecut; |
51 |
++ metis::idx_t nparts = ntasks-1; |
52 |
++ metis::idx_t edgecut; |
53 |
+ |
54 |
+ |
55 |
+- int ncommon = 3; |
56 |
++ metis::idx_t ncommon = 3; |
57 |
+ METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &nwgt[0], NULL, &ncommon, &nparts, |
58 |
+ NULL, NULL, |
59 |
+ &edgecut, &epart[0], &npart[0]); |
60 |
+@@ -1266,7 +1266,7 @@ |
61 |
+ |
62 |
+ for ( int vert = 0; vert < nn; vert++ ) |
63 |
+ { |
64 |
+- FlatArray<int> array ( cnt[vert], &adjacency[ xadj[vert] ] ); |
65 |
++ FlatArray<metis::idx_t> array ( cnt[vert], &adjacency[ xadj[vert] ] ); |
66 |
+ BubbleSort(array); |
67 |
+ } |
68 |
+ |
69 |
+@@ -1377,7 +1377,7 @@ |
70 |
+ |
71 |
+ for ( int el = 0; el < ne; el++ ) |
72 |
+ { |
73 |
+- FlatArray<int> array ( cnt[el], &adjacency[ xadj[el] ] ); |
74 |
++ FlatArray<metis::idx_t> array ( cnt[el], &adjacency[ xadj[el] ] ); |
75 |
+ BubbleSort(array); |
76 |
+ } |
77 |
+ |
78 |
+@@ -1428,8 +1428,8 @@ |
79 |
+ void Mesh :: PartDualHybridMesh2D ( ) |
80 |
+ { |
81 |
+ #ifdef METIS |
82 |
+- int ne = GetNSE(); |
83 |
+- int nv = GetNV(); |
84 |
++ metis::idx_t ne = GetNSE(); |
85 |
++ metis::idx_t nv = GetNV(); |
86 |
+ |
87 |
+ Array<idxtype> xadj(ne+1); |
88 |
+ Array<idxtype> adjacency(ne*4); |
89 |
+@@ -1484,18 +1484,18 @@ |
90 |
+ |
91 |
+ idxtype *v_weights = NULL, *e_weights = NULL; |
92 |
+ |
93 |
+- int weightflag = 0; |
94 |
+- int numflag = 0; |
95 |
+- int nparts = ntasks - 1; |
96 |
++ metis::idx_t weightflag = 0; |
97 |
++ metis::idx_t numflag = 0; |
98 |
++ metis::idx_t nparts = ntasks - 1; |
99 |
+ |
100 |
+- int edgecut; |
101 |
++ metis::idx_t edgecut; |
102 |
+ Array<idxtype> part(ne); |
103 |
+ |
104 |
+ for ( int el = 0; el < ne; el++ ) |
105 |
+ BubbleSort (adjacency.Range (xadj[el], xadj[el+1])); |
106 |
+ |
107 |
+ #ifdef METIS4 |
108 |
+- int options[5]; |
109 |
++ metis::idx_t options[5]; |
110 |
+ options[0] = 0; |
111 |
+ METIS_PartGraphKway ( &ne, &xadj[0], &adjacency[0], v_weights, e_weights, &weightflag, |
112 |
+ &numflag, &nparts, options, &edgecut, &part[0] ); |
113 |
|
114 |
diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild |
115 |
index 9a1f35c..cf09c82 100644 |
116 |
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild |
117 |
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild |
118 |
@@ -36,6 +36,8 @@ src_prepare() { |
119 |
# Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824 |
120 |
epatch "${FILESDIR}/${PN}-5.x-missing-define.patch" |
121 |
epatch "${FILESDIR}/${PN}-5.x-metis-numflag.patch" |
122 |
+ # Taken from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_metis.patch |
123 |
+ epatch "${FILESDIR}/${PN}-5.x-fedora-metis.patch" |
124 |
epatch "${FILESDIR}/${PN}-5.x-occ-stl-api-change.patch" |
125 |
if use mpi; then |
126 |
export CC=mpicc |