Commit 2f4d0dbc authored by Shane Snyder's avatar Shane Snyder

update dxt parser to indicate if data is partial

parent b800d571
...@@ -171,11 +171,6 @@ int main(int argc, char **argv) ...@@ -171,11 +171,6 @@ int main(int argc, char **argv)
goto cleanup; goto cleanup;
} }
mod_buf = malloc(DEF_MOD_BUF_SIZE);
if (!mod_buf) {
goto cleanup;
}
for (i = 0; i < DARSHAN_MAX_MODS; i++) for (i = 0; i < DARSHAN_MAX_MODS; i++)
{ {
struct darshan_base_record *base_rec; struct darshan_base_record *base_rec;
...@@ -191,9 +186,6 @@ int main(int argc, char **argv) ...@@ -191,9 +186,6 @@ int main(int argc, char **argv)
continue; continue;
} }
/* this module has data to be parsed and printed */
memset(mod_buf, 0, DEF_MOD_BUF_SIZE);
if (i == DXT_POSIX_MOD || i == DXT_MPIIO_MOD) { if (i == DXT_POSIX_MOD || i == DXT_MPIIO_MOD) {
printf("\n# ***************************************************\n"); printf("\n# ***************************************************\n");
printf("# %s module data\n", darshan_module_names[i]); printf("# %s module data\n", darshan_module_names[i]);
...@@ -202,6 +194,13 @@ int main(int argc, char **argv) ...@@ -202,6 +194,13 @@ int main(int argc, char **argv)
else if (i != DARSHAN_LUSTRE_MOD) else if (i != DARSHAN_LUSTRE_MOD)
continue; continue;
/* print warning if this module only stored partial data */
if(DARSHAN_MOD_FLAG_ISSET(fd->partial_flag, i))
printf("\n# *WARNING*: The %s module contains incomplete data!\n"
"# This happens when a module runs out of\n"
"# memory to store new record data.\n",
darshan_module_names[i]);
/* loop over each of this module's records and print them */ /* loop over each of this module's records and print them */
while(1) while(1)
{ {
...@@ -234,6 +233,8 @@ int main(int argc, char **argv) ...@@ -234,6 +233,8 @@ int main(int argc, char **argv)
break; break;
} }
if(i == DARSHAN_LUSTRE_MOD) continue;
base_rec = (struct darshan_base_record *)mod_buf; base_rec = (struct darshan_base_record *)mod_buf;
/* get the pathname for this record */ /* get the pathname for this record */
...@@ -272,10 +273,10 @@ int main(int argc, char **argv) ...@@ -272,10 +273,10 @@ int main(int argc, char **argv)
} else if (i == DXT_MPIIO_MOD){ } else if (i == DXT_MPIIO_MOD){
dxt_log_print_mpiio_file(mod_buf, rec_name, dxt_log_print_mpiio_file(mod_buf, rec_name,
mnt_pt, fs_type); mnt_pt, fs_type);
} }
memset(mod_buf, 0, DEF_MOD_BUF_SIZE); free(mod_buf);
mod_buf = NULL;
} }
} }
...@@ -283,7 +284,6 @@ int main(int argc, char **argv) ...@@ -283,7 +284,6 @@ int main(int argc, char **argv)
cleanup: cleanup:
darshan_log_close(fd); darshan_log_close(fd);
free(mod_buf);
/* free record hash data */ /* free record hash data */
HASH_ITER(hlink, name_hash, ref, tmp_ref) HASH_ITER(hlink, name_hash, ref, tmp_ref)
......
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