Commit 3b0c668b authored by Shane Snyder's avatar Shane Snyder

update logutils to read uncompressed log files

parent bdb2a5f0
...@@ -77,9 +77,9 @@ static char * const darshan_module_names[] = ...@@ -77,9 +77,9 @@ static char * const darshan_module_names[] =
/* compression method used on darshan log file */ /* compression method used on darshan log file */
enum darshan_comp_type enum darshan_comp_type
{ {
DARSHAN_NO_COMP,
DARSHAN_ZLIB_COMP, DARSHAN_ZLIB_COMP,
DARSHAN_BZIP2_COMP, DARSHAN_BZIP2_COMP,
DARSHAN_NO_COMP,
}; };
typedef uint64_t darshan_record_id; typedef uint64_t darshan_record_id;
......
...@@ -250,7 +250,7 @@ int main(int argc, char **argv) ...@@ -250,7 +250,7 @@ int main(int argc, char **argv)
if(!infile) if(!infile)
return(-1); return(-1);
comp_type = bzip2 ? comp_type = DARSHAN_BZIP2_COMP : DARSHAN_ZLIB_COMP; comp_type = bzip2 ? DARSHAN_BZIP2_COMP : DARSHAN_ZLIB_COMP;
outfile = darshan_log_create(outfile_name, comp_type, infile->partial_flag); outfile = darshan_log_create(outfile_name, comp_type, infile->partial_flag);
if(!outfile) if(!outfile)
{ {
......
This diff is collapsed.
...@@ -29,6 +29,8 @@ struct darshan_fd_s ...@@ -29,6 +29,8 @@ struct darshan_fd_s
int swap_flag; int swap_flag;
/* flag indicating whether a log file contains partial data */ /* flag indicating whether a log file contains partial data */
int partial_flag; int partial_flag;
/* compression type used on log file */
enum darshan_comp_type comp_type;
/* log file offset/length maps for each log file region */ /* log file offset/length maps for each log file region */
struct darshan_log_map job_map; struct darshan_log_map job_map;
struct darshan_log_map rec_map; struct darshan_log_map rec_map;
......
...@@ -199,6 +199,7 @@ int main(int argc, char **argv) ...@@ -199,6 +199,7 @@ int main(int argc, char **argv)
int mask; int mask;
int i, j; int i, j;
char *filename; char *filename;
char *comp_str;
char tmp_string[4096] = {0}; char tmp_string[4096] = {0};
darshan_fd fd; darshan_fd fd;
struct darshan_job job; struct darshan_job job;
...@@ -263,8 +264,18 @@ int main(int argc, char **argv) ...@@ -263,8 +264,18 @@ int main(int argc, char **argv)
return(-1); return(-1);
} }
if(fd->comp_type == DARSHAN_ZLIB_COMP)
comp_str = "ZLIB";
else if (fd->comp_type == DARSHAN_BZIP2_COMP)
comp_str = "BZIP2";
else if (fd->comp_type == DARSHAN_NO_COMP)
comp_str = "NONE";
else
comp_str = "UNKNOWN";
/* print job summary */ /* print job summary */
printf("# darshan log version: %s\n", fd->version); printf("# darshan log version: %s\n", fd->version);
printf("# compression method: %s\n", comp_str);
printf("# exe: %s\n", tmp_string); printf("# exe: %s\n", tmp_string);
printf("# uid: %" PRId64 "\n", job.uid); printf("# uid: %" PRId64 "\n", job.uid);
printf("# jobid: %" PRId64 "\n", job.jobid); printf("# jobid: %" PRId64 "\n", job.jobid);
......
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