Commit 158337c9 authored by Shane Snyder's avatar Shane Snyder

add code for the pnetcdf module

parent b6807fcc
/*
* Copyright (C) 2015 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#ifndef __DARSHAN_PNETCDF_LOG_FORMAT_H
#define __DARSHAN_PNETCDF_LOG_FORMAT_H
#include "darshan-log-format.h"
#define PNETCDF_COUNTERS \
/* count of PNETCDF independent opens */\
X(PNETCDF_INDEP_OPENS) \
/* count of PNETCDF collective opens */\
X(PNETCDF_COLL_OPENS) \
/* end of counters */\
X(PNETCDF_NUM_INDICES)
#define PNETCDF_F_COUNTERS \
/* timestamp of first open */\
X(PNETCDF_F_OPEN_TIMESTAMP) \
/* timestamp of last close */\
X(PNETCDF_F_CLOSE_TIMESTAMP) \
/* end of counters*/\
X(PNETCDF_F_NUM_INDICES)
#define X(a) a,
/* integer statistics for PNETCDF file records */
enum darshan_pnetcdf_indices
{
PNETCDF_COUNTERS
};
/* floating point statistics for PNETCDF file records */
enum darshan_pnetcdf_f_indices
{
PNETCDF_F_COUNTERS
};
#undef X
/* file record structure for PNETCDF files. a record is created and stored for
* every PNETCDF file opened by the original application. For the PNETCDF module,
* the record includes:
* - a corresponding record identifier (created by hashing the file path)
* - the rank of the process which opened the file (-1 for shared files)
* - integer file I/O statistics (open, read/write counts, etc)
* - floating point I/O statistics (timestamps, cumulative timers, etc.)
*/
struct darshan_pnetcdf_file
{
darshan_record_id f_id;
int64_t rank;
int64_t counters[PNETCDF_NUM_INDICES];
double fcounters[PNETCDF_F_NUM_INDICES];
};
#endif /* __DARSHAN_PNETCDF_LOG_FORMAT_H */
......@@ -75,6 +75,12 @@ lib/darshan-hdf5.o: lib/darshan-hdf5.c darshan.h $(DARSHAN_LOG_FORMAT) $(srcdir)
lib/darshan-hdf5.po: lib/darshan-hdf5.c darshan.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-hdf5-log-format.h | lib
$(CC) $(CFLAGS_SHARED) -c $< -o $@
lib/darshan-pnetcdf.o: lib/darshan-pnetcdf.c darshan.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-pnetcdf-log-format.h | lib
$(CC) $(CFLAGS) -c $< -o $@
lib/darshan-pnetcdf.po: lib/darshan-pnetcdf.c darshan.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-pnetcdf-log-format.h | lib
$(CC) $(CFLAGS_SHARED) -c $< -o $@
lib/lookup3.o: lib/lookup3.c
$(CC) $(CFLAGS) -c $< -o $@
......@@ -87,13 +93,10 @@ lib/lookup8.o: lib/lookup8.c
lib/lookup8.po: lib/lookup8.c
$(CC) $(CFLAGS_SHARED) -c $< -o $@
#%.i: %.c
# $(CC) -E $(CFLAGS) -c $< -o $@
lib/libdarshan.a: lib/darshan-core-init-finalize.o lib/darshan-core.o lib/darshan-common.o lib/darshan-posix.o lib/darshan-mpiio.o lib/darshan-hdf5.o lib/lookup3.o lib/lookup8.o
lib/libdarshan.a: lib/darshan-core-init-finalize.o lib/darshan-core.o lib/darshan-common.o lib/darshan-posix.o lib/darshan-mpiio.o lib/darshan-hdf5.o lib/darshan-pnetcdf.o lib/lookup3.o lib/lookup8.o
ar rcs $@ $^
lib/libdarshan.so: lib/darshan-core-init-finalize.po lib/darshan-core.po lib/darshan-common.po lib/darshan-posix.po lib/darshan-mpiio.po lib/darshan-hdf5.po lib/lookup3.po lib/lookup8.po
lib/libdarshan.so: lib/darshan-core-init-finalize.po lib/darshan-core.po lib/darshan-common.po lib/darshan-posix.po lib/darshan-mpiio.po lib/darshan-hdf5.po lib/darshan-pnetcdf.po lib/lookup3.po lib/lookup8.po
$(CC) $(CFLAGS_SHARED) $(LDFLAGS) -o $@ $^ -lpthread -lrt -lz -ldl
install:: all
......
......@@ -497,7 +497,7 @@ static void hdf5_get_output_data(
/* make *send_buf point to the shared files at the end of sorted array */
red_send_buf =
&(hdf5_runtime->file_record_array[hdf5_runtime->file_array_ndx-(shared_rec_count)]);
&(hdf5_runtime->file_record_array[hdf5_runtime->file_array_ndx-shared_rec_count]);
/* allocate memory for the reduction output on rank 0 */
if(my_rank == 0)
......
......@@ -1369,7 +1369,7 @@ static void mpiio_get_output_data(
/* make *send_buf point to the shared files at the end of sorted array */
red_send_buf =
&(mpiio_runtime->file_record_array[mpiio_runtime->file_array_ndx-(shared_rec_count)]);
&(mpiio_runtime->file_record_array[mpiio_runtime->file_array_ndx-shared_rec_count]);
/* allocate memory for the reduction output on rank 0 */
if(my_rank == 0)
......
This diff is collapsed.
......@@ -2107,7 +2107,7 @@ static void posix_get_output_data(
/* make *send_buf point to the shared files at the end of sorted array */
red_send_buf =
&(posix_runtime->file_record_array[posix_runtime->file_array_ndx-(shared_rec_count)]);
&(posix_runtime->file_record_array[posix_runtime->file_array_ndx-shared_rec_count]);
/* allocate memory for the reduction output on rank 0 */
if(my_rank == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment