Skip to content

Commit c980c22

Browse files
committed
Add MPI_Comm_split_type
1 parent 04ea3a6 commit c980c22

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
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 86 functions
130+
// MPI 87 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", "PMPI_Cart_sub",
173+
"PMPI_Comm_free", "PMPI_Cart_sub", "PMPI_Comm_split_type",
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 86 functions
231+
// MPI 87 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, 0b00000000,
273+
0b00000000, 0b00000000, 0b00000000,
274274

275275

276276
// HDF5 I/O - 74 functions

include/recorder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ RECORDER_FORWARD_DECL(PMPI_Ialltoall, int, (const void *sendbuf, int sendcount,
368368
// Add on 2021/01/25
369369
RECORDER_FORWARD_DECL(PMPI_Comm_free, int, (MPI_Comm *comm));
370370
RECORDER_FORWARD_DECL(PMPI_Cart_sub, int, (MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm));
371-
371+
RECORDER_FORWARD_DECL(PMPI_Comm_split_type, int, (MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm));
372372

373373

374374

lib/recorder-mpi.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ typedef struct MPICommHash_t {
7575
} MPICommHash;
7676
static MPICommHash *mpi_comm_table = NULL;
7777

78-
79-
static int split_times; // how many time we see MPI_Comm_split
80-
static int dup_times;
81-
8278
void add_mpi_comm(MPI_Comm *newcomm) {
8379
if(newcomm == NULL || *newcomm == MPI_COMM_NULL)
8480
return;
@@ -728,3 +724,10 @@ int RECORDER_MPI_DECL(MPI_Cart_sub) (MPI_Comm comm, const int remain_dims[], MPI
728724
RECORDER_INTERCEPTOR(3, args);
729725
}
730726

727+
728+
int RECORDER_MPI_DECL(MPI_Comm_split_type) (MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm) {
729+
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Comm_split_type, (comm, split_type, key, info, newcomm));
730+
add_mpi_comm(newcomm);
731+
char **args = assemble_args_list(5, comm2name(&comm), itoa(split_type), itoa(key), ptoa(&info), comm2name(newcomm));
732+
RECORDER_INTERCEPTOR(5, args);
733+
}

0 commit comments

Comments
 (0)