Commit be3912a8 authored by Shane Snyder's avatar Shane Snyder
Browse files

update utilities and log format to use base rec

parent ed103a2a
...@@ -53,8 +53,7 @@ enum darshan_bgq_f_indices ...@@ -53,8 +53,7 @@ enum darshan_bgq_f_indices
*/ */
struct darshan_bgq_record struct darshan_bgq_record
{ {
darshan_record_id f_id; struct darshan_base_record base_rec;
int64_t rank;
int alignment; int alignment;
int64_t counters[BGQ_NUM_INDICES]; int64_t counters[BGQ_NUM_INDICES];
double fcounters[BGQ_F_NUM_INDICES]; double fcounters[BGQ_F_NUM_INDICES];
......
...@@ -47,8 +47,7 @@ enum darshan_hdf5_f_indices ...@@ -47,8 +47,7 @@ enum darshan_hdf5_f_indices
*/ */
struct darshan_hdf5_file struct darshan_hdf5_file
{ {
darshan_record_id f_id; struct darshan_base_record base_rec;
int64_t rank;
int64_t counters[HDF5_NUM_INDICES]; int64_t counters[HDF5_NUM_INDICES];
double fcounters[HDF5_F_NUM_INDICES]; double fcounters[HDF5_F_NUM_INDICES];
}; };
......
...@@ -146,8 +146,7 @@ enum darshan_mpiio_f_indices ...@@ -146,8 +146,7 @@ enum darshan_mpiio_f_indices
*/ */
struct darshan_mpiio_file struct darshan_mpiio_file
{ {
darshan_record_id f_id; struct darshan_base_record base_rec;
int64_t rank;
int64_t counters[MPIIO_NUM_INDICES]; int64_t counters[MPIIO_NUM_INDICES];
double fcounters[MPIIO_F_NUM_INDICES]; double fcounters[MPIIO_F_NUM_INDICES];
}; };
......
...@@ -50,8 +50,7 @@ enum darshan_null_f_indices ...@@ -50,8 +50,7 @@ enum darshan_null_f_indices
*/ */
struct darshan_null_record struct darshan_null_record
{ {
darshan_record_id f_id; struct darshan_base_record base_rec;
int64_t rank;
int64_t counters[NULL_NUM_INDICES]; int64_t counters[NULL_NUM_INDICES];
double fcounters[NULL_F_NUM_INDICES]; double fcounters[NULL_F_NUM_INDICES];
}; };
......
...@@ -49,8 +49,7 @@ enum darshan_pnetcdf_f_indices ...@@ -49,8 +49,7 @@ enum darshan_pnetcdf_f_indices
*/ */
struct darshan_pnetcdf_file struct darshan_pnetcdf_file
{ {
darshan_record_id f_id; struct darshan_base_record base_rec;
int64_t rank;
int64_t counters[PNETCDF_NUM_INDICES]; int64_t counters[PNETCDF_NUM_INDICES];
double fcounters[PNETCDF_F_NUM_INDICES]; double fcounters[PNETCDF_F_NUM_INDICES];
}; };
......
...@@ -38,7 +38,6 @@ int process_log(const char *fname, double *io_ratio, int *used_mpio, int *used_p ...@@ -38,7 +38,6 @@ int process_log(const char *fname, double *io_ratio, int *used_mpio, int *used_p
struct darshan_job job; struct darshan_job job;
struct darshan_mod_logutil_funcs *psx_mod = mod_logutils[DARSHAN_POSIX_MOD]; struct darshan_mod_logutil_funcs *psx_mod = mod_logutils[DARSHAN_POSIX_MOD];
struct darshan_posix_file psx_rec; struct darshan_posix_file psx_rec;
darshan_record_id rec_id;
int f_count; int f_count;
double total_io_time; double total_io_time;
double total_job_time; double total_job_time;
...@@ -64,7 +63,7 @@ int process_log(const char *fname, double *io_ratio, int *used_mpio, int *used_p ...@@ -64,7 +63,7 @@ int process_log(const char *fname, double *io_ratio, int *used_mpio, int *used_p
f_count = 0; f_count = 0;
total_io_time = 0.0; total_io_time = 0.0;
while((ret = psx_mod->log_get_record(file, &psx_rec, &rec_id)) == 1) while((ret = psx_mod->log_get_record(file, &psx_rec)) == 1)
{ {
f_count += 1; f_count += 1;
......
...@@ -30,8 +30,7 @@ char *bgq_f_counter_names[] = { ...@@ -30,8 +30,7 @@ char *bgq_f_counter_names[] = {
}; };
#undef X #undef X
static int darshan_log_get_bgq_rec(darshan_fd fd, void* bgq_buf, static int darshan_log_get_bgq_rec(darshan_fd fd, void* bgq_buf);
darshan_record_id* rec_id);
static int darshan_log_put_bgq_rec(darshan_fd fd, void* bgq_buf); static int darshan_log_put_bgq_rec(darshan_fd fd, void* bgq_buf);
static void darshan_log_print_bgq_rec(void *file_rec, static void darshan_log_print_bgq_rec(void *file_rec,
char *file_name, char *mnt_pt, char *fs_type); char *file_name, char *mnt_pt, char *fs_type);
...@@ -43,8 +42,7 @@ struct darshan_mod_logutil_funcs bgq_logutils = ...@@ -43,8 +42,7 @@ struct darshan_mod_logutil_funcs bgq_logutils =
.log_print_record = &darshan_log_print_bgq_rec, .log_print_record = &darshan_log_print_bgq_rec,
}; };
static int darshan_log_get_bgq_rec(darshan_fd fd, void* bgq_buf, static int darshan_log_get_bgq_rec(darshan_fd fd, void* bgq_buf)
darshan_record_id* rec_id)
{ {
struct darshan_bgq_record *rec; struct darshan_bgq_record *rec;
int i; int i;
...@@ -62,15 +60,14 @@ static int darshan_log_get_bgq_rec(darshan_fd fd, void* bgq_buf, ...@@ -62,15 +60,14 @@ static int darshan_log_get_bgq_rec(darshan_fd fd, void* bgq_buf,
if(fd->swap_flag) if(fd->swap_flag)
{ {
/* swap bytes if necessary */ /* swap bytes if necessary */
DARSHAN_BSWAP64(&rec->f_id); DARSHAN_BSWAP64(&(rec->base_rec.id));
DARSHAN_BSWAP64(&rec->rank); DARSHAN_BSWAP64(&(rec->base_rec.rank));
for(i=0; i<BGQ_NUM_INDICES; i++) for(i=0; i<BGQ_NUM_INDICES; i++)
DARSHAN_BSWAP64(&rec->counters[i]); DARSHAN_BSWAP64(&rec->counters[i]);
for(i=0; i<BGQ_F_NUM_INDICES; i++) for(i=0; i<BGQ_F_NUM_INDICES; i++)
DARSHAN_BSWAP64(&rec->fcounters[i]); DARSHAN_BSWAP64(&rec->fcounters[i]);
} }
*rec_id = rec->f_id;
return(1); return(1);
} }
} }
...@@ -98,15 +95,17 @@ static void darshan_log_print_bgq_rec(void *file_rec, char *file_name, ...@@ -98,15 +95,17 @@ static void darshan_log_print_bgq_rec(void *file_rec, char *file_name,
for(i=0; i<BGQ_NUM_INDICES; i++) for(i=0; i<BGQ_NUM_INDICES; i++)
{ {
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD], DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
bgq_file_rec->rank, bgq_file_rec->f_id, bgq_counter_names[i], bgq_file_rec->base_rec.rank, bgq_file_rec->base_rec.id,
bgq_file_rec->counters[i], file_name, mnt_pt, fs_type); bgq_counter_names[i], bgq_file_rec->counters[i],
file_name, mnt_pt, fs_type);
} }
for(i=0; i<BGQ_F_NUM_INDICES; i++) for(i=0; i<BGQ_F_NUM_INDICES; i++)
{ {
DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD], DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
bgq_file_rec->rank, bgq_file_rec->f_id, bgq_f_counter_names[i], bgq_file_rec->base_rec.rank, bgq_file_rec->base_rec.id,
bgq_file_rec->fcounters[i], file_name, mnt_pt, fs_type); bgq_f_counter_names[i], bgq_file_rec->fcounters[i],
file_name, mnt_pt, fs_type);
} }
return; return;
......
...@@ -342,7 +342,7 @@ int main(int argc, char **argv) ...@@ -342,7 +342,7 @@ int main(int argc, char **argv)
/* loop over each module and convert it's data to the new format */ /* loop over each module and convert it's data to the new format */
for(i=0; i<DARSHAN_MAX_MODS; i++) for(i=0; i<DARSHAN_MAX_MODS; i++)
{ {
darshan_record_id rec_id; struct darshan_base_record *base_rec;
/* check each module for any data */ /* check each module for any data */
if(infile->mod_map[i].len == 0) if(infile->mod_map[i].len == 0)
...@@ -357,7 +357,7 @@ int main(int argc, char **argv) ...@@ -357,7 +357,7 @@ int main(int argc, char **argv)
/* we have module data to convert */ /* we have module data to convert */
memset(mod_buf, 0, DEF_MOD_BUF_SIZE); memset(mod_buf, 0, DEF_MOD_BUF_SIZE);
ret = mod_logutils[i]->log_get_record(infile, mod_buf, &rec_id); ret = mod_logutils[i]->log_get_record(infile, mod_buf);
if(ret != 1) if(ret != 1)
{ {
fprintf(stderr, "Error: failed to parse the first %s module record.\n", fprintf(stderr, "Error: failed to parse the first %s module record.\n",
...@@ -371,7 +371,9 @@ int main(int argc, char **argv) ...@@ -371,7 +371,9 @@ int main(int argc, char **argv)
/* loop over each of the module's records and convert */ /* loop over each of the module's records and convert */
do do
{ {
if(!hash || hash == rec_id) base_rec = (struct darshan_base_record *)mod_buf;
if(!hash || hash == base_rec->id)
{ {
ret = mod_logutils[i]->log_put_record(outfile, mod_buf); ret = mod_logutils[i]->log_put_record(outfile, mod_buf);
if(ret < 0) if(ret < 0)
...@@ -383,7 +385,7 @@ int main(int argc, char **argv) ...@@ -383,7 +385,7 @@ int main(int argc, char **argv)
memset(mod_buf, 0, DEF_MOD_BUF_SIZE); memset(mod_buf, 0, DEF_MOD_BUF_SIZE);
} }
} while((ret = mod_logutils[i]->log_get_record(infile, mod_buf, &rec_id)) == 1); } while((ret = mod_logutils[i]->log_get_record(infile, mod_buf)) == 1);
} }
darshan_log_close(infile); darshan_log_close(infile);
......
...@@ -30,8 +30,7 @@ char *hdf5_f_counter_names[] = { ...@@ -30,8 +30,7 @@ char *hdf5_f_counter_names[] = {
}; };
#undef X #undef X
static int darshan_log_get_hdf5_file(darshan_fd fd, void* hdf5_buf, static int darshan_log_get_hdf5_file(darshan_fd fd, void* hdf5_buf);
darshan_record_id* rec_id);
static int darshan_log_put_hdf5_file(darshan_fd fd, void* hdf5_buf); static int darshan_log_put_hdf5_file(darshan_fd fd, void* hdf5_buf);
static void darshan_log_print_hdf5_file(void *file_rec, static void darshan_log_print_hdf5_file(void *file_rec,
char *file_name, char *mnt_pt, char *fs_type); char *file_name, char *mnt_pt, char *fs_type);
...@@ -43,8 +42,7 @@ struct darshan_mod_logutil_funcs hdf5_logutils = ...@@ -43,8 +42,7 @@ struct darshan_mod_logutil_funcs hdf5_logutils =
.log_print_record = &darshan_log_print_hdf5_file, .log_print_record = &darshan_log_print_hdf5_file,
}; };
static int darshan_log_get_hdf5_file(darshan_fd fd, void* hdf5_buf, static int darshan_log_get_hdf5_file(darshan_fd fd, void* hdf5_buf)
darshan_record_id* rec_id)
{ {
struct darshan_hdf5_file *file; struct darshan_hdf5_file *file;
int i; int i;
...@@ -62,15 +60,14 @@ static int darshan_log_get_hdf5_file(darshan_fd fd, void* hdf5_buf, ...@@ -62,15 +60,14 @@ static int darshan_log_get_hdf5_file(darshan_fd fd, void* hdf5_buf,
if(fd->swap_flag) if(fd->swap_flag)
{ {
/* swap bytes if necessary */ /* swap bytes if necessary */
DARSHAN_BSWAP64(&file->f_id); DARSHAN_BSWAP64(&(file->base_rec.id));
DARSHAN_BSWAP64(&file->rank); DARSHAN_BSWAP64(&(file->base_rec.rank));
for(i=0; i<HDF5_NUM_INDICES; i++) for(i=0; i<HDF5_NUM_INDICES; i++)
DARSHAN_BSWAP64(&file->counters[i]); DARSHAN_BSWAP64(&file->counters[i]);
for(i=0; i<HDF5_F_NUM_INDICES; i++) for(i=0; i<HDF5_F_NUM_INDICES; i++)
DARSHAN_BSWAP64(&file->fcounters[i]); DARSHAN_BSWAP64(&file->fcounters[i]);
} }
*rec_id = file->f_id;
return(1); return(1);
} }
} }
...@@ -98,15 +95,17 @@ static void darshan_log_print_hdf5_file(void *file_rec, char *file_name, ...@@ -98,15 +95,17 @@ static void darshan_log_print_hdf5_file(void *file_rec, char *file_name,
for(i=0; i<HDF5_NUM_INDICES; i++) for(i=0; i<HDF5_NUM_INDICES; i++)
{ {
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD], DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
hdf5_file_rec->rank, hdf5_file_rec->f_id, hdf5_counter_names[i], hdf5_file_rec->base_rec.rank, hdf5_file_rec->base_rec.id,
hdf5_file_rec->counters[i], file_name, mnt_pt, fs_type); hdf5_counter_names[i], hdf5_file_rec->counters[i],
file_name, mnt_pt, fs_type);
} }
for(i=0; i<HDF5_F_NUM_INDICES; i++) for(i=0; i<HDF5_F_NUM_INDICES; i++)
{ {
DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD], DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
hdf5_file_rec->rank, hdf5_file_rec->f_id, hdf5_f_counter_names[i], hdf5_file_rec->base_rec.rank, hdf5_file_rec->base_rec.id,
hdf5_file_rec->fcounters[i], file_name, mnt_pt, fs_type); hdf5_f_counter_names[i], hdf5_file_rec->fcounters[i],
file_name, mnt_pt, fs_type);
} }
return; return;
......
...@@ -59,8 +59,7 @@ struct darshan_mod_logutil_funcs ...@@ -59,8 +59,7 @@ struct darshan_mod_logutil_funcs
*/ */
int (*log_get_record)( int (*log_get_record)(
darshan_fd fd, darshan_fd fd,
void* buf, void* buf
darshan_record_id* rec_id
); );
/* put a single module record into the log file. /* put a single module record into the log file.
* return 0 on success, -1 on error * return 0 on success, -1 on error
......
...@@ -30,8 +30,7 @@ char *mpiio_f_counter_names[] = { ...@@ -30,8 +30,7 @@ char *mpiio_f_counter_names[] = {
}; };
#undef X #undef X
static int darshan_log_get_mpiio_file(darshan_fd fd, void* mpiio_buf, static int darshan_log_get_mpiio_file(darshan_fd fd, void* mpiio_buf);
darshan_record_id* rec_id);
static int darshan_log_put_mpiio_file(darshan_fd fd, void* mpiio_buf); static int darshan_log_put_mpiio_file(darshan_fd fd, void* mpiio_buf);
static void darshan_log_print_mpiio_file(void *file_rec, static void darshan_log_print_mpiio_file(void *file_rec,
char *file_name, char *mnt_pt, char *fs_type); char *file_name, char *mnt_pt, char *fs_type);
...@@ -43,8 +42,7 @@ struct darshan_mod_logutil_funcs mpiio_logutils = ...@@ -43,8 +42,7 @@ struct darshan_mod_logutil_funcs mpiio_logutils =
.log_print_record = &darshan_log_print_mpiio_file, .log_print_record = &darshan_log_print_mpiio_file,
}; };
static int darshan_log_get_mpiio_file(darshan_fd fd, void* mpiio_buf, static int darshan_log_get_mpiio_file(darshan_fd fd, void* mpiio_buf)
darshan_record_id* rec_id)
{ {
struct darshan_mpiio_file *file; struct darshan_mpiio_file *file;
int i; int i;
...@@ -62,15 +60,14 @@ static int darshan_log_get_mpiio_file(darshan_fd fd, void* mpiio_buf, ...@@ -62,15 +60,14 @@ static int darshan_log_get_mpiio_file(darshan_fd fd, void* mpiio_buf,
if(fd->swap_flag) if(fd->swap_flag)
{ {
/* swap bytes if necessary */ /* swap bytes if necessary */
DARSHAN_BSWAP64(&file->f_id); DARSHAN_BSWAP64(&(file->base_rec.id));
DARSHAN_BSWAP64(&file->rank); DARSHAN_BSWAP64(&(file->base_rec.rank));
for(i=0; i<MPIIO_NUM_INDICES; i++) for(i=0; i<MPIIO_NUM_INDICES; i++)
DARSHAN_BSWAP64(&file->counters[i]); DARSHAN_BSWAP64(&file->counters[i]);
for(i=0; i<MPIIO_F_NUM_INDICES; i++) for(i=0; i<MPIIO_F_NUM_INDICES; i++)
DARSHAN_BSWAP64(&file->fcounters[i]); DARSHAN_BSWAP64(&file->fcounters[i]);
} }
*rec_id = file->f_id;
return(1); return(1);
} }
} }
...@@ -98,15 +95,17 @@ static void darshan_log_print_mpiio_file(void *file_rec, char *file_name, ...@@ -98,15 +95,17 @@ static void darshan_log_print_mpiio_file(void *file_rec, char *file_name,
for(i=0; i<MPIIO_NUM_INDICES; i++) for(i=0; i<MPIIO_NUM_INDICES; i++)
{ {
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD], DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
mpiio_file_rec->rank, mpiio_file_rec->f_id, mpiio_counter_names[i], mpiio_file_rec->base_rec.rank, mpiio_file_rec->base_rec.id,
mpiio_file_rec->counters[i], file_name, mnt_pt, fs_type); mpiio_counter_names[i], mpiio_file_rec->counters[i],
file_name, mnt_pt, fs_type);
} }
for(i=0; i<MPIIO_F_NUM_INDICES; i++) for(i=0; i<MPIIO_F_NUM_INDICES; i++)
{ {
DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD], DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
mpiio_file_rec->rank, mpiio_file_rec->f_id, mpiio_f_counter_names[i], mpiio_file_rec->base_rec.rank, mpiio_file_rec->base_rec.id,
mpiio_file_rec->fcounters[i], file_name, mnt_pt, fs_type); mpiio_f_counter_names[i], mpiio_file_rec->fcounters[i],
file_name, mnt_pt, fs_type);
} }
return; return;
......
...@@ -32,8 +32,7 @@ char *null_f_counter_names[] = { ...@@ -32,8 +32,7 @@ char *null_f_counter_names[] = {
#undef X #undef X
/* prototypes for each of the NULL module's logutil functions */ /* prototypes for each of the NULL module's logutil functions */
static int darshan_log_get_null_record(darshan_fd fd, void* null_buf, static int darshan_log_get_null_record(darshan_fd fd, void* null_buf);
darshan_record_id* rec_id);
static int darshan_log_put_null_record(darshan_fd fd, void* null_buf); static int darshan_log_put_null_record(darshan_fd fd, void* null_buf);
static void darshan_log_print_null_record(void *file_rec, static void darshan_log_print_null_record(void *file_rec,
char *file_name, char *mnt_pt, char *fs_type); char *file_name, char *mnt_pt, char *fs_type);
...@@ -53,8 +52,7 @@ struct darshan_mod_logutil_funcs null_logutils = ...@@ -53,8 +52,7 @@ struct darshan_mod_logutil_funcs null_logutils =
* buffer in 'null_buf' and the corresponding Darshan record id in * buffer in 'null_buf' and the corresponding Darshan record id in
* 'rec_id'. Return 1 on successful record read, . * 'rec_id'. Return 1 on successful record read, .
*/ */
static int darshan_log_get_null_record(darshan_fd fd, void* null_buf, static int darshan_log_get_null_record(darshan_fd fd, void* null_buf)
darshan_record_id* rec_id)
{ {
struct darshan_null_record *rec; struct darshan_null_record *rec;
int i; int i;
...@@ -74,16 +72,14 @@ static int darshan_log_get_null_record(darshan_fd fd, void* null_buf, ...@@ -74,16 +72,14 @@ static int darshan_log_get_null_record(darshan_fd fd, void* null_buf,
if(fd->swap_flag) if(fd->swap_flag)
{ {
/* swap bytes if necessary */ /* swap bytes if necessary */
DARSHAN_BSWAP64(&rec->f_id); DARSHAN_BSWAP64(&(rec->base_rec.id));
DARSHAN_BSWAP64(&rec->rank); DARSHAN_BSWAP64(&(rec->base_rec.rank));
for(i=0; i<NULL_NUM_INDICES; i++) for(i=0; i<NULL_NUM_INDICES; i++)
DARSHAN_BSWAP64(&rec->counters[i]); DARSHAN_BSWAP64(&rec->counters[i]);
for(i=0; i<NULL_F_NUM_INDICES; i++) for(i=0; i<NULL_F_NUM_INDICES; i++)
DARSHAN_BSWAP64(&rec->fcounters[i]); DARSHAN_BSWAP64(&rec->fcounters[i]);
} }
/* set the output record id */
*rec_id = rec->f_id;
return(1); return(1);
} }
} }
...@@ -118,16 +114,18 @@ static void darshan_log_print_null_record(void *file_rec, char *file_name, ...@@ -118,16 +114,18 @@ static void darshan_log_print_null_record(void *file_rec, char *file_name,
{ {
/* macro defined in darshan-logutils.h */ /* macro defined in darshan-logutils.h */
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD], DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
null_rec->rank, null_rec->f_id, null_counter_names[i], null_rec->base_rec.rank, null_rec->base_rec.id,
null_rec->counters[i], file_name, mnt_pt, fs_type); null_counter_names[i], null_rec->counters[i],
file_name, mnt_pt, fs_type);
} }
for(i=0; i<NULL_F_NUM_INDICES; i++) for(i=0; i<NULL_F_NUM_INDICES; i++)
{ {
/* macro defined in darshan-logutils.h */ /* macro defined in darshan-logutils.h */
DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD], DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
null_rec->rank, null_rec->f_id, null_f_counter_names[i], null_rec->base_rec.rank, null_rec->base_rec.id,
null_rec->fcounters[i], file_name, mnt_pt, fs_type); null_f_counter_names[i], null_rec->fcounters[i],
file_name, mnt_pt, fs_type);
} }
return; return;
......
...@@ -348,7 +348,7 @@ int main(int argc, char **argv) ...@@ -348,7 +348,7 @@ int main(int argc, char **argv)
for(i=0; i<DARSHAN_MAX_MODS; i++) for(i=0; i<DARSHAN_MAX_MODS; i++)
{ {
darshan_record_id rec_id; struct darshan_base_record *base_rec;
void *save_io, *save_md; void *save_io, *save_md;
/* check each module for any data */ /* check each module for any data */
...@@ -389,7 +389,7 @@ int main(int argc, char **argv) ...@@ -389,7 +389,7 @@ int main(int argc, char **argv)
DARSHAN_PRINT_HEADER(); DARSHAN_PRINT_HEADER();
} }
ret = mod_logutils[i]->log_get_record(fd, mod_buf, &rec_id); ret = mod_logutils[i]->log_get_record(fd, mod_buf);
if(ret != 1) if(ret != 1)
{ {
fprintf(stderr, "Error: failed to parse the first %s module record.\n", fprintf(stderr, "Error: failed to parse the first %s module record.\n",
...@@ -404,9 +404,10 @@ int main(int argc, char **argv) ...@@ -404,9 +404,10 @@ int main(int argc, char **argv)
char *mnt_pt = NULL; char *mnt_pt = NULL;
char *fs_type = NULL; char *fs_type = NULL;
hash_entry_t *hfile = NULL; hash_entry_t *hfile = NULL;
base_rec = (struct darshan_base_record *)mod_buf;
/* get the pathname for this record */ /* get the pathname for this record */
HASH_FIND(hlink, rec_hash, &rec_id, sizeof(darshan_record_id), ref); HASH_FIND(hlink, rec_hash, &(base_rec->id), sizeof(darshan_record_id), ref);
assert(ref); assert(ref);
/* get mount point and fs type associated with this record */ /* get mount point and fs type associated with this record */
...@@ -437,7 +438,7 @@ int main(int argc, char **argv) ...@@ -437,7 +438,7 @@ int main(int argc, char **argv)
if(i != DARSHAN_POSIX_MOD && i != DARSHAN_MPIIO_MOD) if(i != DARSHAN_POSIX_MOD && i != DARSHAN_MPIIO_MOD)
continue; continue;
HASH_FIND(hlink, file_hash, &rec_id, sizeof(darshan_record_id), hfile); HASH_FIND(hlink, file_hash, &(base_rec->id), sizeof(darshan_record_id), hfile);
if(!hfile) if(!hfile)
{ {
hfile = malloc(sizeof(*hfile)); hfile = malloc(sizeof(*hfile));
...@@ -449,14 +450,14 @@ int main(int argc, char **argv) ...@@ -449,14 +450,14 @@ int main(int argc, char **argv)
/* init */ /* init */
memset(hfile, 0, sizeof(*hfile)); memset(hfile, 0, sizeof(*hfile));
hfile->rec_id = rec_id; hfile->rec_id = base_rec->id;
hfile->type = 0; hfile->type = 0;
hfile->procs = 0; hfile->procs = 0;
hfile->rec_dat = NULL; hfile->rec_dat = NULL;
hfile->cumul_time = 0.0; hfile->cumul_time = 0.0;
hfile->slowest_time = 0.0; hfile->slowest_time = 0.0;
HASH_ADD(hlink, file_hash, rec_id, sizeof(darshan_record_id), hfile); HASH_ADD(hlink, file_hash,rec_id, sizeof(darshan_record_id), hfile);