Commit 910486f8 authored by Shane Snyder's avatar Shane Snyder

changes to get new wrappers working for static builds

parent fc3d349d
......@@ -31,8 +31,8 @@
/* creates P* variant of MPI symbols for LD_PRELOAD so that we can handle
* language bindings that map to MPI or PMPI symbols under the covers.
*/
#define DARSHAN_PMPI_MAP(__func,__ret,__args,__fcall) \
__ret P ## __func __args { \
#define DARSHAN_WRAPPER_MAP(__func,__ret,__args,__fcall) \
__ret __func __args { \
__ret i; \
i = __fcall; \
return i; \
......@@ -47,11 +47,8 @@
{ \
__real_ ## __func = dlsym(RTLD_NEXT, #__func); \
if(!(__real_ ## __func)) { \
__real_ ## __func = dlsym(RTLD_NEXT, "P" #__func); \
if(!(__real_ ## __func)) { \
fprintf(stderr, "Darshan failed to map symbol: %s\n", #__func); \
exit(1); \
} \
fprintf(stderr, "Darshan failed to map symbol: %s\n", #__func); \
exit(1); \
} \
}
......@@ -62,7 +59,15 @@
#define DARSHAN_DECL(__name) __wrap_ ## __name
#define DARSHAN_PMPI_MAP(__func,__ret,__args,__fcall)
/* creates P* variant of MPI symbols for static linking so that we can handle
* language bindings that map to MPI or PMPI symbols under the covers.
*/
#define DARSHAN_WRAPPER_MAP(__func,__ret,__args,__fcall) \
__ret __wrap_ ## __func __args { \
__ret i; \
i = __wrap_ ## __fcall; \
return i; \
}
#define MAP_OR_FAIL(__func)
......
......@@ -17,18 +17,18 @@
#include "darshan-core.h"
#include "darshan-dynamic.h"
DARSHAN_FORWARD_DECL(MPI_Finalize, int, ());
DARSHAN_FORWARD_DECL(MPI_Init, int, (int *argc, char ***argv));
DARSHAN_FORWARD_DECL(MPI_Init_thread, int, (int *argc, char ***argv, int required, int *provided));
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_PMPI_MAP(MPI_Init, int, (int *argc, char ***argv), MPI_Init(argc,argv))
DARSHAN_WRAPPER_MAP(PMPI_Init, int, (int *argc, char ***argv), MPI_Init(argc,argv))
int DARSHAN_DECL(MPI_Init)(int *argc, char ***argv)
{
int ret;
MAP_OR_FAIL(MPI_Init);
MAP_OR_FAIL(PMPI_Init);
ret = __real_MPI_Init(argc, argv);
ret = __real_PMPI_Init(argc, argv);
if(ret != MPI_SUCCESS)
{
return(ret);
......@@ -47,14 +47,14 @@ int DARSHAN_DECL(MPI_Init)(int *argc, char ***argv)
return(ret);
}
DARSHAN_PMPI_MAP(MPI_Init_thread, int, (int *argc, char ***argv, int required, int *provided), MPI_Init_thread(argc,argv,required,provided))
DARSHAN_WRAPPER_MAP(PMPI_Init_thread, int, (int *argc, char ***argv, int required, int *provided), MPI_Init_thread(argc,argv,required,provided))
int DARSHAN_DECL(MPI_Init_thread)(int *argc, char ***argv, int required, int *provided)
{
int ret;
MAP_OR_FAIL(MPI_Init_thread);
MAP_OR_FAIL(PMPI_Init_thread);
ret = __real_MPI_Init_thread(argc, argv, required, provided);
ret = __real_PMPI_Init_thread(argc, argv, required, provided);
if(ret != MPI_SUCCESS)
{
return(ret);
......@@ -73,16 +73,16 @@ int DARSHAN_DECL(MPI_Init_thread)(int *argc, char ***argv, int required, int *pr
return(ret);
}
DARSHAN_PMPI_MAP(MPI_Finalize, int, (void), MPI_Finalize())
DARSHAN_WRAPPER_MAP(PMPI_Finalize, int, (void), MPI_Finalize())
int DARSHAN_DECL(MPI_Finalize)(void)
{
int ret;
MAP_OR_FAIL(MPI_Finalize);
MAP_OR_FAIL(PMPI_Finalize);
darshan_core_shutdown();
ret = __real_MPI_Finalize();
ret = __real_PMPI_Finalize();
return(ret);
}
......
......@@ -25,89 +25,89 @@
#include "darshan.h"
#include "darshan-dynamic.h"
DARSHAN_FORWARD_DECL(MPI_File_close, int, (MPI_File *fh));
DARSHAN_FORWARD_DECL(MPI_File_iread_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(MPI_File_iread, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(MPI_File_iread_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
DARSHAN_FORWARD_DECL(PMPI_File_close, int, (MPI_File *fh));
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));
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_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_at, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
#else
DARSHAN_FORWARD_DECL(MPI_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_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_File_iwrite, int, (MPI_File fh, 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));
#else
DARSHAN_FORWARD_DECL(MPI_File_iwrite, int, (MPI_File fh, 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));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_File_iwrite_shared, 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));
#else
DARSHAN_FORWARD_DECL(MPI_File_iwrite_shared, 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));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_File_open, int, (MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh));
DARSHAN_FORWARD_DECL(PMPI_File_open, int, (MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh));
#else
DARSHAN_FORWARD_DECL(MPI_File_open, int, (MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh));
DARSHAN_FORWARD_DECL(PMPI_File_open, int, (MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh));
#endif
DARSHAN_FORWARD_DECL(MPI_File_read_all_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(MPI_File_read_all, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(MPI_File_read_at_all, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(MPI_File_read_at_all_begin, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(MPI_File_read_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(MPI_File_read, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(MPI_File_read_ordered_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(MPI_File_read_ordered, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(MPI_File_read_shared, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
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));
DARSHAN_FORWARD_DECL(PMPI_File_read_at_all_begin, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_read_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_read, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
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));
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_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_set_view, int, (MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, const char *datarep, MPI_Info info));
#else
DARSHAN_FORWARD_DECL(MPI_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, char *datarep, MPI_Info info));
#endif
DARSHAN_FORWARD_DECL(MPI_File_sync, int, (MPI_File fh));
DARSHAN_FORWARD_DECL(PMPI_File_sync, int, (MPI_File fh));
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_File_write_all_begin, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_all_begin, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype));
#else
DARSHAN_FORWARD_DECL(MPI_File_write_all_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_all_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_File_write_all, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_all, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
#else
DARSHAN_FORWARD_DECL(MPI_File_write_all, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_all, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_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_begin, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype));
#else
DARSHAN_FORWARD_DECL(MPI_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_begin, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_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_all, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
#else
DARSHAN_FORWARD_DECL(MPI_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_all, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_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_at, int, (MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
#else
DARSHAN_FORWARD_DECL(MPI_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_at, int, (MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_File_write, int, (MPI_File fh, 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));
#else
DARSHAN_FORWARD_DECL(MPI_File_write, int, (MPI_File fh, 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));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_File_write_ordered_begin, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_ordered_begin, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype));
#else
DARSHAN_FORWARD_DECL(MPI_File_write_ordered_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
DARSHAN_FORWARD_DECL(PMPI_File_write_ordered_begin, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_File_write_ordered, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_ordered, int, (MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
#else
DARSHAN_FORWARD_DECL(MPI_File_write_ordered, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
DARSHAN_FORWARD_DECL(PMPI_File_write_ordered, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
#endif
#ifdef HAVE_MPIIO_CONST
DARSHAN_FORWARD_DECL(MPI_File_write_shared, 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));
#else
DARSHAN_FORWARD_DECL(MPI_File_write_shared, 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));
#endif
/* The mpiio_file_record_ref structure maintains necessary runtime metadata
......@@ -309,10 +309,10 @@ static int enable_dxt_io_trace = 0;
**********************************************************/
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_open, int, (MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh), MPI_File_open(comm,filename,amode,info,fh))
DARSHAN_WRAPPER_MAP(PMPI_File_open, int, (MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh), MPI_File_open(comm,filename,amode,info,fh))
int DARSHAN_DECL(MPI_File_open)(MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh)
#else
DARSHAN_PMPI_MAP(MPI_File_open, int, (MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh), MPI_File_open(comm,filename,amode,info,fh))
DARSHAN_WRAPPER_MAP(PMPI_File_open, int, (MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh), MPI_File_open(comm,filename,amode,info,fh))
int DARSHAN_DECL(MPI_File_open)(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh)
#endif
{
......@@ -321,10 +321,10 @@ int DARSHAN_DECL(MPI_File_open)(MPI_Comm comm, char *filename, int amode, MPI_In
char* tmp;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_open);
MAP_OR_FAIL(PMPI_File_open);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_open(comm, filename, amode, info, fh);
ret = __real_PMPI_File_open(comm, filename, amode, info, fh);
tm2 = darshan_core_wtime();
/* use ROMIO approach to strip prefix if present */
......@@ -345,7 +345,7 @@ int DARSHAN_DECL(MPI_File_open)(MPI_Comm comm, char *filename, int amode, MPI_In
return(ret);
}
DARSHAN_PMPI_MAP(MPI_File_read, int, (MPI_File fh, void *buf, int count,
DARSHAN_WRAPPER_MAP(PMPI_File_read, int, (MPI_File fh, void *buf, int count,
MPI_Datatype datatype, MPI_Status *status), MPI_File_read(fh,buf,count,datatype,status))
int DARSHAN_DECL(MPI_File_read)(MPI_File fh, void *buf, int count,
......@@ -354,10 +354,10 @@ int DARSHAN_DECL(MPI_File_read)(MPI_File fh, void *buf, int count,
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_read);
MAP_OR_FAIL(PMPI_File_read);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_read(fh, buf, count, datatype, status);
ret = __real_PMPI_File_read(fh, buf, count, datatype, status);
tm2 = darshan_core_wtime();
MPIIO_PRE_RECORD();
......@@ -368,13 +368,13 @@ int DARSHAN_DECL(MPI_File_read)(MPI_File fh, void *buf, int count,
}
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_write, int, (MPI_File fh, const void *buf, int count,
DARSHAN_WRAPPER_MAP(PMPI_File_write, int, (MPI_File fh, const void *buf, int count,
MPI_Datatype datatype, MPI_Status *status), MPI_File_write(fh,buf,count,datatype,status))
int DARSHAN_DECL(MPI_File_write)(MPI_File fh, const void *buf, int count,
MPI_Datatype datatype, MPI_Status *status)
#else
DARSHAN_PMPI_MAP(MPI_File_write, int, (MPI_File fh, void *buf, int count,
DARSHAN_WRAPPER_MAP(PMPI_File_write, int, (MPI_File fh, void *buf, int count,
MPI_Datatype datatype, MPI_Status *status), MPI_File_write(fh,buf,count,datatype,status))
int DARSHAN_DECL(MPI_File_write)(MPI_File fh, void *buf, int count,
......@@ -384,10 +384,10 @@ int DARSHAN_DECL(MPI_File_write)(MPI_File fh, void *buf, int count,
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_write);
MAP_OR_FAIL(PMPI_File_write);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_write(fh, buf, count, datatype, status);
ret = __real_PMPI_File_write(fh, buf, count, datatype, status);
tm2 = darshan_core_wtime();
MPIIO_PRE_RECORD();
......@@ -397,7 +397,7 @@ int DARSHAN_DECL(MPI_File_write)(MPI_File fh, void *buf, int count,
return(ret);
}
DARSHAN_PMPI_MAP(MPI_File_read_at, int, (MPI_File fh, MPI_Offset offset, void *buf,
DARSHAN_WRAPPER_MAP(PMPI_File_read_at, int, (MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype, MPI_Status *status), MPI_File_read_at(fh, offset, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_read_at)(MPI_File fh, MPI_Offset offset, void *buf,
......@@ -406,10 +406,10 @@ int DARSHAN_DECL(MPI_File_read_at)(MPI_File fh, MPI_Offset offset, void *buf,
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_read_at);
MAP_OR_FAIL(PMPI_File_read_at);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_read_at(fh, offset, buf,
ret = __real_PMPI_File_read_at(fh, offset, buf,
count, datatype, status);
tm2 = darshan_core_wtime();
......@@ -421,13 +421,13 @@ int DARSHAN_DECL(MPI_File_read_at)(MPI_File fh, MPI_Offset offset, void *buf,
}
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_write_at, int, (MPI_File fh, MPI_Offset offset, const void *buf,
DARSHAN_WRAPPER_MAP(PMPI_File_write_at, int, (MPI_File fh, MPI_Offset offset, const void *buf,
int count, MPI_Datatype datatype, MPI_Status *status), MPI_File_write_at(fh, offset, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_write_at)(MPI_File fh, MPI_Offset offset, const void *buf,
int count, MPI_Datatype datatype, MPI_Status *status)
#else
DARSHAN_PMPI_MAP(MPI_File_write_at, int, (MPI_File fh, MPI_Offset offset, void *buf,
DARSHAN_WRAPPER_MAP(PMPI_File_write_at, int, (MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype, MPI_Status *status), MPI_File_write_at(fh, offset, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_write_at)(MPI_File fh, MPI_Offset offset, void *buf,
......@@ -437,10 +437,10 @@ int DARSHAN_DECL(MPI_File_write_at)(MPI_File fh, MPI_Offset offset, void *buf,
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_write_at);
MAP_OR_FAIL(PMPI_File_write_at);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_write_at(fh, offset, buf,
ret = __real_PMPI_File_write_at(fh, offset, buf,
count, datatype, status);
tm2 = darshan_core_wtime();
......@@ -451,7 +451,7 @@ int DARSHAN_DECL(MPI_File_write_at)(MPI_File fh, MPI_Offset offset, void *buf,
return(ret);
}
DARSHAN_PMPI_MAP(MPI_File_read_all, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
DARSHAN_WRAPPER_MAP(PMPI_File_read_all, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
MPI_File_read_all(fh,buf,count,datatype,status))
int DARSHAN_DECL(MPI_File_read_all)(MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status)
......@@ -459,10 +459,10 @@ int DARSHAN_DECL(MPI_File_read_all)(MPI_File fh, void * buf, int count, MPI_Data
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_write_at);
MAP_OR_FAIL(PMPI_File_write_at);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_read_all(fh, buf, count,
ret = __real_PMPI_File_read_all(fh, buf, count,
datatype, status);
tm2 = darshan_core_wtime();
......@@ -474,26 +474,23 @@ int DARSHAN_DECL(MPI_File_read_all)(MPI_File fh, void * buf, int count, MPI_Data
}
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_write_all, int, (MPI_File fh, const void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
DARSHAN_WRAPPER_MAP(PMPI_File_write_all, int, (MPI_File fh, const void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
MPI_File_write_all(fh, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_write_all)(MPI_File fh, const void * buf, int count, MPI_Datatype datatype, MPI_Status *status)
#else
DARSHAN_PMPI_MAP(MPI_File_write_all, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
DARSHAN_WRAPPER_MAP(PMPI_File_write_all, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
MPI_File_write_all(fh, buf, count, datatype, status))
DARSHAN_PMPI_MAP(PMPI_File_write_all, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
MPI_File_write_all(fh, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_write_all)(MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status)
#endif
{
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_write_all);
MAP_OR_FAIL(PMPI_File_write_all);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_write_all(fh, buf, count,
ret = __real_PMPI_File_write_all(fh, buf, count,
datatype, status);
tm2 = darshan_core_wtime();
......@@ -504,7 +501,7 @@ int DARSHAN_DECL(MPI_File_write_all)(MPI_File fh, void * buf, int count, MPI_Dat
return(ret);
}
DARSHAN_PMPI_MAP(MPI_File_read_at_all, int, (MPI_File fh, MPI_Offset offset, void * buf,
DARSHAN_WRAPPER_MAP(PMPI_File_read_at_all, int, (MPI_File fh, MPI_Offset offset, void * buf,
int count, MPI_Datatype datatype, MPI_Status * status),
MPI_File_read_at_all(fh,offset,buf,count,datatype,status))
......@@ -514,10 +511,10 @@ int DARSHAN_DECL(MPI_File_read_at_all)(MPI_File fh, MPI_Offset offset, void * bu
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_read_at_all);
MAP_OR_FAIL(PMPI_File_read_at_all);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_read_at_all(fh, offset, buf,
ret = __real_PMPI_File_read_at_all(fh, offset, buf,
count, datatype, status);
tm2 = darshan_core_wtime();
......@@ -529,14 +526,14 @@ int DARSHAN_DECL(MPI_File_read_at_all)(MPI_File fh, MPI_Offset offset, void * bu
}
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_write_at_all, int, (MPI_File fh, MPI_Offset offset, const void * buf,
DARSHAN_WRAPPER_MAP(PMPI_File_write_at_all, int, (MPI_File fh, MPI_Offset offset, const void * buf,
int count, MPI_Datatype datatype, MPI_Status * status),
MPI_File_write_at_all(fh, offset, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_write_at_all)(MPI_File fh, MPI_Offset offset, const void * buf,
int count, MPI_Datatype datatype, MPI_Status * status)
#else
DARSHAN_PMPI_MAP(MPI_File_write_at_all, int, (MPI_File fh, MPI_Offset offset, void * buf,
DARSHAN_WRAPPER_MAP(PMPI_File_write_at_all, int, (MPI_File fh, MPI_Offset offset, void * buf,
int count, MPI_Datatype datatype, MPI_Status * status),
MPI_File_write_at_all(fh, offset, buf, count, datatype, status))
......@@ -547,10 +544,10 @@ int DARSHAN_DECL(MPI_File_write_at_all)(MPI_File fh, MPI_Offset offset, void * b
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_write_at_all);
MAP_OR_FAIL(PMPI_File_write_at_all);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_write_at_all(fh, offset, buf,
ret = __real_PMPI_File_write_at_all(fh, offset, buf,
count, datatype, status);
tm2 = darshan_core_wtime();
......@@ -562,7 +559,7 @@ int DARSHAN_DECL(MPI_File_write_at_all)(MPI_File fh, MPI_Offset offset, void * b
}
DARSHAN_PMPI_MAP(MPI_File_read_shared, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
DARSHAN_WRAPPER_MAP(PMPI_File_read_shared, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
MPI_File_read_shared(fh, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_read_shared)(MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status)
......@@ -570,10 +567,10 @@ int DARSHAN_DECL(MPI_File_read_shared)(MPI_File fh, void * buf, int count, MPI_D
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_read_shared);
MAP_OR_FAIL(PMPI_File_read_shared);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_read_shared(fh, buf, count,
ret = __real_PMPI_File_read_shared(fh, buf, count,
datatype, status);
tm2 = darshan_core_wtime();
......@@ -585,12 +582,12 @@ int DARSHAN_DECL(MPI_File_read_shared)(MPI_File fh, void * buf, int count, MPI_D
}
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_write_shared, int, (MPI_File fh, const void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
DARSHAN_WRAPPER_MAP(PMPI_File_write_shared, int, (MPI_File fh, const void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
MPI_File_write_shared(fh, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_write_shared)(MPI_File fh, const void * buf, int count, MPI_Datatype datatype, MPI_Status *status)
#else
DARSHAN_PMPI_MAP(MPI_File_write_shared, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
DARSHAN_WRAPPER_MAP(PMPI_File_write_shared, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status),
MPI_File_write_shared(fh, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_write_shared)(MPI_File fh, void * buf, int count, MPI_Datatype datatype, MPI_Status *status)
......@@ -599,10 +596,10 @@ int DARSHAN_DECL(MPI_File_write_shared)(MPI_File fh, void * buf, int count, MPI_
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_write_shared);
MAP_OR_FAIL(PMPI_File_write_shared);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_write_shared(fh, buf, count,
ret = __real_PMPI_File_write_shared(fh, buf, count,
datatype, status);
tm2 = darshan_core_wtime();
......@@ -613,7 +610,7 @@ int DARSHAN_DECL(MPI_File_write_shared)(MPI_File fh, void * buf, int count, MPI_
return(ret);
}
DARSHAN_PMPI_MAP(MPI_File_read_ordered, int, (MPI_File fh, void * buf, int count,
DARSHAN_WRAPPER_MAP(PMPI_File_read_ordered, int, (MPI_File fh, void * buf, int count,
MPI_Datatype datatype, MPI_Status * status),
MPI_File_read_ordered(fh, buf, count, datatype, status))
......@@ -623,10 +620,10 @@ int DARSHAN_DECL(MPI_File_read_ordered)(MPI_File fh, void * buf, int count,
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_read_ordered);
MAP_OR_FAIL(PMPI_File_read_ordered);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_read_ordered(fh, buf, count,
ret = __real_PMPI_File_read_ordered(fh, buf, count,
datatype, status);
tm2 = darshan_core_wtime();
......@@ -638,14 +635,14 @@ int DARSHAN_DECL(MPI_File_read_ordered)(MPI_File fh, void * buf, int count,
}
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_write_ordered, int, (MPI_File fh, const void * buf, int count,
DARSHAN_WRAPPER_MAP(PMPI_File_write_ordered, int, (MPI_File fh, const void * buf, int count,
MPI_Datatype datatype, MPI_Status * status),
MPI_File_write_ordered(fh, buf, count, datatype, status))
int DARSHAN_DECL(MPI_File_write_ordered)(MPI_File fh, const void * buf, int count,
MPI_Datatype datatype, MPI_Status * status)
#else
DARSHAN_PMPI_MAP(MPI_File_write_ordered, int, (MPI_File fh, void * buf, int count,
DARSHAN_WRAPPER_MAP(PMPI_File_write_ordered, int, (MPI_File fh, void * buf, int count,
MPI_Datatype datatype, MPI_Status * status),
MPI_File_write_ordered(fh, buf, count, datatype, status))
......@@ -656,10 +653,10 @@ int DARSHAN_DECL(MPI_File_write_ordered)(MPI_File fh, void * buf, int count,
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_write_ordered);
MAP_OR_FAIL(PMPI_File_write_ordered);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_write_ordered(fh, buf, count,
ret = __real_PMPI_File_write_ordered(fh, buf, count,
datatype, status);
tm2 = darshan_core_wtime();
......@@ -671,17 +668,17 @@ int DARSHAN_DECL(MPI_File_write_ordered)(MPI_File fh, void * buf, int count,
}
DARSHAN_PMPI_MAP(MPI_File_read_all_begin, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype),
DARSHAN_WRAPPER_MAP(PMPI_File_read_all_begin, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype),
MPI_File_read_all_begin(fh, buf, count, datatype))
int DARSHAN_DECL(MPI_File_read_all_begin)(MPI_File fh, void * buf, int count, MPI_Datatype datatype)
{
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_read_all_begin);
MAP_OR_FAIL(PMPI_File_read_all_begin);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_read_all_begin(fh, buf, count, datatype);
ret = __real_PMPI_File_read_all_begin(fh, buf, count, datatype);
tm2 = darshan_core_wtime();
MPIIO_PRE_RECORD();
......@@ -692,11 +689,11 @@ int DARSHAN_DECL(MPI_File_read_all_begin)(MPI_File fh, void * buf, int count, MP
}
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_write_all_begin, int, (MPI_File fh, const void * buf, int count, MPI_Datatype datatype),
DARSHAN_WRAPPER_MAP(PMPI_File_write_all_begin, int, (MPI_File fh, const void * buf, int count, MPI_Datatype datatype),
MPI_File_write_all_begin(fh, buf, count, datatype))
int DARSHAN_DECL(MPI_File_write_all_begin)(MPI_File fh, const void * buf, int count, MPI_Datatype datatype)
#else
DARSHAN_PMPI_MAP(MPI_File_write_all_begin, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype),
DARSHAN_WRAPPER_MAP(PMPI_File_write_all_begin, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype),
MPI_File_write_all_begin(fh, buf, count, datatype))
int DARSHAN_DECL(MPI_File_write_all_begin)(MPI_File fh, void * buf, int count, MPI_Datatype datatype)
#endif
......@@ -704,10 +701,10 @@ int DARSHAN_DECL(MPI_File_write_all_begin)(MPI_File fh, void * buf, int count, M
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_write_all_begin);
MAP_OR_FAIL(PMPI_File_write_all_begin);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_write_all_begin(fh, buf, count, datatype);
ret = __real_PMPI_File_write_all_begin(fh, buf, count, datatype);
tm2 = darshan_core_wtime();
MPIIO_PRE_RECORD();
......@@ -717,7 +714,7 @@ int DARSHAN_DECL(MPI_File_write_all_begin)(MPI_File fh, void * buf, int count, M
return(ret);
}
DARSHAN_PMPI_MAP(MPI_File_read_at_all_begin, int, (MPI_File fh, MPI_Offset offset, void * buf,
DARSHAN_WRAPPER_MAP(PMPI_File_read_at_all_begin, int, (MPI_File fh, MPI_Offset offset, void * buf,
int count, MPI_Datatype datatype), MPI_File_read_at_all_begin(fh, offset, buf, count,
datatype))
int DARSHAN_DECL(MPI_File_read_at_all_begin)(MPI_File fh, MPI_Offset offset, void * buf,
......@@ -726,10 +723,10 @@ int DARSHAN_DECL(MPI_File_read_at_all_begin)(MPI_File fh, MPI_Offset offset, voi
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_read_at_all_begin);
MAP_OR_FAIL(PMPI_File_read_at_all_begin);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_read_at_all_begin(fh, offset, buf,
ret = __real_PMPI_File_read_at_all_begin(fh, offset, buf,
count, datatype);
tm2 = darshan_core_wtime();
......@@ -741,13 +738,13 @@ int DARSHAN_DECL(MPI_File_read_at_all_begin)(MPI_File fh, MPI_Offset offset, voi
}
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_write_at_all_begin, int, (MPI_File fh, MPI_Offset offset, const void * buf,
DARSHAN_WRAPPER_MAP(PMPI_File_write_at_all_begin, int, (MPI_File fh, MPI_Offset offset, const void * buf,
int count, MPI_Datatype datatype), MPI_File_write_at_all_begin( fh, offset, buf, count, datatype))
int DARSHAN_DECL(MPI_File_write_at_all_begin)(MPI_File fh, MPI_Offset offset, const void * buf,
int count, MPI_Datatype datatype)
#else
DARSHAN_PMPI_MAP(MPI_File_write_at_all_begin, int, (MPI_File fh, MPI_Offset offset, void * buf,
DARSHAN_WRAPPER_MAP(PMPI_File_write_at_all_begin, int, (MPI_File fh, MPI_Offset offset, void * buf,
int count, MPI_Datatype datatype), MPI_File_write_at_all_begin( fh, offset, buf, count, datatype))
int DARSHAN_DECL(MPI_File_write_at_all_begin)(MPI_File fh, MPI_Offset offset, void * buf,
......@@ -757,10 +754,10 @@ int DARSHAN_DECL(MPI_File_write_at_all_begin)(MPI_File fh, MPI_Offset offset, vo
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_write_at_all_begin);
MAP_OR_FAIL(PMPI_File_write_at_all_begin);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_write_at_all_begin(fh, offset,
ret = __real_PMPI_File_write_at_all_begin(fh, offset,
buf, count, datatype);
tm2 = darshan_core_wtime();
......@@ -772,17 +769,17 @@ int DARSHAN_DECL(MPI_File_write_at_all_begin)(MPI_File fh, MPI_Offset offset, vo
}
DARSHAN_PMPI_MAP(MPI_File_read_ordered_begin, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype),
DARSHAN_WRAPPER_MAP(PMPI_File_read_ordered_begin, int, (MPI_File fh, void * buf, int count, MPI_Datatype datatype),
MPI_File_read_ordered_begin(fh, buf, count, datatype))
int DARSHAN_DECL(MPI_File_read_ordered_begin)(MPI_File fh, void * buf, int count, MPI_Datatype datatype)
{
int ret;
double tm1, tm2;
MAP_OR_FAIL(MPI_File_read_ordered_begin);
MAP_OR_FAIL(PMPI_File_read_ordered_begin);
tm1 = darshan_core_wtime();
ret = __real_MPI_File_read_ordered_begin(fh, buf, count,
ret = __real_PMPI_File_read_ordered_begin(fh, buf, count,
datatype);
tm2 = darshan_core_wtime();
......@@ -794,7 +791,7 @@ int DARSHAN_DECL(MPI_File_read_ordered_begin)(MPI_File fh, void * buf, int count
}
#ifdef HAVE_MPIIO_CONST
DARSHAN_PMPI_MAP(MPI_File_write_ordered_begin, int, (MPI_File fh, const void * buf, int count, MPI_Datatype datatype),
DARSHAN_WRAPPER_MAP(PMPI_File_write_ordered_begin, int, (MPI_File fh, const void * buf, int count, MPI_Datatype datatype),
MPI_File_write_ordered_begin(fh, buf, count, datatype))
int DARSHAN_DECL(MPI_File_write_ordered_begin)(MPI_File fh, const void * buf, int count