darshan-apmpi.c 26.9 KB
Newer Older
Sudheer Chunduri's avatar
Sudheer Chunduri committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Copyright (C) 2017 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#define csJOBID_ENV_STR "ALPS_APP_ID"

#include "darshan-runtime-config.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pthread.h>
#include <assert.h>
#include <papi.h>

#include "uthash.h"
#include "darshan.h"
#include "darshan-dynamic.h"
Sudheer Chunduri's avatar
Sudheer Chunduri committed
22
23
24
#include "darshan-apmpi-log-format.h"

#include "darshan-apmpi-utils.h"
Sudheer Chunduri's avatar
Sudheer Chunduri committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

typedef long long ap_bytes_t;

#define BYTECOUNT(TYPE, COUNT) \
          int tsize; \
          PMPI_Type_size(TYPE, &tsize); \
          ap_bytes_t bytes = (COUNT) * tsize

#define BYTECOUNTND(TYPE, COUNT) \
          int tsize2; \
          PMPI_Type_size(TYPE, &tsize2); \
          bytes = (COUNT) * tsize2

/* increment histogram bucket depending on the given __value
 *
 * NOTE: This macro can be used to build a histogram of access
 * sizes, offsets, etc. It assumes a 8-bucket histogram, with
 * __bucket_base_p pointing to the first counter in the sequence
 * of buckets (i.e., the smallest bucket). The size ranges of each
 * bucket are:
 *      * 0 - 256 bytes
 *      * 256 - 1 KiB
 *      * 1 KiB - 32 KiB
 *      * 32 KiB - 256 KiB
 *      * 256 KiB - 1 MiB
 *      * 1 MiB - 4 MiB
 *      * 4 MiB +
 */
#define DARSHAN_MSG_BUCKET_INC(__bucket_base_p, __value) do {\
    if(__value < 257) \
        *(__bucket_base_p) += 1; \
    else if(__value < 1025) \
        *(__bucket_base_p + 1) += 1; \
58
    else if(__value < 8193) \
Sudheer Chunduri's avatar
Sudheer Chunduri committed
59
60
61
62
63
64
        *(__bucket_base_p + 2) += 1; \
    else if(__value < 262145) \
        *(__bucket_base_p + 3) += 1; \
    else if(__value < 1048577) \
        *(__bucket_base_p + 4) += 1; \
    else \
65
        *(__bucket_base_p + 5) += 1; \
Sudheer Chunduri's avatar
Sudheer Chunduri committed
66
67
68
} while(0)


Sudheer Chunduri's avatar
Sudheer Chunduri committed
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
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));
#if 0
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_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_Reduce, int,  (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
#endif
DARSHAN_FORWARD_DECL(PMPI_Allreduce, int,  (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
#if 0
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_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, ());
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_Reduce_scatter, int, (const void *sendbuf, void *recvbuf, const int recvcounts[],
                       MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Scan, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
             MPI_Op op, MPI_Comm comm));
DARSHAN_FORWARD_DECL(PMPI_Exscan, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
               MPI_Op op, MPI_Comm comm));
#endif
//DARSHAN_FORWARD_DECL(PMPI_ , int, ());
Sudheer Chunduri's avatar
Sudheer Chunduri committed
109
110
111
/*
 * <Description>
 * 
Sudheer Chunduri's avatar
Sudheer Chunduri committed
112
 * This module does intercept system calls. 
Sudheer Chunduri's avatar
Sudheer Chunduri committed
113
114
115
116
117
118
 */


/*
 * Global runtime struct for tracking data needed at runtime
 */
Sudheer Chunduri's avatar
Sudheer Chunduri committed
119
struct apmpi_runtime
Sudheer Chunduri's avatar
Sudheer Chunduri committed
120
{
Sudheer Chunduri's avatar
Sudheer Chunduri committed
121
122
    struct darshan_apmpi_perf_record *perf_record;
    darshan_record_id rec_id;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
123
124
};

Sudheer Chunduri's avatar
Sudheer Chunduri committed
125
126
static struct apmpi_runtime *apmpi_runtime = NULL;
static pthread_mutex_t apmpi_runtime_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
127
128
129
130

/* my_rank indicates the MPI rank of this process */
static int my_rank = -1;

Sudheer Chunduri's avatar
Sudheer Chunduri committed
131
132
/* internal helper functions for the apmpi module */
void apmpi_runtime_initialize(void);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
133
134
135

/* forward declaration for shutdown function needed to interface with darshan-core */
#ifdef HAVE_MPI
Sudheer Chunduri's avatar
Sudheer Chunduri committed
136
static void apmpi_mpi_redux(
Sudheer Chunduri's avatar
Sudheer Chunduri committed
137
138
139
140
141
    void *buffer, 
    MPI_Comm mod_comm,
    darshan_record_id *shared_recs, 
    int shared_rec_count);
#endif
Sudheer Chunduri's avatar
Sudheer Chunduri committed
142
static void apmpi_shutdown(
Sudheer Chunduri's avatar
Sudheer Chunduri committed
143
144
145
        void **buffer, 
        int *size);

Sudheer Chunduri's avatar
Sudheer Chunduri committed
146
147
148
/* macros for obtaining/releasing the apmpi module lock */
#define APMPI_LOCK() pthread_mutex_lock(&apmpi_runtime_mutex)
#define APMPI_UNLOCK() pthread_mutex_unlock(&apmpi_runtime_mutex)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
149
150

/*
Sudheer Chunduri's avatar
Sudheer Chunduri committed
151
 * Initialize counters 
Sudheer Chunduri's avatar
Sudheer Chunduri committed
152
153
154
155
156
 */
static void initialize_counters (void)
{
    int i;
    int code = 0;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
157
    for (i = 0; i < APMPI_NUM_INDICES; i++)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
158
    {
Sudheer Chunduri's avatar
Sudheer Chunduri committed
159
160
161
162
163
        apmpi_runtime->perf_record->counters[i] = 0; 
    }
    for (i = 0; i < APMPI_F_NUM_INDICES; i++)
    {
        apmpi_runtime->perf_record->fcounters[i] = 0; 
Sudheer Chunduri's avatar
Sudheer Chunduri committed
164
165
166
167
168
169
170
171
172
173
174
175
176
    }
    return;
}

static void finalize_counters (void)
{

    return;
}

/*
 * Function which updates all the counter data
 */
Sudheer Chunduri's avatar
Sudheer Chunduri committed
177
static void capture(struct darshan_apmpi_perf_record *rec,
Sudheer Chunduri's avatar
Sudheer Chunduri committed
178
179
180
181
182
183
184
185
                    darshan_record_id rec_id)
{
    rec->base_rec.id = rec_id;
    rec->base_rec.rank = my_rank;

    return;
}

Sudheer Chunduri's avatar
Sudheer Chunduri committed
186
void apmpi_runtime_initialize()
Sudheer Chunduri's avatar
Sudheer Chunduri committed
187
{
Sudheer Chunduri's avatar
Sudheer Chunduri committed
188
189
    int apmpi_buf_size;
    char rec_name[128];
Sudheer Chunduri's avatar
Sudheer Chunduri committed
190
191
192

    darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
Sudheer Chunduri's avatar
Sudheer Chunduri committed
193
        .mod_redux_func = &apmpi_mpi_redux,
Sudheer Chunduri's avatar
Sudheer Chunduri committed
194
#endif
Sudheer Chunduri's avatar
Sudheer Chunduri committed
195
        .mod_shutdown_func = &apmpi_shutdown
Sudheer Chunduri's avatar
Sudheer Chunduri committed
196
197
        };

Sudheer Chunduri's avatar
Sudheer Chunduri committed
198
    APMPI_LOCK();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
199
200

    /* don't do anything if already initialized */
Sudheer Chunduri's avatar
Sudheer Chunduri committed
201
    if(apmpi_runtime)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
202
    {
Sudheer Chunduri's avatar
Sudheer Chunduri committed
203
        APMPI_UNLOCK();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
204
205
206
        return;
    }

Sudheer Chunduri's avatar
Sudheer Chunduri committed
207
    apmpi_buf_size = sizeof(struct darshan_apmpi_perf_record);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
208

Sudheer Chunduri's avatar
Sudheer Chunduri committed
209
    /* register the apmpi module with the darshan-core component */
Sudheer Chunduri's avatar
Sudheer Chunduri committed
210
    darshan_core_register_module(
Sudheer Chunduri's avatar
Sudheer Chunduri committed
211
        APMPI_MOD,
Sudheer Chunduri's avatar
Sudheer Chunduri committed
212
        mod_funcs,
Sudheer Chunduri's avatar
Sudheer Chunduri committed
213
        &apmpi_buf_size,
Sudheer Chunduri's avatar
Sudheer Chunduri committed
214
215
216
        &my_rank,
        NULL);

Sudheer Chunduri's avatar
Sudheer Chunduri committed
217
218
    /* not enough memory to fit apmpi module record */
    if(apmpi_buf_size < sizeof(struct darshan_apmpi_perf_record))
Sudheer Chunduri's avatar
Sudheer Chunduri committed
219
    {
Sudheer Chunduri's avatar
Sudheer Chunduri committed
220
        darshan_core_unregister_module(APMPI_MOD);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
221
        APMPI_UNLOCK();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
222
223
224
225
        return;
    }

    /* initialize module's global state */
Sudheer Chunduri's avatar
Sudheer Chunduri committed
226
227
    apmpi_runtime = malloc(sizeof(*apmpi_runtime));
    if(!apmpi_runtime)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
228
    {
Sudheer Chunduri's avatar
Sudheer Chunduri committed
229
        darshan_core_unregister_module(APMPI_MOD);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
230
        APMPI_UNLOCK();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
231
232
        return;
    }
Sudheer Chunduri's avatar
Sudheer Chunduri committed
233
    memset(apmpi_runtime, 0, sizeof(*apmpi_runtime));
234
235
236
    //sprintf(rec_name, "darshan-apmpi-%d", my_rank);
    //apmpi_runtime->rec_id = darshan_core_gen_record_id(rec_name);
    apmpi_runtime->rec_id = darshan_core_gen_record_id("APMPI"); //record name
Sudheer Chunduri's avatar
Sudheer Chunduri committed
237
238
239
240

    apmpi_runtime->perf_record = darshan_core_register_record(
        apmpi_runtime->rec_id,
        "APMPI",
Sudheer Chunduri's avatar
Sudheer Chunduri committed
241
        APMPI_MOD,
Sudheer Chunduri's avatar
Sudheer Chunduri committed
242
        sizeof(struct darshan_apmpi_perf_record),
Sudheer Chunduri's avatar
Sudheer Chunduri committed
243
        NULL);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
244
    if(!(apmpi_runtime->perf_record))
Sudheer Chunduri's avatar
Sudheer Chunduri committed
245
    {
Sudheer Chunduri's avatar
Sudheer Chunduri committed
246
        darshan_core_unregister_module(APMPI_MOD);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
247
248
249
        free(apmpi_runtime);
        apmpi_runtime = NULL;
        APMPI_UNLOCK();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
250
251
252
253
254
        return;
    }

    initialize_counters();

Sudheer Chunduri's avatar
Sudheer Chunduri committed
255
    APMPI_UNLOCK();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
256
257
258

    return;
}
Sudheer Chunduri's avatar
Sudheer Chunduri committed
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
#if 0
static void apmpi_shared_record_variance(MPI_Comm mod_comm,
    struct darshan_apmpi_perf_record *inrec_array, struct darshan_apmpi_perf_record *outrec_array,
    int shared_rec_count)
{
    MPI_Datatype var_dt;
    MPI_Op var_op;
    int i;
    struct darshan_variance_dt *var_send_buf = NULL;
    struct darshan_variance_dt *var_recv_buf = NULL;

    PMPI_Type_contiguous(sizeof(struct darshan_variance_dt),
        MPI_BYTE, &var_dt);
    PMPI_Type_commit(&var_dt);

    PMPI_Op_create(darshan_variance_reduce, 1, &var_op);

    var_send_buf = malloc(shared_rec_count * sizeof(struct darshan_variance_dt));
    if(!var_send_buf)
        return;

    if(my_rank == 0)
    {   
        var_recv_buf = malloc(shared_rec_count * sizeof(struct darshan_variance_dt));

        if(!var_recv_buf)
            return;
    }   

    /* get total i/o time variances for shared records */

    for(i=0; i<shared_rec_count; i++)
    {   
        var_send_buf[i].n = 1;
        var_send_buf[i].S = 0;
        var_send_buf[i].T = inrec_array[i].fcounters[MPIIO_F_READ_TIME] +
                            inrec_array[i].fcounters[MPIIO_F_WRITE_TIME] +
                            inrec_array[i].fcounters[MPIIO_F_META_TIME];
    }   

    PMPI_Reduce(var_send_buf, var_recv_buf, shared_rec_count,
        var_dt, var_op, 0, mod_comm);

    if(my_rank == 0)
    {   
        for(i=0; i<shared_rec_count; i++)
        {   
            outrec_array[i].fcounters[MPIIO_F_VARIANCE_RANK_TIME] =
                (var_recv_buf[i].S / var_recv_buf[i].n);
        }   
    }   

    /* get total bytes moved variances for shared records */

    for(i=0; i<shared_rec_count; i++)
    {   
        var_send_buf[i].n = 1;
        var_send_buf[i].S = 0;
        var_send_buf[i].T = (double)
                            inrec_array[i].counters[MPIIO_BYTES_READ] +
                            inrec_array[i].counters[MPIIO_BYTES_WRITTEN];
    }

    PMPI_Reduce(var_send_buf, var_recv_buf, shared_rec_count,
        var_dt, var_op, 0, mod_comm);

    if(my_rank == 0)
    {
        for(i=0; i<shared_rec_count; i++)
        {
            outrec_array[i].fcounters[MPIIO_F_VARIANCE_RANK_BYTES] =
                (var_recv_buf[i].S / var_recv_buf[i].n);
        }
    }
    
    PMPI_Type_free(&var_dt);
    PMPI_Op_free(&var_op);
    free(var_send_buf);
    free(var_recv_buf);

    return;
}
#endif

Sudheer Chunduri's avatar
Sudheer Chunduri committed
343
344
345
346
347

/********************************************************************************
 * shutdown function exported by this module for coordinating with darshan-core *
 ********************************************************************************/

Sudheer Chunduri's avatar
Sudheer Chunduri committed
348
/* Pass data for the apmpi module back to darshan-core to log to file. */
Sudheer Chunduri's avatar
Sudheer Chunduri committed
349
//#ifdef HAVE_MPI
Sudheer Chunduri's avatar
Sudheer Chunduri committed
350
351
static void apmpi_mpi_redux(
    void *apmpi_buf,
Sudheer Chunduri's avatar
Sudheer Chunduri committed
352
353
354
355
356
    MPI_Comm mod_comm,
    darshan_record_id *shared_recs,
    int shared_rec_count)
{
    int i;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
357
358
359
360
361
    struct darshan_apmpi_perf_record *red_send_buf = NULL;
    struct darshan_apmpi_perf_record *red_recv_buf = NULL;
    MPI_Datatype red_type;
    MPI_Op red_op;

Sudheer Chunduri's avatar
Sudheer Chunduri committed
362
363
364
    APMPI_LOCK();

    if (!apmpi_runtime)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
365
    {
Sudheer Chunduri's avatar
Sudheer Chunduri committed
366
        APMPI_UNLOCK();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
367
368
369
        return;
    }
    /* collect perf counters */
Sudheer Chunduri's avatar
Sudheer Chunduri committed
370
371
    capture(apmpi_runtime->perf_record, apmpi_runtime->rec_id);
    
Sudheer Chunduri's avatar
Sudheer Chunduri committed
372
    APMPI_UNLOCK();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
373

Sudheer Chunduri's avatar
Sudheer Chunduri committed
374
375
    return;
}
Sudheer Chunduri's avatar
Sudheer Chunduri committed
376

Sudheer Chunduri's avatar
Sudheer Chunduri committed
377
378
379
380
381
382
//#endif
static void apmpi_shutdown(
    void **apmpi_buf,
    int *apmpi_buf_sz)
{
    int apmpi_rec_count;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
383

Sudheer Chunduri's avatar
Sudheer Chunduri committed
384
385
386
387
388
389
    APMPI_LOCK();
    assert(apmpi_runtime);
    *apmpi_buf_sz = sizeof( *apmpi_runtime->perf_record);
    finalize_counters();
    free(apmpi_runtime);
    apmpi_runtime = NULL;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
390

Sudheer Chunduri's avatar
Sudheer Chunduri committed
391
392
393
    APMPI_UNLOCK();
    return;
}
Sudheer Chunduri's avatar
Sudheer Chunduri committed
394

Sudheer Chunduri's avatar
Sudheer Chunduri committed
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
#define APMPI_PRE_RECORD() do { \
       APMPI_LOCK(); \
       if(!darshan_core_disabled_instrumentation()) { \
           if(!apmpi_runtime) { \
               apmpi_runtime_initialize(); \
           } \
           if(apmpi_runtime) break; \
       } \
       APMPI_UNLOCK(); \
       return(ret); \
   } while(0)

#define APMPI_POST_RECORD() do { \
       APMPI_UNLOCK(); \
   } while(0)

/**********************************************************
 *        Wrappers for MPI functions of interest       * 
 **********************************************************/

int DARSHAN_DECL(MPI_Send)(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
             MPI_Comm comm)
{
    int ret;
    double tm1, tm2;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
420
    int size;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
421
422
423
424
425
426
427
428

    MAP_OR_FAIL(PMPI_Send);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Send(buf, count, datatype, dest, tag, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
    // Lock around the count - lock only if MPI_THREAD_MULTIPLE is used ... locking mutex
Sudheer Chunduri's avatar
Sudheer Chunduri committed
429
    apmpi_runtime->perf_record->counters[MPI_SEND_CALL_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
430
431
432
    BYTECOUNT(datatype, count);
    apmpi_runtime->perf_record->counters[MPI_SEND_TOTAL_BYTES] += bytes;
    DARSHAN_MSG_BUCKET_INC(&(apmpi_runtime->perf_record->counters[MPI_SEND_MSG_SIZE_AGG_0_256]), bytes);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
433
    apmpi_runtime->perf_record->fcounters[MPI_SEND_TOTAL_TIME]+=(tm2-tm1);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
434
435
436
437
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Send, int,  (const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm), MPI_Send)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
438

Sudheer Chunduri's avatar
Sudheer Chunduri committed
439
440
441
442
443
444
445
446
447
448
449
450
int DARSHAN_DECL(MPI_Recv)(void *buf, int count, MPI_Datatype datatype, int source, int tag,
             MPI_Comm comm, MPI_Status *status)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Recv);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Recv(buf, count, datatype, source, tag, comm, status);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
451
    apmpi_runtime->perf_record->counters[MPI_RECV_CALL_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
452
453
454
    BYTECOUNT(datatype, count);
    apmpi_runtime->perf_record->counters[MPI_RECV_TOTAL_BYTES] += bytes;
    DARSHAN_MSG_BUCKET_INC(&(apmpi_runtime->perf_record->counters[MPI_RECV_MSG_SIZE_AGG_0_256]), bytes);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
455
    apmpi_runtime->perf_record->fcounters[MPI_RECV_TOTAL_TIME]+=(tm2-tm1);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Recv, int,  (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status), MPI_Recv)
#if 0
int DARSHAN_DECL(MPI_Isend)(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
             MPI_Comm comm, MPI_Request *request)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Isend);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Isend(buf, count, datatype, dest, tag, comm, request);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
473
    apmpi_runtime->perf_record->counters[MPI_ISEND_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
474
475
    APMPI_POST_RECORD();
    return ret;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
476
}
Sudheer Chunduri's avatar
Sudheer Chunduri committed
477
DARSHAN_WRAPPER_MAP(PMPI_Isend, int,  (const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request), MPI_Isend)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
478

Sudheer Chunduri's avatar
Sudheer Chunduri committed
479
480
481
482
483
484
485
486
487
488
489
490
int DARSHAN_DECL(MPI_Irecv)(void *buf, int count, MPI_Datatype datatype, int source, int tag,
             MPI_Comm comm, MPI_Request * request)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Irecv);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Irecv(buf, count, datatype, source, tag, comm, request);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
491
    apmpi_runtime->perf_record->counters[MPI_IRECV_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
492
493
494
495
496
497
498
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Irecv, int,  (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request), MPI_Irecv)


int DARSHAN_DECL(MPI_Barrier)(MPI_Comm comm)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
499
{
Sudheer Chunduri's avatar
Sudheer Chunduri committed
500
501
502
503
504
505
506
507
508
    int ret;
    double tm1, tm2;
    
    MAP_OR_FAIL(PMPI_Barrier);
  
    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Barrier(comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
509
    apmpi_runtime->perf_record->counters[MPI_BARRIER_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
510
511
512
513
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Barrier, int,  (MPI_Comm comm), MPI_Barrier)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
514

Sudheer Chunduri's avatar
Sudheer Chunduri committed
515
516
517
518
int DARSHAN_DECL(MPI_Bcast)(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
{
    int ret;
    double tm1, tm2;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
519
    
Sudheer Chunduri's avatar
Sudheer Chunduri committed
520
521
522
523
524
525
    MAP_OR_FAIL(PMPI_Bcast);
  
    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Bcast(buffer, count, datatype, root, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
526
    apmpi_runtime->perf_record->counters[MPI_BCAST_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Bcast, int, (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm), MPI_Bcast)

int DARSHAN_DECL(MPI_Reduce)(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
             MPI_Comm comm)
{
    int ret;
    double tm1, tm2;
    
    MAP_OR_FAIL(PMPI_Reduce);
  
    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
544
    apmpi_runtime->perf_record->counters[MPI_REDUCE_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
545
546
547
548
549
550
551
552
553
554
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Reduce, int,  (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm), MPI_Reduce)
#endif
int DARSHAN_DECL(MPI_Allreduce)(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
             MPI_Comm comm)
{
    int ret;
    double tm1, tm2;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
555
    
Sudheer Chunduri's avatar
Sudheer Chunduri committed
556
557
558
559
560
561
    MAP_OR_FAIL(PMPI_Allreduce);
  
    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
562
    apmpi_runtime->perf_record->counters[MPI_ALLREDUCE_CALL_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
563
564
565
    BYTECOUNT(datatype, count);
    apmpi_runtime->perf_record->counters[MPI_ALLREDUCE_TOTAL_BYTES] += bytes;
    DARSHAN_MSG_BUCKET_INC(&(apmpi_runtime->perf_record->counters[MPI_ALLREDUCE_MSG_SIZE_AGG_0_256]), bytes);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
566
    apmpi_runtime->perf_record->fcounters[MPI_ALLREDUCE_TOTAL_TIME]+=(tm2-tm1);
Sudheer Chunduri's avatar
Sudheer Chunduri committed
567
568
569
570
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Allreduce, int,  (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm), MPI_Allreduce)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
571

Sudheer Chunduri's avatar
Sudheer Chunduri committed
572
573
574
575
576
577
578
579
580
581
582
583
584
585
#if 0
int DARSHAN_DECL(MPI_Alltoall)(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
                 MPI_Comm comm)
{
    int ret;
    double tm1, tm2;
    
    MAP_OR_FAIL(PMPI_Alltoall);
  
    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
586
    apmpi_runtime->perf_record->counters[MPI_ALLTOALL_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
587
588
589
590
591
592
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Alltoall, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
                 MPI_Comm comm), MPI_Alltoall)
Sudheer Chunduri's avatar
Sudheer Chunduri committed
593

Sudheer Chunduri's avatar
Sudheer Chunduri committed
594
595
596
597
598
599
600
601
602
603
604
605
606
int DARSHAN_DECL(MPI_Alltoallv)(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)
{
    int ret;
    double tm1, tm2;
    
    MAP_OR_FAIL(PMPI_Alltoallv);
  
    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
607
    apmpi_runtime->perf_record->counters[MPI_ALLTOALLV_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(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), MPI_Alltoallv)

int DARSHAN_DECL(MPI_Allgatherv)(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                   void *recvbuf, const int *recvcounts, const int *displs,
                   MPI_Datatype recvtype, MPI_Comm comm)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Allgatherv);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
628
    apmpi_runtime->perf_record->counters[MPI_ALLGATHERV_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
    APMPI_POST_RECORD();
    return ret;
}

int DARSHAN_DECL(MPI_Allgather)(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
                  MPI_Comm comm)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Allgather);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
646
    apmpi_runtime->perf_record->counters[MPI_ALLGATHER_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Allgather, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
                  MPI_Comm comm), MPI_Allgather)

DARSHAN_WRAPPER_MAP(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), MPI_Allgatherv)

int DARSHAN_DECL(MPI_Gather)(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
               void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Gather);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
670
    apmpi_runtime->perf_record->counters[MPI_GATHER_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Gather , int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype,
               void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm), MPI_Gather )

int DARSHAN_DECL(MPI_Gatherv)(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                void *recvbuf, const int *recvcounts, const int *displs,
                MPI_Datatype recvtype, int root, MPI_Comm comm)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Gatherv);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
690
    apmpi_runtime->perf_record->counters[MPI_GATHERV_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(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), MPI_Gatherv)

int DARSHAN_DECL(MPI_Scatter)(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
               void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
               MPI_Comm comm)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Scatter);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
711
    apmpi_runtime->perf_record->counters[MPI_SCATTER_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Scatter, int, (const void *sendbuf, int sendcount, MPI_Datatype sendtype,
               void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
               MPI_Comm comm), MPI_Scatter)

int DARSHAN_DECL(MPI_Scatterv)(const void *sendbuf, const int *sendcounts, const int *displs,
                 MPI_Datatype sendtype, void *recvbuf, int recvcount,
                 MPI_Datatype recvtype,
                 int root, MPI_Comm comm)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Scatterv);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
733
    apmpi_runtime->perf_record->counters[MPI_SCATTERV_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
734
735
    APMPI_POST_RECORD();
    return ret;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
736
}
Sudheer Chunduri's avatar
Sudheer Chunduri committed
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
DARSHAN_WRAPPER_MAP(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), MPI_Scatterv)

int DARSHAN_DECL(MPI_Reduce_scatter)(const void *sendbuf, void *recvbuf, const int recvcounts[],
                       MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Reduce_scatter);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Reduce_scatter(sendbuf, recvbuf, recvcounts,
                       datatype, op, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
755
    apmpi_runtime->perf_record->counters[MPI_REDUCE_SCATTER_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Reduce_scatter, int, (const void *sendbuf, void *recvbuf, const int recvcounts[],
                       MPI_Datatype datatype, MPI_Op op, MPI_Comm comm), MPI_Reduce_scatter)

int DARSHAN_DECL(MPI_Scan)(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
             MPI_Op op, MPI_Comm comm)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Scan);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Scan(sendbuf, recvbuf, count, datatype, op, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
774
    apmpi_runtime->perf_record->counters[MPI_SCAN_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Scan, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
             MPI_Op op, MPI_Comm comm), MPI_Scan )
int DARSHAN_DECL(MPI_Exscan)(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
               MPI_Op op, MPI_Comm comm)
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_Exscan);

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_Exscan(sendbuf, recvbuf, count, datatype, op, comm);
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
792
    apmpi_runtime->perf_record->counters[MPI_EXSCAN_COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_Exscan, int, (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
               MPI_Op op, MPI_Comm comm), MPI_Exscan)
#endif
/*
int DARSHAN_DECL(MPI_ )()
{
    int ret;
    double tm1, tm2;

    MAP_OR_FAIL(PMPI_ );

    tm1 = darshan_core_wtime();
    ret = __real_PMPI_();
    tm2 = darshan_core_wtime();
    APMPI_PRE_RECORD();
Sudheer Chunduri's avatar
Sudheer Chunduri committed
811
    apmpi_runtime->perf_record->counters[MPI_ _COUNT]++;
Sudheer Chunduri's avatar
Sudheer Chunduri committed
812
813
814
815
816
817
    APMPI_POST_RECORD();
    return ret;
}
DARSHAN_WRAPPER_MAP(PMPI_ , int, (), MPI_ )
*/

Sudheer Chunduri's avatar
Sudheer Chunduri committed
818
819
820
821
822
823
824
825
826

/*
 * Local variables:
 *  c-indent-level: 4
 *  c-basic-offset: 4
 * End:
 *
 * vim: ts=8 sts=4 sw=4 expandtab
 */