Commit 89a97a0f authored by Shane Snyder's avatar Shane Snyder
Browse files

darshan parser bug fixes

parent 8eb2f98d
...@@ -394,6 +394,12 @@ int main(int argc, char **argv) ...@@ -394,6 +394,12 @@ int main(int argc, char **argv)
printf("# %s module data\n", darshan_module_names[i]); printf("# %s module data\n", darshan_module_names[i]);
printf("# *******************************************************\n"); printf("# *******************************************************\n");
if(mask & OPTION_BASE)
{
/* TODO: does each module print header of what each counter means??? */
DARSHAN_PRINT_HEADER();
}
/* this module has data to be parsed and printed */ /* this module has data to be parsed and printed */
mod_bytes_left = mod_buf_sz; mod_bytes_left = mod_buf_sz;
mod_buf_p = mod_buf; mod_buf_p = mod_buf;
...@@ -436,9 +442,6 @@ int main(int argc, char **argv) ...@@ -436,9 +442,6 @@ int main(int argc, char **argv)
if(mask & OPTION_BASE) if(mask & OPTION_BASE)
{ {
/* TODO: does each module print header of what each counter means??? */
DARSHAN_PRINT_HEADER();
/* print the corresponding module data for this record */ /* print the corresponding module data for this record */
mod_logutils[i]->log_print_record(rec_p, ref->rec.name, mod_logutils[i]->log_print_record(rec_p, ref->rec.name,
mnt_pt, fs_type); mnt_pt, fs_type);
...@@ -448,7 +451,7 @@ int main(int argc, char **argv) ...@@ -448,7 +451,7 @@ int main(int argc, char **argv)
* if the parser is executed with more than the base option * if the parser is executed with more than the base option
*/ */
if(i != DARSHAN_POSIX_MOD && i != DARSHAN_MPIIO_MOD) if(i != DARSHAN_POSIX_MOD && i != DARSHAN_MPIIO_MOD)
break; continue;
HASH_FIND(hlink, file_hash, &rec_id, sizeof(darshan_record_id), hfile); HASH_FIND(hlink, file_hash, &rec_id, sizeof(darshan_record_id), hfile);
if(!hfile) if(!hfile)
...@@ -483,6 +486,12 @@ int main(int argc, char **argv) ...@@ -483,6 +486,12 @@ int main(int argc, char **argv)
} }
} }
/* we calculate more detailed stats for POSIX and MPI-IO modules,
* if the parser is executed with more than the base option
*/
if(i != DARSHAN_POSIX_MOD && i != DARSHAN_MPIIO_MOD)
continue;
/* Total Calc */ /* Total Calc */
if(mask & OPTION_TOTAL) if(mask & OPTION_TOTAL)
{ {
...@@ -686,9 +695,9 @@ void posix_accum_file(struct darshan_posix_file *pfile, ...@@ -686,9 +695,9 @@ void posix_accum_file(struct darshan_posix_file *pfile,
{ {
hfile->rec_dat = malloc(sizeof(struct darshan_posix_file)); hfile->rec_dat = malloc(sizeof(struct darshan_posix_file));
assert(hfile->rec_dat); assert(hfile->rec_dat);
tmp = (struct darshan_posix_file*)hfile->rec_dat; memset(hfile->rec_dat, 0, sizeof(struct darshan_posix_file));
memset(tmp, 0, sizeof(struct darshan_posix_file));
} }
tmp = (struct darshan_posix_file*)hfile->rec_dat;
for(i = 0; i < POSIX_NUM_INDICES; i++) for(i = 0; i < POSIX_NUM_INDICES; i++)
{ {
...@@ -890,9 +899,9 @@ void mpiio_accum_file(struct darshan_mpiio_file *mfile, ...@@ -890,9 +899,9 @@ void mpiio_accum_file(struct darshan_mpiio_file *mfile,
{ {
hfile->rec_dat = malloc(sizeof(struct darshan_mpiio_file)); hfile->rec_dat = malloc(sizeof(struct darshan_mpiio_file));
assert(hfile->rec_dat); assert(hfile->rec_dat);
tmp = (struct darshan_mpiio_file*)hfile->rec_dat; memset(hfile->rec_dat, 0, sizeof(struct darshan_mpiio_file));
memset(tmp, 0, sizeof(struct darshan_mpiio_file));
} }
tmp = (struct darshan_mpiio_file*)hfile->rec_dat;
for(i = 0; i < MPIIO_NUM_INDICES; i++) for(i = 0; i < MPIIO_NUM_INDICES; i++)
{ {
......
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