Skip to content

Commit 27df1e0

Browse files
authored
Merge pull request #6409 from raffenet/4.1.x-fixes
4.1.x fixes Approved-by: Hui Zhou <hzhou321@anl.gov> Approved-by: Yanfei Guo <yguo@anl.gov>
2 parents c6824d7 + 0458fab commit 27df1e0

25 files changed

Lines changed: 295 additions & 149 deletions

CHANGES

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
===============================================================================
2+
Changes in 4.1.1
3+
===============================================================================
4+
5+
# Update embedded UCX module to 1.13.1. Fixes a build issue with
6+
binutils >= 2.39.
7+
8+
# Update yaksa module. Support explicit NVCC setting by the user. Fixes
9+
a build issue when there is no libtool available in PATH.
10+
11+
# Fix ch4:ucx initialization when configured with
12+
--enable-ch4-vci-method=implicit.
13+
14+
# Fix potential error handler leak during MPI_SESSION_FINALIZE
15+
16+
# Fix value of MPI_UNDEFINED in mpif.h binding
17+
18+
# Fix MPI_IALLTOALLW with MPI_IN_PLACE
19+
20+
# Fix send attribute handling in IPC path
21+
22+
# Fix a bug in persistent MPI_ALLGATHER
23+
24+
# Fix tests for use with non-MPICH libraries
25+
26+
# Add missing MPI_T_ERR_NOT_ACCESSIBLE error code
27+
28+
# Fix manpages for MPIX functions
29+
130
===============================================================================
231
Changes in 4.1
332
===============================================================================

maint/local_python/binding_c.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,8 @@ def dump_romio_reference(name):
8181
dump_function_internal(func, kind="normal")
8282
G.out.append("")
8383

84-
# NOTE: dump_manpage is now called inside dump_qmpi_wrappers
85-
8684
# Create the MPI and QMPI wrapper functions that will call the above, "real" version of the
87-
# function in the MPII prefix
85+
# function in the internal prefix
8886
dump_qmpi_wrappers(func, func['_is_large'])
8987

9088
def get_func_file_path(func, root_dir):
@@ -868,6 +866,9 @@ def dump_description(s):
868866
if l > 0:
869867
out.append(' ' + ' '.join(words[i0:]))
870868
# ----
869+
if not func['desc']:
870+
# place holder to make the man page render
871+
func['desc'] = "[short description]"
871872
out.append("/*D")
872873
out.append(" %s - %s" % (get_function_name(func, False), func['desc']))
873874
out.append("")

maint/local_python/binding_f77.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,11 @@ def dump_index_out(v):
438438
c_arg_list_B.append("&%s_i" % v)
439439
code_list_common.append("int %s_i;" % v)
440440
end_list_common.append("if (*ierr == MPI_SUCCESS) {")
441-
end_list_common.append(" *%s = %s_i + 1;" % (v, v))
441+
end_list_common.append(" if (%s_i == MPI_UNDEFINED) {" % v)
442+
end_list_common.append(" *%s = %s_i;" % (v, v))
443+
end_list_common.append(" } else {")
444+
end_list_common.append(" *%s = %s_i + 1;" % (v, v))
445+
end_list_common.append(" }")
442446
end_list_common.append("}")
443447

444448
def dump_string_len_inout(v):

maint/version.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# changing this by playing with diversions, but then we would probably be
1515
# playing with autotools-fire.
1616

17-
m4_define([MPICH_VERSION_m4],[4.1])dnl
17+
m4_define([MPICH_VERSION_m4],[4.1.1])dnl
1818
m4_define([MPICH_RELEASE_DATE_m4],[unreleased development copy])dnl
1919

2020
# For libtool ABI versioning rules see:
@@ -36,7 +36,7 @@ m4_define([MPICH_RELEASE_DATE_m4],[unreleased development copy])dnl
3636
# standard, and does not include MPIX_ functions and C++ bindings.
3737

3838
# Use [0:0:0] for unstable (e.g. alpha and beta) releases.
39-
# last version: 4.1 - 14:4:2
39+
# last version: 4.1.1 - 15:0:3
4040

4141
m4_define([libmpi_so_version_m4],[0:0:0])dnl
4242

src/binding/c/stream_api.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,48 @@
11
# vim: set ft=c:
22

33
MPIX_Stream_create:
4+
.desc: Create a new stream object
45
info: INFO, [info argument]
56
stream: STREAM, direction=out, [stream object created]
67

78
MPIX_Stream_free:
9+
.desc: Free a stream object
810
stream: STREAM, direction=inout, [stream object]
911

1012
MPIX_Stream_comm_create:
13+
.desc: Create a new communicator with local stream attached
1114
comm: COMMUNICATOR, [communicator]
1215
stream: STREAM, [stream object]
1316
newcomm: COMMUNICATOR, direction=out, [new stream-associated communicator]
1417

1518
MPIX_Stream_comm_create_multiplex:
19+
.desc: Create a new communicator with multiple local streams attached
1620
comm: COMMUNICATOR, [communicator]
1721
count: ARRAY_LENGTH_NNI, [list length]
1822
array_of_streams: STREAM, length=count, [stream object array]
1923
newcomm: COMMUNICATOR, direction=out, [new stream-associated communicator]
2024

2125
MPIX_Comm_get_stream:
26+
.desc: Get the stream object that is attached to the communicator
2227
comm: COMMUNICATOR, [communicator]
2328
idx: INDEX
2429
stream: STREAM, direction=out, [stream object]
2530

2631
MPIX_Stream_progress:
2732
stream: STREAM, [stream object]
33+
.desc: Invoke progress on the given stream
2834
.impl: mpid
2935

3036
MPIX_Start_progress_thread:
37+
.desc: Start a progress thread that will poll progress on the given stream
3138
stream: STREAM, [stream object]
3239

3340
MPIX_Stop_progress_thread:
41+
.desc: Stop the progress thread that polls progress on the given stream
3442
stream: STREAM, [stream object]
3543

3644
MPIX_Stream_send:
45+
.desc: Send message from a specific local stream to a specific destination stream
3746
buf: BUFFER, constant=True, [initial address of send buffer]
3847
count: POLYXFER_NUM_ELEM_NNI, [number of elements in send buffer]
3948
datatype: DATATYPE, [datatype of each send buffer element]
@@ -67,6 +76,7 @@ MPIX_Stream_send:
6776
}
6877

6978
MPIX_Stream_isend:
79+
.desc: Start a nonblocking send from a specific local stream to a specific remote stream
7080
buf: BUFFER, asynchronous=True, constant=True, [initial address of send buffer]
7181
count: POLYXFER_NUM_ELEM_NNI, [number of elements in send buffer]
7282
datatype: DATATYPE, [datatype of each send buffer element]
@@ -98,6 +108,7 @@ MPIX_Stream_isend:
98108
}
99109

100110
MPIX_Stream_recv:
111+
.desc: Receive a message from a specific source stream to a specific local stream
101112
buf: BUFFER, direction=out, [initial address of receive buffer]
102113
count: POLYXFER_NUM_ELEM_NNI, [number of elements in receive buffer]
103114
datatype: DATATYPE, [datatype of each receive buffer element]
@@ -134,6 +145,7 @@ MPIX_Stream_recv:
134145
}
135146

136147
MPIX_Stream_irecv:
148+
.desc: Start a nonblocking receive from a specific source stream to a specific local stream
137149
buf: BUFFER, direction=out, asynchronous=True, suppress=f08_intent, [initial address of receive buffer]
138150
count: POLYXFER_NUM_ELEM_NNI, [number of elements in receive buffer]
139151
datatype: DATATYPE, [datatype of each receive buffer element]
@@ -159,6 +171,7 @@ MPIX_Stream_irecv:
159171
}
160172

161173
MPIX_Send_enqueue:
174+
.desc: Enqueue a send operation to a GPU stream that is associated with the local stream
162175
buf: BUFFER, constant=True, [initial address of send buffer]
163176
count: POLYXFER_NUM_ELEM_NNI, [number of elements in send buffer]
164177
datatype: DATATYPE, [datatype of each send buffer element]
@@ -169,6 +182,7 @@ MPIX_Send_enqueue:
169182
.decl: MPIR_Send_enqueue_impl
170183

171184
MPIX_Recv_enqueue:
185+
.desc: Enqueue a receive operation to a GPU stream that is associated with the local stream
172186
buf: BUFFER, direction=out, [initial address of receive buffer]
173187
count: POLYXFER_NUM_ELEM_NNI, [number of elements in receive buffer]
174188
datatype: DATATYPE, [datatype of each receive buffer element]
@@ -180,6 +194,7 @@ MPIX_Recv_enqueue:
180194
.decl: MPIR_Recv_enqueue_impl
181195

182196
MPIX_Isend_enqueue:
197+
.desc: Enqueue a nonblocking send operation to a GPU stream that is associated with the local stream
183198
buf: BUFFER, constant=True, [initial address of send buffer]
184199
count: POLYXFER_NUM_ELEM_NNI, [number of elements in send buffer]
185200
datatype: DATATYPE, [datatype of each send buffer element]
@@ -191,6 +206,7 @@ MPIX_Isend_enqueue:
191206
.decl: MPIR_Isend_enqueue_impl
192207

193208
MPIX_Irecv_enqueue:
209+
.desc: Enqueue a nonblocking receive operation to a GPU stream that is associated with the local stream
194210
buf: BUFFER, direction=out, [initial address of receive buffer]
195211
count: POLYXFER_NUM_ELEM_NNI, [number of elements in receive buffer]
196212
datatype: DATATYPE, [datatype of each receive buffer element]
@@ -202,12 +218,14 @@ MPIX_Irecv_enqueue:
202218
.decl: MPIR_Irecv_enqueue_impl
203219

204220
MPIX_Wait_enqueue:
221+
.desc: Enqueue a wait operation to a GPU stream that is associated with the local stream
205222
request: REQUEST, direction=inout, [request]
206223
status: STATUS, direction=out
207224
.impl: mpid
208225
.decl: MPIR_Wait_enqueue_impl
209226

210227
MPIX_Waitall_enqueue:
228+
.desc: Enqueue a waitall operation to a GPU stream that is associated with the local stream
211229
count: ARRAY_LENGTH_NNI, [lists length]
212230
array_of_requests: REQUEST, direction=inout, length=count, [array of requests]
213231
array_of_statuses: STATUS, direction=out, length=*, pointer=False, [array of status objects]
@@ -220,6 +238,7 @@ MPIX_Waitall_enqueue:
220238
}
221239

222240
MPIX_Allreduce_enqueue:
241+
.desc: Enqueue an allreduce operation to a GPU stream that is associated with the local stream
223242
sendbuf: BUFFER, constant=True, [starting address of send buffer]
224243
recvbuf: BUFFER, direction=out, [starting address of receive buffer]
225244
count: POLYXFER_NUM_ELEM_NNI, [number of elements in send buffer]

src/include/mpi.h.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,10 +920,11 @@ typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *);
920920
#define MPI_ERR_VALUE_TOO_LARGE 77 /* Value is too large to store */
921921

922922
#define MPI_T_ERR_NOT_SUPPORTED 78 /* Requested functionality not supported */
923+
#define MPI_T_ERR_NOT_ACCESSIBLE 79 /* Requested functionality not accessible */
923924

924925
#define MPI_ERR_LASTCODE 0x3fffffff /* Last valid error code for a
925926
predefined error class */
926-
#define MPICH_ERR_LAST_CLASS 78 /* It is also helpful to know the
927+
#define MPICH_ERR_LAST_CLASS 79 /* It is also helpful to know the
927928
last valid class */
928929

929930
#define MPICH_ERR_FIRST_MPIX 100 /* Define a gap here because sock is

src/mpi/coll/iallgather/iallgather_intra_sched_recursive_doubling.c

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/* helper callbacks and associated state structures */
99
struct shared_state {
1010
int recvtype;
11+
int recvcount;
1112
MPI_Aint curr_count;
1213
MPI_Aint last_recv_count;
1314
MPI_Status status;
@@ -22,10 +23,11 @@ static int get_count(MPIR_Comm * comm, int tag, void *state)
2223
return MPI_SUCCESS;
2324
}
2425

25-
static int dtp_release_ref(MPIR_Comm * comm, int tag, void *state)
26+
static int reset_shared_state(MPIR_Comm * comm, int tag, void *state)
2627
{
27-
MPIR_Datatype *recv_dtp = state;
28-
MPIR_Datatype_ptr_release(recv_dtp);
28+
struct shared_state *ss = state;
29+
ss->curr_count = ss->recvcount;
30+
2931
return MPI_SUCCESS;
3032
}
3133

@@ -53,7 +55,6 @@ int MPIR_Iallgather_intra_sched_recursive_doubling(const void *sendbuf, MPI_Aint
5355
int mask, tmp_mask, dst;
5456
int dst_tree_root, my_tree_root, tree_root;
5557
MPI_Aint recvtype_extent;
56-
MPIR_Datatype *recv_dtp;
5758

5859
comm_size = comm_ptr->local_size;
5960
rank = comm_ptr->rank;
@@ -64,11 +65,6 @@ int MPIR_Iallgather_intra_sched_recursive_doubling(const void *sendbuf, MPI_Aint
6465
MPIR_Assert(!(comm_size & (comm_size - 1)));
6566
#endif /* HAVE_ERROR_CHECKING */
6667

67-
recv_dtp = NULL;
68-
if (!HANDLE_IS_BUILTIN(recvtype)) {
69-
MPIR_Datatype_get_ptr(recvtype, recv_dtp);
70-
}
71-
7268
MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent);
7369

7470
/* copy local data into recvbuf */
@@ -84,9 +80,7 @@ int MPIR_Iallgather_intra_sched_recursive_doubling(const void *sendbuf, MPI_Aint
8480
MPIR_ERR_CHKANDJUMP(!ss, mpi_errno, MPI_ERR_OTHER, "**nomem");
8581
ss->curr_count = recvcount;
8682
ss->recvtype = recvtype;
87-
/* ensure that recvtype doesn't disappear immediately after last _recv but before _cb */
88-
if (recv_dtp)
89-
MPIR_Datatype_ptr_add_ref(recv_dtp);
83+
ss->recvcount = recvcount;
9084

9185
mask = 0x1;
9286
i = 0;
@@ -205,10 +199,8 @@ int MPIR_Iallgather_intra_sched_recursive_doubling(const void *sendbuf, MPI_Aint
205199
i++;
206200
}
207201

208-
if (recv_dtp) {
209-
mpi_errno = MPIR_Sched_cb(dtp_release_ref, recv_dtp, s);
210-
MPIR_ERR_CHECK(mpi_errno);
211-
}
202+
mpi_errno = MPIR_Sched_cb(reset_shared_state, ss, s);
203+
MPIR_ERR_CHECK(mpi_errno);
212204

213205
fn_exit:
214206
return mpi_errno;

src/mpi/coll/ialltoallw/ialltoallw_intra_sched_inplace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int MPIR_Ialltoallw_intra_sched_inplace(const void *sendbuf, const MPI_Aint send
6565
else
6666
dst = i;
6767

68-
MPIR_Datatype_get_size_macro(recvtypes[i], recvtype_sz);
68+
MPIR_Datatype_get_size_macro(recvtypes[dst], recvtype_sz);
6969
mpi_errno = MPIR_Sched_send(((char *) recvbuf + rdispls[dst]),
7070
recvcounts[dst], recvtypes[dst], dst, comm_ptr, s);
7171
MPIR_ERR_CHECK(mpi_errno);

src/mpi/coll/ialltoallw/ialltoallw_tsp_inplace.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ int MPIR_TSP_Ialltoallw_sched_intra_inplace(const void *sendbuf, const MPI_Aint
3636
mpi_errno = MPIR_Sched_next_tag(comm, &tag);
3737
MPIR_ERR_CHECK(mpi_errno);
3838

39+
/* FIXME: Here we allocate tmp_buf using extent and send/recv with datatype directly,
40+
* which can be potentially very inefficient. Why don't we use bytes as in
41+
* ialltoallw_intra_sched_inplace.c ?
42+
*/
3943
MPI_Aint max_size;
4044
max_size = 0;
4145
for (i = 0; i < nranks; ++i) {

src/mpi/init/mpir_init.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ int MPII_Finalize(MPIR_Session * session_ptr)
365365
MPID_Thread_mutex_destroy(&session_ptr->mutex, &thr_err);
366366
MPIR_Assert(thr_err == 0);
367367

368+
if (session_ptr->errhandler != NULL) {
369+
MPIR_Errhandler_free_impl(session_ptr->errhandler);
370+
}
371+
368372
MPIR_Handle_obj_free(&MPIR_Session_mem, session_ptr);
369373
}
370374

0 commit comments

Comments
 (0)