Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "extra info" field to the records #332

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions darshan-runtime/configure
Original file line number Diff line number Diff line change
Expand Up @@ -4674,10 +4674,10 @@ int
main ()
{

MPI_Comm comm;
char* filename;
int amode;
MPI_Info info;
MPI_Comm comm=0;
char* filename=0;
int amode=0;
MPI_Info info=0;
MPI_File fh;
MPI_File_open(comm, filename, amode, info, &fh);
;
Expand Down
8 changes: 4 additions & 4 deletions darshan-runtime/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@ AS_IF([test "x$ENABLE_MPI" = "x1"], [
# determine if the MPI library includes MPI-IO functions or not
AC_MSG_CHECKING(for MPI-IO support in MPI)
AC_TRY_LINK([#include <mpi.h>], [
MPI_Comm comm;
char* filename;
int amode;
MPI_Info info;
MPI_Comm comm=0;
char* filename=0;
int amode=0;
MPI_Info info=0;
MPI_File fh;
MPI_File_open(comm, filename, amode, info, &fh);],
AC_MSG_RESULT(yes),
Expand Down
28 changes: 14 additions & 14 deletions darshan-runtime/darshan-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
* added to the common access counter, rather than just incrementing it.
*/
#define DARSHAN_COMMON_VAL_COUNTER_INC(__val_p, __cnt_p, __value, __count, __add_flag) do {\
int i; \
int i_; \
int inc_count, total_count; \
int64_t tmp_val[4] = {0}; \
int64_t tmp_cnt[4] = {0}; \
Expand All @@ -92,21 +92,21 @@
inc_count = 1; \
else \
inc_count = __count; \
for(i=0; i<4; i++) { \
if(*(__val_p + i) == __value) { \
total_count = *(__cnt_p + i) + inc_count; \
for(i_=0; i_<4; i_++) { \
if(*(__val_p + i_) == __value) { \
total_count = *(__cnt_p + i_) + inc_count; \
break; \
} \
} \
if(i == 4) total_count = __count; \
if(i_ == 4) total_count = __count; \
/* first, copy over any counters that should be sorted above this one \
* (counters with higher counts or equal counts and larger values) \
*/ \
for(i=0;i < 4; i++) { \
if((*(__cnt_p + i) > total_count) || \
((*(__cnt_p + i) == total_count) && (*(__val_p + i) > __value))) { \
tmp_val[tmp_ndx] = *(__val_p + i); \
tmp_cnt[tmp_ndx] = *(__cnt_p + i); \
for(i_=0;i_ < 4; i_++) { \
if((*(__cnt_p + i_) > total_count) || \
((*(__cnt_p + i_) == total_count) && (*(__val_p + i_) > __value))) { \
tmp_val[tmp_ndx] = *(__val_p + i_); \
tmp_cnt[tmp_ndx] = *(__cnt_p + i_); \
tmp_ndx++; \
} \
else break; \
Expand All @@ -118,12 +118,12 @@
tmp_ndx++; \
/* last, copy over any remaining counters to make sure we have 4 sets total */ \
while(tmp_ndx != 4) { \
if(*(__val_p + i) != __value) { \
tmp_val[tmp_ndx] = *(__val_p + i); \
tmp_cnt[tmp_ndx] = *(__cnt_p + i); \
if(*(__val_p + i_) != __value) { \
tmp_val[tmp_ndx] = *(__val_p + i_); \
tmp_cnt[tmp_ndx] = *(__cnt_p + i_); \
tmp_ndx++; \
} \
i++; \
i_++; \
} \
memcpy(__val_p, tmp_val, 4*sizeof(int64_t)); \
memcpy(__cnt_p, tmp_cnt, 4*sizeof(int64_t)); \
Expand Down
8 changes: 4 additions & 4 deletions darshan-runtime/darshan-dxt.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ void dxt_posix_read(darshan_record_id rec_id, int64_t offset,
* with 'length' size. 'start_time' and 'end_time' are starting and ending
* timestamps for the operation, respectively.
*/
void dxt_mpiio_write(darshan_record_id rec_id, int64_t length,
double start_time, double end_time);
void dxt_mpiio_read(darshan_record_id rec_id, int64_t length,
double start_time, double end_time);
void dxt_mpiio_write(darshan_record_id rec_id, int64_t offset,
int64_t length, double start_time, double end_time);
void dxt_mpiio_read(darshan_record_id rec_id, int64_t offset,
int64_t length, double start_time, double end_time);

void dxt_posix_filter_dynamic_traces(
struct darshan_posix_file *(*rec_id_to_psx_file)(darshan_record_id));
Expand Down
10 changes: 6 additions & 4 deletions darshan-runtime/lib/darshan-dxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ void dxt_posix_read(darshan_record_id rec_id, int64_t offset,
DXT_UNLOCK();
}

void dxt_mpiio_write(darshan_record_id rec_id, int64_t length,
double start_time, double end_time)
void dxt_mpiio_write(darshan_record_id rec_id, int64_t offset,
int64_t length, double start_time, double end_time)
{
struct dxt_file_record_ref* rec_ref = NULL;
struct dxt_file_record *file_rec;
Expand Down Expand Up @@ -566,15 +566,16 @@ void dxt_mpiio_write(darshan_record_id rec_id, int64_t length,
}

rec_ref->write_traces[file_rec->write_count].length = length;
rec_ref->write_traces[file_rec->write_count].offset = offset;
rec_ref->write_traces[file_rec->write_count].start_time = start_time;
rec_ref->write_traces[file_rec->write_count].end_time = end_time;
file_rec->write_count += 1;

DXT_UNLOCK();
}

void dxt_mpiio_read(darshan_record_id rec_id, int64_t length,
double start_time, double end_time)
void dxt_mpiio_read(darshan_record_id rec_id, int64_t offset,
int64_t length, double start_time, double end_time)
{
struct dxt_file_record_ref* rec_ref = NULL;
struct dxt_file_record *file_rec;
Expand Down Expand Up @@ -622,6 +623,7 @@ void dxt_mpiio_read(darshan_record_id rec_id, int64_t length,
}

rec_ref->read_traces[file_rec->read_count].length = length;
rec_ref->read_traces[file_rec->read_count].offset = offset;
rec_ref->read_traces[file_rec->read_count].start_time = start_time;
rec_ref->read_traces[file_rec->read_count].end_time = end_time;
file_rec->read_count += 1;
Expand Down
Loading