Skip to content

Commit 04ea3a6

Browse files
committed
Add MPI_Cart_sub
1 parent 8cbfbae commit 04ea3a6

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

include/recorder-log-format.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static const char* func_list[] = {
127127
"fseeko", "ftello",
128128

129129

130-
// MPI 85 functions
130+
// MPI 86 functions
131131
"PMPI_File_close", "PMPI_File_set_size", "PMPI_File_iread_at",
132132
"PMPI_File_iread", "PMPI_File_iread_shared", "PMPI_File_iwrite_at",
133133
"PMPI_File_iwrite", "PMPI_File_iwrite_shared", "PMPI_File_open",
@@ -170,7 +170,7 @@ static const char* func_list[] = {
170170
"PMPI_Testany", "PMPI_Ireduce", "PMPI_Iscatter",
171171
"PMPI_Igather", "PMPI_Ialltoall",
172172
// Added 2021/01/25
173-
"PMPI_Comm_free",
173+
"PMPI_Comm_free", "PMPI_Cart_sub",
174174

175175
// HDF5 I/O - 74 functions
176176
"H5Fcreate", "H5Fopen", "H5Fclose", "H5Fflush", // File interface
@@ -228,7 +228,7 @@ static char filename_arg_pos[] = {
228228
0b00000001, 0b00000001, 0b00000001, 0b00000001, 0b00000000, // remove
229229
0b00000001, 0b00000001,
230230

231-
// MPI 85 functions
231+
// MPI 86 functions
232232
// Only MPI_File_open has the filename argument
233233
0b00000000, 0b00000000, 0b00000000,
234234
0b00000000, 0b00000000, 0b00000000,
@@ -270,7 +270,7 @@ static char filename_arg_pos[] = {
270270
0b00000000, 0b00000000, 0b00000000,
271271
0b00000000, 0b00000000,
272272
// Added 2020/01/25
273-
0b00000000,
273+
0b00000000, 0b00000000,
274274

275275

276276
// HDF5 I/O - 74 functions

include/recorder.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,9 @@ RECORDER_FORWARD_DECL(PMPI_Ireduce, int, (const void *sendbuf, void *recvbuf, in
365365
RECORDER_FORWARD_DECL(PMPI_Igather, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
366366
RECORDER_FORWARD_DECL(PMPI_Iscatter, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request));
367367
RECORDER_FORWARD_DECL(PMPI_Ialltoall, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request * request));
368-
// Add MPI_Comm_free on 2021/01/25
368+
// Add on 2021/01/25
369369
RECORDER_FORWARD_DECL(PMPI_Comm_free, int, (MPI_Comm *comm));
370+
RECORDER_FORWARD_DECL(PMPI_Cart_sub, int, (MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm));
370371

371372

372373

lib/recorder-mpi.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,3 +720,11 @@ int RECORDER_MPI_DECL(MPI_Comm_free) (MPI_Comm *comm) {
720720
char **args = assemble_args_list(1, comm_name);
721721
RECORDER_INTERCEPTOR(1, args);
722722
}
723+
724+
int RECORDER_MPI_DECL(MPI_Cart_sub) (MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm) {
725+
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Cart_sub, (comm, remain_dims, newcomm));
726+
add_mpi_comm(newcomm);
727+
char **args = assemble_args_list(3, comm2name(&comm), ptoa(remain_dims), comm2name(newcomm));
728+
RECORDER_INTERCEPTOR(3, args);
729+
}
730+

0 commit comments

Comments
 (0)