Commit 2c6c98e0 authored by fisaila's avatar fisaila

Added counters for MPI activity. Following steps worked:

1. Added the counters in darshan-log-format.h
2. Added the names of the counters in darshan-util/darshan-logutils.c
3. Added the new profiled function declarations (e.g., PMPI_Sent) in darshan-runtime/darshan-dynamic.h
 - DARSHAN_EXTERN_DECL(...)
4. Added the new profiled function declarations (e.g., PMPI_Sent) in darshan-runtime/lib/darshan-mpi-init-finalize.c 
 - DARSHAN_FORWARD_DECL(...)
 - MAP_OR_FAIL(...)
5. Updated the reducer in darshan-runtime/lib/darshan-mpi-io.c in the function: 
 static void darshan_file_reduce(void* infile_v, 
    void* inoutfile_v, int *len, 
    MPI_Datatype *datatype);




git-svn-id: https://svn.mcs.anl.gov/repos/darshan/branches/darshan-florin-extensions-addcounters@827 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 20fd9625
......@@ -217,6 +217,63 @@ enum darshan_indices
CP_SLOWEST_RANK,
CP_SLOWEST_RANK_BYTES,
CP_MPI_SENDS,
CP_MPI_RECVS,
CP_MPI_ISENDS,
CP_MPI_IRECVS,
CP_MPI_WAITS,
CP_MPI_TESTS,
CP_MPI_WAITANYS,
CP_MPI_TESTANYS,
CP_MPI_WAITALLS,
CP_MPI_TESTALLS,
CP_MPI_BARRIERS,
CP_MPI_BCASTS,
CP_MPI_GATHERS,
CP_MPI_GATHERVS,
CP_MPI_SCATHERS,
CP_MPI_SCATHERVS,
CP_MPI_ALLGATHERS,
CP_MPI_ALLGATHERVS,
CP_MPI_ALLTOALLS,
CP_MPI_ALLTOALLVS,
CP_MPI_REDUCES,
CP_MPI_ALLREDUCES,
CP_BYTES_MPI_SEND,
CP_BYTES_MPI_RECV,
CP_BYTES_MPI_ISEND,
CP_BYTES_MPI_IRECV,
CP_BYTES_MPI_BCAST,
CP_BYTES_MPI_GATHER,
CP_BYTES_MPI_GATHERV,
CP_BYTES_MPI_SCATHER,
CP_BYTES_MPI_SCATHERV,
CP_BYTES_MPI_ALLGATHER,
CP_BYTES_MPI_ALLGATHERV,
CP_BYTES_MPI_ALLTOALL,
CP_BYTES_MPI_ALLTOALLV,
CP_BYTES_MPI_REDUCE,
CP_BYTES_MPI_ALLREDUCE,
CP_AVG_MEM_DTYPE_SIZE,
CP_AVG_MEM_DTYPE_EXTENT,
CP_AVG_MEM_DTYPE_BLOCKS,
CP_AVG_FILE_DTYPE_EXTENT,
CP_AVG_FILE_DTYPE_BLOCKS,
CP_MAX_MEM_DTYPE_SIZE,
CP_MAX_MEM_DTYPE_EXTENT,
CP_MAX_MEM_DTYPE_BLOCKS,
CP_MAX_FILE_OFFSET,
CP_MAX_FILE_DTYPE_EXTENT,
CP_MAX_FILE_DTYPE_BLOCKS,
CP_MIN_MEM_DTYPE_SIZE,
CP_MIN_MEM_DTYPE_EXTENT,
CP_MIN_MEM_DTYPE_BLOCKS,
CP_MIN_FILE_OFFSET,
CP_MIN_FILE_DTYPE_EXTENT,
CP_MIN_FILE_DTYPE_BLOCKS,
CP_NUM_INDICES,
};
......
......@@ -21,10 +21,10 @@ DARSHAN_EXTERN_DECL(PMPI_File_set_size, int, (MPI_File fh, MPI_Offset size));
DARSHAN_EXTERN_DECL(PMPI_File_iread_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_EXTERN_DECL(PMPI_File_iread, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_EXTERN_DECL(PMPI_File_iread_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_EXTERN_DECL(PMPI_File_iwrite_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_EXTERN_DECL(PMPI_File_iwrite, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_EXTERN_DECL(PMPI_File_iwrite_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_EXTERN_DECL(PMPI_File_open, int, (MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh));
DARSHAN_EXTERN_DECL(PMPI_File_iwrite_at, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_EXTERN_DECL(PMPI_File_iwrite, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_EXTERN_DECL(PMPI_File_iwrite_shared, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_EXTERN_DECL(PMPI_File_open, int, (MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh));
DARSHAN_EXTERN_DECL(PMPI_File_read_all_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_EXTERN_DECL(PMPI_File_read_all, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_read_at_all, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
......@@ -34,38 +34,65 @@ DARSHAN_EXTERN_DECL(PMPI_File_read, int, (MPI_File fh, void *buf, int count, MPI
DARSHAN_EXTERN_DECL(PMPI_File_read_ordered_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_EXTERN_DECL(PMPI_File_read_ordered, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_read_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_set_view, int, (MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, char *datarep, MPI_Info info));
DARSHAN_EXTERN_DECL(PMPI_File_set_view, int, (MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, const char *datarep, MPI_Info info));
DARSHAN_EXTERN_DECL(PMPI_File_sync, int, (MPI_File fh));
DARSHAN_EXTERN_DECL(PMPI_File_write_all_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_EXTERN_DECL(PMPI_File_write_all, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write_at_all_begin, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype));
DARSHAN_EXTERN_DECL(PMPI_File_write_at_all, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write_ordered_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_EXTERN_DECL(PMPI_File_write_ordered, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write_all_begin, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype));
DARSHAN_EXTERN_DECL(PMPI_File_write_all, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write_at_all_begin, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype));
DARSHAN_EXTERN_DECL(PMPI_File_write_at_all, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write_at, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write_ordered_begin, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype));
DARSHAN_EXTERN_DECL(PMPI_File_write_ordered, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_File_write_shared, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_Finalize, int, ());
DARSHAN_EXTERN_DECL(PMPI_Init, int, (int *argc, char ***argv));
DARSHAN_EXTERN_DECL(PMPI_Init_thread, int, (int *argc, char ***argv, int required, int *provided));
DARSHAN_EXTERN_DECL(PMPI_Wtime, double, ());
DARSHAN_EXTERN_DECL(PMPI_Allreduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Bcast, int, (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm));
//DARSHAN_EXTERN_DECL(PMPI_Allreduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
//DARSHAN_EXTERN_DECL(PMPI_Bcast, int, (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Comm_rank, int, (MPI_Comm comm, int *rank));
DARSHAN_EXTERN_DECL(PMPI_Comm_size, int, (MPI_Comm comm, int *size));
DARSHAN_EXTERN_DECL(PMPI_Scan, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Type_commit, int, (MPI_Datatype *datatype));
DARSHAN_EXTERN_DECL(PMPI_Type_contiguous, int, (int count, MPI_Datatype oldtype, MPI_Datatype *newtype));
DARSHAN_EXTERN_DECL(PMPI_Type_extent, int, (MPI_Datatype datatype, MPI_Aint *extent));
DARSHAN_EXTERN_DECL(PMPI_Type_get_true_extent, int, (MPI_Datatype datatype, MPI_Aint *true_lb, MPI_Aint *true_extent));
DARSHAN_EXTERN_DECL(PMPI_Type_free, int, (MPI_Datatype *datatype));
DARSHAN_EXTERN_DECL(PMPI_Type_hindexed, int, (int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype));
DARSHAN_EXTERN_DECL(PMPI_Op_create, int, (MPI_User_function *function, int commute, MPI_Op *op));
DARSHAN_EXTERN_DECL(PMPI_Op_free, int, (MPI_Op *op));
DARSHAN_EXTERN_DECL(PMPI_Reduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
//DARSHAN_EXTERN_DECL(PMPI_Reduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Type_get_envelope, int, (MPI_Datatype datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner));
DARSHAN_EXTERN_DECL(PMPI_Type_size, int, (MPI_Datatype datatype, int *size));
DARSHAN_EXTERN_DECL(PMPI_Send, int, (const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Recv, int, (void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_Isend, int, (const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request));
DARSHAN_EXTERN_DECL(PMPI_Irecv, int, (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request));
DARSHAN_EXTERN_DECL(PMPI_Wait, int, (MPI_Request *request, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_Test, int, (MPI_Request *request, int *flag, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_Waitany, int, (int count, MPI_Request array_of_requests[], int *indx, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_Testany, int, (int count, MPI_Request array_of_requests[], int *indx, int *flag, MPI_Status *status));
DARSHAN_EXTERN_DECL(PMPI_Waitall, int, (int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]));
DARSHAN_EXTERN_DECL(PMPI_Testall, int, (int count, MPI_Request array_of_requests[], int *flag, MPI_Status array_of_statuses[]));
DARSHAN_EXTERN_DECL(PMPI_Barrier, int, (MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Bcast, int, (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Gather, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Gatherv, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Scatter, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Scatterv, int, (const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Allgather, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Allgatherv, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Alltoall, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Alltoallv, int, (const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Reduce, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
DARSHAN_EXTERN_DECL(PMPI_Allreduce, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
MPI_Op op, MPI_Comm comm));
#else
#define DARSHAN_MPI_CALL(func) func
......
......@@ -33,10 +33,10 @@ DARSHAN_FORWARD_DECL(PMPI_File_set_size, int, (MPI_File fh, MPI_Offset size));
DARSHAN_FORWARD_DECL(PMPI_File_iread_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_iread, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_iread_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_iwrite_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_iwrite, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_iwrite_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_open, int, (MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh));
DARSHAN_FORWARD_DECL(PMPI_File_iwrite_at, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_iwrite, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_iwrite_shared, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_open, int, (MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh));
DARSHAN_FORWARD_DECL(PMPI_File_read_all_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_read_all, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_read_at_all, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
......@@ -46,24 +46,24 @@ DARSHAN_FORWARD_DECL(PMPI_File_read, int, (MPI_File fh, void *buf, int count, MP
DARSHAN_FORWARD_DECL(PMPI_File_read_ordered_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_read_ordered, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_read_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_set_view, int, (MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, char *datarep, MPI_Info info));
DARSHAN_FORWARD_DECL(PMPI_File_set_view, int, (MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, const char *datarep, MPI_Info info));
DARSHAN_FORWARD_DECL(PMPI_File_sync, int, (MPI_File fh));
DARSHAN_FORWARD_DECL(PMPI_File_write_all_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_all, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_at_all_begin, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_at_all, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_ordered_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_ordered, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_all_begin, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_all, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_at_all_begin, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_at_all, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_at, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_ordered_begin, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_ordered, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_shared, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_Finalize, int, ());
DARSHAN_FORWARD_DECL(PMPI_Init, int, (int *argc, char ***argv));
DARSHAN_FORWARD_DECL(PMPI_Init_thread, int, (int *argc, char ***argv, int required, int *provided));
DARSHAN_FORWARD_DECL(PMPI_Wtime, double, ());
DARSHAN_FORWARD_DECL(PMPI_Allreduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Bcast, int, (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm));
//DARSHAN_FORWARD_DECL(PMPI_Allreduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
//DARSHAN_FORWARD_DECL(PMPI_Bcast, int, (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Comm_rank, int, (MPI_Comm comm, int *rank));
DARSHAN_FORWARD_DECL(PMPI_Comm_size, int, (MPI_Comm comm, int *size));
DARSHAN_FORWARD_DECL(PMPI_Scan, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
......@@ -74,10 +74,34 @@ DARSHAN_FORWARD_DECL(PMPI_Type_free, int, (MPI_Datatype *datatype));
DARSHAN_FORWARD_DECL(PMPI_Type_hindexed, int, (int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype));
DARSHAN_FORWARD_DECL(PMPI_Op_create, int, (MPI_User_function *function, int commute, MPI_Op *op));
DARSHAN_FORWARD_DECL(PMPI_Op_free, int, (MPI_Op *op));
DARSHAN_FORWARD_DECL(PMPI_Reduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
//DARSHAN_FORWARD_DECL(PMPI_Reduce, int, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Type_get_envelope, int, (MPI_Datatype datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner));
DARSHAN_FORWARD_DECL(PMPI_Type_size, int, (MPI_Datatype datatype, int *size));
DARSHAN_FORWARD_DECL(PMPI_Send, int, (const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Recv, int, (void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_Isend, int, (const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request));
DARSHAN_FORWARD_DECL(PMPI_Irecv, int, (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request));
DARSHAN_FORWARD_DECL(PMPI_Wait, int, (MPI_Request *request, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_Test, int, (MPI_Request *request, int *flag, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_Waitany, int, (int count, MPI_Request array_of_requests[], int *indx, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_Testany, int, (int count, MPI_Request array_of_requests[], int *indx, int *flag, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_Waitall, int, (int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]));
DARSHAN_FORWARD_DECL(PMPI_Testall, int, (int count, MPI_Request array_of_requests[], int *flag, MPI_Status array_of_statuses[]));
DARSHAN_FORWARD_DECL(PMPI_Barrier, int, (MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Bcast, int, (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Gather, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Gatherv, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Scatter, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Scatterv, int, (const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Allgather, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Allgatherv, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Alltoall, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Alltoallv, int, (const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Reduce, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Allreduce, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
void resolve_mpi_symbols (void)
{
......@@ -117,13 +141,37 @@ void resolve_mpi_symbols (void)
MAP_OR_FAIL(PMPI_Init);
MAP_OR_FAIL(PMPI_Init_thread);
MAP_OR_FAIL(PMPI_Send);
MAP_OR_FAIL(PMPI_Recv);
MAP_OR_FAIL(PMPI_Isend);
MAP_OR_FAIL(PMPI_Irecv);
MAP_OR_FAIL(PMPI_Wait);
MAP_OR_FAIL(PMPI_Test);
MAP_OR_FAIL(PMPI_Waitany);
MAP_OR_FAIL(PMPI_Testany);
MAP_OR_FAIL(PMPI_Waitall);
MAP_OR_FAIL(PMPI_Testall);
MAP_OR_FAIL(PMPI_Barrier);
MAP_OR_FAIL(PMPI_Bcast);
MAP_OR_FAIL(PMPI_Gather);
MAP_OR_FAIL(PMPI_Gatherv);
MAP_OR_FAIL(PMPI_Scatter);
MAP_OR_FAIL(PMPI_Scatterv);
MAP_OR_FAIL(PMPI_Allgather);
MAP_OR_FAIL(PMPI_Allgatherv);
MAP_OR_FAIL(PMPI_Alltoall);
MAP_OR_FAIL(PMPI_Alltoallv);
MAP_OR_FAIL(PMPI_Reduce);
MAP_OR_FAIL(PMPI_Allreduce);
/*
* These function are not intercepted but are used
* by darshan itself.
*/
MAP_OR_FAIL(PMPI_Wtime);
MAP_OR_FAIL(PMPI_Allreduce);
MAP_OR_FAIL(PMPI_Bcast);
// MAP_OR_FAIL(PMPI_Allreduce);
// MAP_OR_FAIL(PMPI_Bcast);
MAP_OR_FAIL(PMPI_Comm_rank);
MAP_OR_FAIL(PMPI_Comm_size);
MAP_OR_FAIL(PMPI_Scan);
......@@ -135,7 +183,7 @@ void resolve_mpi_symbols (void)
MAP_OR_FAIL(PMPI_Type_hindexed);
MAP_OR_FAIL(PMPI_Op_create);
MAP_OR_FAIL(PMPI_Op_free);
MAP_OR_FAIL(PMPI_Reduce);
// MAP_OR_FAIL(PMPI_Reduce);
MAP_OR_FAIL(PMPI_Type_get_envelope);
return;
......
......@@ -230,6 +230,11 @@ struct variance_dt
static int epoch_counter = 0;
// The next two variables used for the context of the file access operation
// e.g. for tracing all the MPI communication from an MPI_File_write
static __thread char *crt_filename = NULL;
static __thread MPI_File *crt_fh = NULL;
void darshan_mpi_initialize(int *argc, char ***argv)
{
int nprocs;
......@@ -843,12 +848,14 @@ int MPI_File_read(MPI_File fh, void *buf, int count,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_read)(fh, buf, count, datatype, status);
tm2 = darshan_wtime();
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_INDEP_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -858,6 +865,7 @@ int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_read_at)(fh, offset, buf,
count, datatype, status);
......@@ -865,6 +873,7 @@ int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf,
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_INDEP_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -874,6 +883,7 @@ int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void * buf,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_read_at_all)(fh, offset, buf,
count, datatype, status);
......@@ -881,6 +891,7 @@ int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void * buf,
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_COLL_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -889,6 +900,7 @@ int MPI_File_read_all(MPI_File fh, void * buf, int count, MPI_Datatype datatype,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_read_all)(fh, buf, count,
datatype, status);
......@@ -896,6 +908,7 @@ int MPI_File_read_all(MPI_File fh, void * buf, int count, MPI_Datatype datatype,
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_COLL_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -904,6 +917,7 @@ int MPI_File_read_shared(MPI_File fh, void * buf, int count, MPI_Datatype dataty
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_read_shared)(fh, buf, count,
datatype, status);
......@@ -911,6 +925,7 @@ int MPI_File_read_shared(MPI_File fh, void * buf, int count, MPI_Datatype dataty
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_INDEP_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -920,6 +935,7 @@ int MPI_File_read_ordered(MPI_File fh, void * buf, int count,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_read_ordered)(fh, buf, count,
datatype, status);
......@@ -927,6 +943,7 @@ int MPI_File_read_ordered(MPI_File fh, void * buf, int count,
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_COLL_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -936,6 +953,7 @@ int MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, void * buf,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_read_at_all_begin)(fh, offset, buf,
count, datatype);
......@@ -943,6 +961,7 @@ int MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, void * buf,
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_SPLIT_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -951,12 +970,14 @@ int MPI_File_read_all_begin(MPI_File fh, void * buf, int count, MPI_Datatype dat
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_read_all_begin)(fh, buf, count, datatype);
tm2 = darshan_wtime();
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_SPLIT_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -965,6 +986,7 @@ int MPI_File_read_ordered_begin(MPI_File fh, void * buf, int count, MPI_Datatype
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_read_ordered_begin)(fh, buf, count,
datatype);
......@@ -972,6 +994,7 @@ int MPI_File_read_ordered_begin(MPI_File fh, void * buf, int count, MPI_Datatype
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_SPLIT_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -981,6 +1004,7 @@ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void * buf,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_iread_at)(fh, offset, buf, count,
datatype, request);
......@@ -988,6 +1012,7 @@ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void * buf,
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_NB_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -996,12 +1021,14 @@ int MPI_File_iread(MPI_File fh, void * buf, int count, MPI_Datatype datatype, __
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_iread)(fh, buf, count, datatype, request);
tm2 = darshan_wtime();
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_NB_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1011,6 +1038,7 @@ int MPI_File_iread_shared(MPI_File fh, void * buf, int count,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_iread_shared)(fh, buf, count,
datatype, request);
......@@ -1018,10 +1046,10 @@ int MPI_File_iread_shared(MPI_File fh, void * buf, int count,
CP_LOCK();
CP_RECORD_MPI_READ(ret, fh, count, datatype, CP_NB_READS, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
#ifdef HAVE_MPIIO_CONST
int MPI_File_write(MPI_File fh, const void *buf, int count,
MPI_Datatype datatype, MPI_Status *status)
......@@ -1033,12 +1061,14 @@ int MPI_File_write(MPI_File fh, void *buf, int count,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_write)(fh, buf, count, datatype, status);
tm2 = darshan_wtime();
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_INDEP_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1053,6 +1083,7 @@ int MPI_File_write_at(MPI_File fh, MPI_Offset offset, void *buf,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_write_at)(fh, offset, buf,
count, datatype, status);
......@@ -1060,6 +1091,7 @@ int MPI_File_write_at(MPI_File fh, MPI_Offset offset, void *buf,
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_INDEP_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1074,6 +1106,9 @@ int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, void * buf,
int ret;
double tm1, tm2;
darshan_start_epoch();
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_write_at_all)(fh, offset, buf,
count, datatype, status);
......@@ -1081,6 +1116,10 @@ int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, void * buf,
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_COLL_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
darshan_end_epoch();
return(ret);
}
......@@ -1093,6 +1132,7 @@ int MPI_File_write_all(MPI_File fh, void * buf, int count, MPI_Datatype datatype
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_write_all)(fh, buf, count,
datatype, status);
......@@ -1100,6 +1140,8 @@ int MPI_File_write_all(MPI_File fh, void * buf, int count, MPI_Datatype datatype
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_COLL_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1112,6 +1154,7 @@ int MPI_File_write_shared(MPI_File fh, void * buf, int count, MPI_Datatype datat
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_write_shared)(fh, buf, count,
datatype, status);
......@@ -1119,6 +1162,7 @@ int MPI_File_write_shared(MPI_File fh, void * buf, int count, MPI_Datatype datat
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_INDEP_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1133,13 +1177,15 @@ int MPI_File_write_ordered(MPI_File fh, void * buf, int count,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_write_ordered)(fh, buf, count,
datatype, status);
datatype, status);
tm2 = darshan_wtime();
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_COLL_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1154,6 +1200,7 @@ int MPI_File_write_at_all_begin(MPI_File fh, MPI_Offset offset, void * buf,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_write_at_all_begin)(fh, offset,
buf, count, datatype);
......@@ -1161,6 +1208,7 @@ int MPI_File_write_at_all_begin(MPI_File fh, MPI_Offset offset, void * buf,
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_SPLIT_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1173,12 +1221,14 @@ int MPI_File_write_all_begin(MPI_File fh, void * buf, int count, MPI_Datatype da
int ret;
double tm1, tm2;
tm1 = darshan_wtime();
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_write_all_begin)(fh, buf, count, datatype);
tm2 = darshan_wtime();
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_SPLIT_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1191,6 +1241,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, void * buf, int count, MPI_Datatyp
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_write_ordered_begin)(fh, buf, count,
datatype);
......@@ -1198,6 +1249,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, void * buf, int count, MPI_Datatyp
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_SPLIT_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1212,6 +1264,7 @@ int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, void * buf,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_iwrite_at)(fh, offset, buf,
count, datatype, request);
......@@ -1219,6 +1272,7 @@ int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, void * buf,
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_NB_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1231,12 +1285,14 @@ int MPI_File_iwrite(MPI_File fh, void * buf, int count, MPI_Datatype datatype, _
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_iwrite)(fh, buf, count, datatype, request);
tm2 = darshan_wtime();
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_NB_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1251,6 +1307,7 @@ int MPI_File_iwrite_shared(MPI_File fh, void * buf, int count,
int ret;
double tm1, tm2;
crt_fh = &fh;
tm1 = darshan_wtime();
ret = DARSHAN_MPI_CALL(PMPI_File_iwrite_shared)(fh, buf, count,
datatype, request);
......@@ -1258,6 +1315,7 @@ int MPI_File_iwrite_shared(MPI_File fh, void * buf, int count,
CP_LOCK();
CP_RECORD_MPI_WRITE(ret, fh, count, datatype, CP_NB_WRITES, tm1, tm2);
CP_UNLOCK();
crt_fh = NULL;
return(ret);
}
......@@ -1709,6 +1767,13 @@ static void darshan_file_reduce(void* infile_v,
tmp_file.counters[CP_SIZE_AT_OPEN] = infile->counters[CP_SIZE_AT_OPEN];
}