Skip to content

Commit

Permalink
Add MPI_Ssend
Browse files Browse the repository at this point in the history
  • Loading branch information
wangvsa committed Aug 6, 2020
1 parent d44785e commit dbdf967
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 224 deletions.
7 changes: 4 additions & 3 deletions include/recorder-log-format.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static const char* func_list[] = {
"fdopen", "fileno", "access", "faccessat","tmpfile",
"remove", "truncate", "ftruncate", "vfprintf", "msync",

// MPI I/O - 76 functions
// MPI I/O - 78 functions
"PMPI_File_close", "PMPI_File_set_size", "PMPI_File_iread_at",
"PMPI_File_iread", "PMPI_File_iread_shared", "PMPI_File_iwrite_at",
"PMPI_File_iwrite", "PMPI_File_iwrite_shared", "PMPI_File_open",
Expand Down Expand Up @@ -156,6 +156,7 @@ static const char* func_list[] = {
"PMPI_Info_create", "PMPI_Info_set", "PMPI_Info_get",
// Added 2020/08/06
"PMPI_Waitall", "PMPI_Waitsome", "PMPI_Waitany",
"PMPI_Ssend",


// HDF5 I/O - 74 functions
Expand Down Expand Up @@ -213,7 +214,7 @@ static char filename_arg_pos[] = {
0b00000001, 0b00000001, 0b00000001, 0b00000011, 0b00000000, // tmpfile
0b00000001, 0b00000001, 0b00000001, 0b00000001, 0b00000000, // remove

// MPI I/O - 76 functions
// MPI I/O - 78 functions
// Only MPI_File_open has the filename argument
0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000,
Expand Down Expand Up @@ -245,7 +246,7 @@ static char filename_arg_pos[] = {
0b00000000, 0b00000000, 0b00000000,
// Added 2020/08/06
0b00000000, 0b00000000, 0b00000000,

0b00000000,

// HDF5 I/O - 74 functions
// Only H5Fcreate and H5Fopen have filename arguments
Expand Down
3 changes: 2 additions & 1 deletion include/recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,11 @@ RECORDER_FORWARD_DECL(PMPI_Irecv, int, (void *buf, int count, MPI_Datatype datat
RECORDER_FORWARD_DECL(PMPI_Info_create, int, (MPI_Info *info));
RECORDER_FORWARD_DECL(PMPI_Info_set, int, (MPI_Info info, CONST char *key, CONST char *value));
RECORDER_FORWARD_DECL(PMPI_Info_get, int, (MPI_Info info, CONST char *key, int valuelen, char *value, int *flag));
// Add MPI_Waitall, MPI_Waitsome and MPI_Waitany on 2020/08/06
// Add MPI_Waitall, MPI_Waitsome, MPI_Waitany, MPI_Ssend on 2020/08/06
RECORDER_FORWARD_DECL(PMPI_Waitall, int, (int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]));
RECORDER_FORWARD_DECL(PMPI_Waitsome, int, (int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]));
RECORDER_FORWARD_DECL(PMPI_Waitany, int, (int count, MPI_Request array_of_requests[], int *indx, MPI_Status * status));
RECORDER_FORWARD_DECL(PMPI_Ssend, int, (CONST void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));



Expand Down
63 changes: 34 additions & 29 deletions lib/recorder-mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,38 @@ int RECORDER_MPI_DECL(MPI_Wait) (MPI_Request *request, MPI_Status *status) {
RECORDER_INTERCEPTOR(2, args);
}

// Add MPI_Waitall, MPI_Waitsome and MPI_Waitany on 2020/08/06
int RECORDER_MPI_DECL(MPI_Send) (CONST void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Send, (buf, count, datatype, dest, tag, comm));
char **args = assemble_args_list(6, ptoa(buf), itoa(count), type2name(datatype), itoa(dest), itoa(tag), comm2name(comm));
RECORDER_INTERCEPTOR(6, args);
}
int RECORDER_MPI_DECL(MPI_Recv) (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Recv, (buf, count, datatype, source, tag, comm, status));
char **args = assemble_args_list(7, ptoa(buf), itoa(count), type2name(datatype), itoa(source), itoa(tag), comm2name(comm), ptoa(status));
RECORDER_INTERCEPTOR(7, args);
}
int RECORDER_MPI_DECL(MPI_Sendrecv) (CONST void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype,
int source, int recvtag, MPI_Comm comm, MPI_Status *status) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Sendrecv, (sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status));
char **args = assemble_args_list(12, ptoa(sendbuf), itoa(sendcount), type2name(sendtype), itoa(dest), itoa(sendtag), ptoa(recvbuf), itoa(recvcount), type2name(recvtype),
itoa(source), itoa(recvtag), comm2name(comm), ptoa(status));
RECORDER_INTERCEPTOR(12, args);
}
int RECORDER_MPI_DECL(MPI_Isend) (CONST void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Isend, (buf, count, datatype, dest, tag, comm, request));
size_t r = *request;
char **args = assemble_args_list(7, ptoa(buf), itoa(count), type2name(datatype), itoa(dest), itoa(tag), comm2name(comm), itoa(r));
RECORDER_INTERCEPTOR(7, args);
}
int RECORDER_MPI_DECL(MPI_Irecv) (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Irecv, (buf, count, datatype, source, tag, comm, request));
size_t r = *request;
char **args = assemble_args_list(7, ptoa(buf), itoa(count), type2name(datatype), itoa(source), itoa(tag), comm2name(comm), itoa(r));
RECORDER_INTERCEPTOR(7, args);
}


// Add MPI_Waitall, MPI_Waitsome, MPI_Waitany and MPI_Ssend on 2020/08/06
int RECORDER_MPI_DECL(MPI_Waitall) (int count, MPI_Request requests[], MPI_Status statuses[]) {
int i;
size_t arr[count];
Expand Down Expand Up @@ -496,35 +527,9 @@ int RECORDER_MPI_DECL(MPI_Waitany) (int count, MPI_Request requests[], int *indx
char **args = assemble_args_list(4, itoa(count), requests_str, itoa(*indx), ptoa(status));
RECORDER_INTERCEPTOR(4, args);
}


int RECORDER_MPI_DECL(MPI_Send) (CONST void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Send, (buf, count, datatype, dest, tag, comm));
int RECORDER_MPI_DECL(MPI_Ssend) (CONST void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Ssend, (buf, count, datatype, dest, tag, comm));
char **args = assemble_args_list(6, ptoa(buf), itoa(count), type2name(datatype), itoa(dest), itoa(tag), comm2name(comm));
RECORDER_INTERCEPTOR(6, args);
}
int RECORDER_MPI_DECL(MPI_Recv) (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Recv, (buf, count, datatype, source, tag, comm, status));
char **args = assemble_args_list(7, ptoa(buf), itoa(count), type2name(datatype), itoa(source), itoa(tag), comm2name(comm), ptoa(status));
RECORDER_INTERCEPTOR(7, args);
}
int RECORDER_MPI_DECL(MPI_Sendrecv) (CONST void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype,
int source, int recvtag, MPI_Comm comm, MPI_Status *status) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Sendrecv, (sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status));
char **args = assemble_args_list(12, ptoa(sendbuf), itoa(sendcount), type2name(sendtype), itoa(dest), itoa(sendtag), ptoa(recvbuf), itoa(recvcount), type2name(recvtype),
itoa(source), itoa(recvtag), comm2name(comm), ptoa(status));
RECORDER_INTERCEPTOR(12, args);
}
int RECORDER_MPI_DECL(MPI_Isend) (CONST void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Isend, (buf, count, datatype, dest, tag, comm, request));
size_t r = *request;
char **args = assemble_args_list(7, ptoa(buf), itoa(count), type2name(datatype), itoa(dest), itoa(tag), comm2name(comm), itoa(r));
RECORDER_INTERCEPTOR(7, args);
}
int RECORDER_MPI_DECL(MPI_Irecv) (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) {
RECORDER_INTERCEPTOR_NOIO(int, PMPI_Irecv, (buf, count, datatype, source, tag, comm, request));
size_t r = *request;
char **args = assemble_args_list(7, ptoa(buf), itoa(count), type2name(datatype), itoa(source), itoa(tag), comm2name(comm), itoa(r));
RECORDER_INTERCEPTOR(7, args);
}

191 changes: 0 additions & 191 deletions tools/reporter/reader.py

This file was deleted.

0 comments on commit dbdf967

Please sign in to comment.