1 |
commit: 017a3b4500248d207227590d7728f66f4195db9a |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 29 00:00:15 2022 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 29 00:00:15 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=017a3b45 |
7 |
|
8 |
sci-libs/pastix: fix building against OpenMPI 4.1+ |
9 |
|
10 |
Closes: https://bugs.gentoo.org/692742 |
11 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
12 |
|
13 |
sci-libs/pastix/files/pastix-5.2.3-MPI-3.0.patch | 139 +++++++++++++++++++++++ |
14 |
sci-libs/pastix/pastix-5.2.3.ebuild | 5 +- |
15 |
2 files changed, 142 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/sci-libs/pastix/files/pastix-5.2.3-MPI-3.0.patch b/sci-libs/pastix/files/pastix-5.2.3-MPI-3.0.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..d86ec5b78416 |
20 |
--- /dev/null |
21 |
+++ b/sci-libs/pastix/files/pastix-5.2.3-MPI-3.0.patch |
22 |
@@ -0,0 +1,139 @@ |
23 |
+https://bugs.gentoo.org/692742 |
24 |
+rename MPI 1.0 to 3.0+ functions: |
25 |
+- MPI_Address -> MPI_Get_address |
26 |
+- MPI_Type_struct -> MPI_Type_create_struct |
27 |
+ |
28 |
+--- a/common/src/nompi.h |
29 |
++++ b/common/src/nompi.h |
30 |
+@@ -127,9 +127,9 @@ |
31 |
+ #define MPI_Start(request) |
32 |
+ #define MPI_Startall(count, array_of_requests) |
33 |
+ #define MPI_Type_contiguous(count, oldtype, newtype) |
34 |
+-#define MPI_Type_struct(count, array_of_blocklengths, array_of_displacement, \ |
35 |
++#define MPI_Type_create_struct(count, array_of_blocklengths, array_of_displacement, \ |
36 |
+ oldtype, newtype) |
37 |
+-#define MPI_Address(location, newtype) |
38 |
++#define MPI_Get_address(location, newtype) |
39 |
+ #define MPI_Type_commit(datatype) |
40 |
+ #define MPI_Type_free(datatype) |
41 |
+ #define MPI_Request_free(request) |
42 |
+--- a/sopalin/src/sopalin_sendrecv.c |
43 |
++++ b/sopalin/src/sopalin_sendrecv.c |
44 |
+@@ -1300,10 +1300,10 @@ |
45 |
+ thread_data->gtaboffs[packnbr] = FANIN_INFOTAB(t); |
46 |
+ thread_data->gtaboffs[packnbr+1] = FANIN_COEFTAB(t); |
47 |
+ #else /* NO_MPI_TYPE */ |
48 |
+- CALL_MPI MPI_Address(FANIN_INFOTAB(t),&(thread_data->gtaboffs[packnbr])); |
49 |
+- TEST_MPI("MPI_Address"); |
50 |
+- CALL_MPI MPI_Address(FANIN_COEFTAB(t),&(thread_data->gtaboffs[packnbr+1])); |
51 |
+- TEST_MPI("MPI_Address"); |
52 |
++ CALL_MPI MPI_Get_address(FANIN_INFOTAB(t),&(thread_data->gtaboffs[packnbr])); |
53 |
++ TEST_MPI("MPI_Get_address"); |
54 |
++ CALL_MPI MPI_Get_address(FANIN_COEFTAB(t),&(thread_data->gtaboffs[packnbr+1])); |
55 |
++ TEST_MPI("MPI_Get_address"); |
56 |
+ #endif /* NO_MPI_TYPE */ |
57 |
+ |
58 |
+ /* Add other contribution for the same task */ |
59 |
+@@ -1410,12 +1410,12 @@ |
60 |
+ thread_data->gtaboffs[packnbr] = FANIN_INFOTAB(t); |
61 |
+ thread_data->gtaboffs[packnbr+1] = FANIN_COEFTAB(t); |
62 |
+ #else /* NO_MPI_TYPE */ |
63 |
+- CALL_MPI MPI_Address(FANIN_INFOTAB(t), |
64 |
++ CALL_MPI MPI_Get_address(FANIN_INFOTAB(t), |
65 |
+ &(thread_data->gtaboffs[packnbr])); |
66 |
+- TEST_MPI("MPI_Address"); |
67 |
+- CALL_MPI MPI_Address(FANIN_COEFTAB(t), |
68 |
++ TEST_MPI("MPI_Get_address"); |
69 |
++ CALL_MPI MPI_Get_address(FANIN_COEFTAB(t), |
70 |
+ &(thread_data->gtaboffs[packnbr+1])); |
71 |
+- TEST_MPI("MPI_Address"); |
72 |
++ TEST_MPI("MPI_Get_address"); |
73 |
+ #endif /* NO_MPI_TYPE */ |
74 |
+ |
75 |
+ if (queueSize(sendqueue)) |
76 |
+@@ -1508,10 +1508,10 @@ |
77 |
+ TEST_MPI("MPI_Rsend"); |
78 |
+ # endif |
79 |
+ #else /* NO_MPI_TYPE */ |
80 |
+- CALL_MPI MPI_Type_struct(2*(packnbr/2+1), thread_data->gtabsize, |
81 |
++ CALL_MPI MPI_Type_create_struct(2*(packnbr/2+1), thread_data->gtabsize, |
82 |
+ thread_data->gtaboffs, |
83 |
+ thread_data->gtabtype, &newtype); |
84 |
+- TEST_MPI("MPI_Type_struct"); |
85 |
++ TEST_MPI("MPI_Type_create_struct"); |
86 |
+ CALL_MPI MPI_Type_commit(&newtype); |
87 |
+ TEST_MPI("MPI_Type_commit"); |
88 |
+ # ifdef TEST_ISEND |
89 |
+@@ -1602,15 +1602,15 @@ |
90 |
+ (long)me, (unsigned int)(intptr_t)BTAG_COEFTAB(t)); |
91 |
+ |
92 |
+ #ifndef NO_MPI_TYPE |
93 |
+- CALL_MPI MPI_Address(BTAG_BTAGTAB(t),&(taboffs[0])); |
94 |
+- TEST_MPI("MPI_Address"); |
95 |
+- CALL_MPI MPI_Address(BTAG_BCOFTAB(t),&(taboffs[1])); |
96 |
+- TEST_MPI("MPI_Address"); |
97 |
+- CALL_MPI MPI_Address((void *)BTAG_COEFTAB(t),&(taboffs[2])); |
98 |
+- TEST_MPI("MPI_Address"); |
99 |
++ CALL_MPI MPI_Get_address(BTAG_BTAGTAB(t),&(taboffs[0])); |
100 |
++ TEST_MPI("MPI_Get_address"); |
101 |
++ CALL_MPI MPI_Get_address(BTAG_BCOFTAB(t),&(taboffs[1])); |
102 |
++ TEST_MPI("MPI_Get_address"); |
103 |
++ CALL_MPI MPI_Get_address((void *)BTAG_COEFTAB(t),&(taboffs[2])); |
104 |
++ TEST_MPI("MPI_Get_address"); |
105 |
+ |
106 |
+- CALL_MPI MPI_Type_struct(3,tabsize,taboffs,tabtype,&newtype); |
107 |
+- TEST_MPI("MPI_Type_struct"); |
108 |
++ CALL_MPI MPI_Type_create_struct(3,tabsize,taboffs,tabtype,&newtype); |
109 |
++ TEST_MPI("MPI_Type_create_struct"); |
110 |
+ |
111 |
+ CALL_MPI MPI_Type_commit(&newtype); |
112 |
+ TEST_MPI("MPI_Type_commit"); |
113 |
+--- a/sopalin/src/updo_sendrecv.c |
114 |
++++ b/sopalin/src/updo_sendrecv.c |
115 |
+@@ -347,12 +347,12 @@ |
116 |
+ tabtype[0] = COMM_INT; |
117 |
+ tabtype[1] = COMM_FLOAT; |
118 |
+ |
119 |
+- CALL_MPI MPI_Address(infotab,&(taboffs[0])); |
120 |
+- TEST_MPI("MPI_Address"); |
121 |
+- CALL_MPI MPI_Address(FANIN_COEFTAB(SOLV_FTGTIND(j)),&(taboffs[1])); |
122 |
+- TEST_MPI("MPI_Address"); |
123 |
+- CALL_MPI MPI_Type_struct(2,tabsize,taboffs,tabtype,&newtype); |
124 |
+- TEST_MPI("MPI_Type_struct"); |
125 |
++ CALL_MPI MPI_Get_address(infotab,&(taboffs[0])); |
126 |
++ TEST_MPI("MPI_Get_address"); |
127 |
++ CALL_MPI MPI_Get_address(FANIN_COEFTAB(SOLV_FTGTIND(j)),&(taboffs[1])); |
128 |
++ TEST_MPI("MPI_Get_address"); |
129 |
++ CALL_MPI MPI_Type_create_struct(2,tabsize,taboffs,tabtype,&newtype); |
130 |
++ TEST_MPI("MPI_Type_create_struct"); |
131 |
+ CALL_MPI MPI_Type_commit(&newtype); |
132 |
+ TEST_MPI("MPI_Type_commit"); |
133 |
+ # endif /* NO_MPI_TYPE */ |
134 |
+@@ -974,8 +974,8 @@ |
135 |
+ |
136 |
+ tabtype[0] = COMM_INT; |
137 |
+ |
138 |
+- CALL_MPI MPI_Address(infotab,&(taboffs[0])); |
139 |
+- TEST_MPI("MPI_Address"); |
140 |
++ CALL_MPI MPI_Get_address(infotab,&(taboffs[0])); |
141 |
++ TEST_MPI("MPI_Get_address"); |
142 |
+ |
143 |
+ /* If schur, send empty data */ |
144 |
+ if ((sopalin_data->sopar->iparm[IPARM_SCHUR] == API_YES && |
145 |
+@@ -988,12 +988,12 @@ |
146 |
+ for (iter=1; iter<UPDOWN_SM2XNBR+1; iter++) { |
147 |
+ tabsize[iter] = size; |
148 |
+ tabtype[iter] = COMM_FLOAT; |
149 |
+- CALL_MPI MPI_Address(gb+((iter-1)*UPDOWN_SM2XSZE),&(taboffs[iter])); |
150 |
+- TEST_MPI("MPI_Address"); |
151 |
++ CALL_MPI MPI_Get_address(gb+((iter-1)*UPDOWN_SM2XSZE),&(taboffs[iter])); |
152 |
++ TEST_MPI("MPI_Get_address"); |
153 |
+ } |
154 |
+ } |
155 |
+- CALL_MPI MPI_Type_struct(UPDOWN_SM2XNBR+1,tabsize,taboffs,tabtype,&newtype); |
156 |
+- TEST_MPI("MPI_Type_struct"); |
157 |
++ CALL_MPI MPI_Type_create_struct(UPDOWN_SM2XNBR+1,tabsize,taboffs,tabtype,&newtype); |
158 |
++ TEST_MPI("MPI_Type_create_struct"); |
159 |
+ CALL_MPI MPI_Type_commit(&newtype); |
160 |
+ TEST_MPI("MPI_Type_commit"); |
161 |
+ |
162 |
|
163 |
diff --git a/sci-libs/pastix/pastix-5.2.3.ebuild b/sci-libs/pastix/pastix-5.2.3.ebuild |
164 |
index 2b9322818a96..3d6c4757eed5 100644 |
165 |
--- a/sci-libs/pastix/pastix-5.2.3.ebuild |
166 |
+++ b/sci-libs/pastix/pastix-5.2.3.ebuild |
167 |
@@ -1,4 +1,4 @@ |
168 |
-# Copyright 1999-2021 Gentoo Authors |
169 |
+# Copyright 1999-2022 Gentoo Authors |
170 |
# Distributed under the terms of the GNU General Public License v2 |
171 |
|
172 |
EAPI=7 |
173 |
@@ -18,6 +18,7 @@ PID=218 |
174 |
DESCRIPTION="Parallel solver for very large sparse linear systems" |
175 |
HOMEPAGE="https://pastix.gforge.inria.fr" |
176 |
SRC_URI="https://gforge.inria.fr/frs/download.php/latestfile/${PID}/${PN}_${PV}.tar.bz2" |
177 |
+S="${WORKDIR}/${PN}_${PV}/src" |
178 |
|
179 |
LICENSE="CeCILL-C" |
180 |
SLOT="0" |
181 |
@@ -33,7 +34,7 @@ RDEPEND=" |
182 |
DEPEND="${RDEPEND}" |
183 |
BDEPEND="virtual/pkgconfig" |
184 |
|
185 |
-S="${WORKDIR}/${PN}_${PV}/src" |
186 |
+PATCHES=( "${FILESDIR}"/${P}-MPI-3.0.patch ) |
187 |
|
188 |
src_prepare() { |
189 |
default |