Commit 773a085a authored by Shane Snyder's avatar Shane Snyder

clean up utilities output and minor bug fixes

parent da0aaec6
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -986,6 +986,12 @@ sub process_file_record
my(%file_record) = %{$_[1]};
my $rank = $file_record{'RANK'};
if(!defined $file_record{'POSIX_OPENS'})
{
# ignore data records that don't have POSIX & MPI data
return;
}
if($file_record{'POSIX_OPENS'} == 0 &&
$file_record{'POSIX_FOPENS'} == 0 &&
(!defined $file_record{'MPIIO_INDEP_OPENS'} ||
......
......@@ -96,7 +96,7 @@ void darshan_log_close(darshan_fd file);
/* convenience macros for printing Darshan counters */
#define DARSHAN_PRINT_HEADER() \
printf("\n#<module>\t<rank>\t<file>\t<counter>\t<value>" \
printf("\n#<module>\t<rank>\t<record id>\t<counter>\t<value>" \
"\t<file name>\t<mount pt>\t<fs type>\n")
#define DARSHAN_COUNTER_PRINT(__mod_name, __rank, __file_id, \
......
......@@ -298,8 +298,8 @@ int main(int argc, char **argv)
printf("# metadata: %s = %s\n", key, value);
}
/* print breakdown of each log file component's contribution to file size */
printf("\n# log file component sizes (compressed)\n");
/* print breakdown of each log file region's contribution to file size */
printf("\n# log file region sizes (compressed)\n");
printf("# -------------------------------------------------------\n");
printf("# header: %zu bytes (uncompressed)\n", sizeof(struct darshan_header));
printf("# job data: %zu bytes\n", fd->job_map.len);
......@@ -345,12 +345,17 @@ int main(int argc, char **argv)
empty_mods++;
continue;
}
/* skip modules with no logutil definitions */
else if(!mod_logutils[i])
{
fprintf(stderr, "Warning: no log utility handlers defined "
"for module %s, SKIPPING.\n", darshan_module_names[i]);
continue;
}
/* currently we only do base parsing for non MPI & POSIX modules */
else if((i != DARSHAN_POSIX_MOD) && (i != DARSHAN_MPIIO_MOD) &&
!(mask & OPTION_BASE))
continue;
/* this module has data to be parsed and printed */
memset(mod_buf, 0, DEF_MOD_BUF_SIZE);
......@@ -1404,7 +1409,7 @@ void posix_file_list(hash_entry_t *file_hash,
printf("\n# Per-file summary of I/O activity.\n");
printf("# <record_id>: darshan record id for this file\n");
printf("# <file_name>: file name\n");
printf("# <file_name>: full file name\n");
printf("# <nprocs>: number of processes that opened the file\n");
printf("# <slowest>: (estimated) time in seconds consumed in IO by slowest process\n");
printf("# <avg>: average time in seconds consumed in IO per process\n");
......@@ -1417,7 +1422,7 @@ void posix_file_list(hash_entry_t *file_hash,
printf("# <POSIX_SIZE_WRITE_*>: POSIX write size histogram\n");
}
printf("\n# <file_id>\t<file_name>\t<nprocs>\t<slowest>\t<avg>");
printf("\n# <record_id>\t<file_name>\t<nprocs>\t<slowest>\t<avg>");
if(detail_flag)
{
printf("\t<start_open>\t<start_read>\t<start_write>");
......@@ -1496,7 +1501,7 @@ void mpiio_file_list(hash_entry_t *file_hash,
printf("\n# Per-file summary of I/O activity.\n");
printf("# <record_id>: darshan record id for this file\n");
printf("# <file_name>: file name\n");
printf("# <file_name>: full file name\n");
printf("# <nprocs>: number of processes that opened the file\n");
printf("# <slowest>: (estimated) time in seconds consumed in IO by slowest process\n");
printf("# <avg>: average time in seconds consumed in IO per process\n");
......@@ -1510,7 +1515,7 @@ void mpiio_file_list(hash_entry_t *file_hash,
printf("# <MPIIO_SIZE_WRITE_AGG_*>: MPI-IO aggregate write size histogram\n");
}
printf("\n# <file_id>\t<file_name>\t<nprocs>\t<slowest>\t<avg>");
printf("\n# <record_id>\t<file_name>\t<nprocs>\t<slowest>\t<avg>");
if(detail_flag)
{
printf("\t<start_open>\t<start_read>\t<start_write>");
......
......@@ -14,7 +14,7 @@ if [ $# -ne 2 ]; then
fi
# count number of files present in log
filecount=`darshan-parser --file-list $1| egrep -v '^(#|$)' | wc -l`
filecount=`darshan-parser --file-list $1| egrep -v '^(#|$)' | cut -f 1-2 | uniq | wc -l`
rc=$?
if [ $rc -ne 0 ]; then
exit $rc
......@@ -29,7 +29,7 @@ fi
# loop through all files in log
counter=0
darshan-parser --file-list $1| egrep -v '^(#|$)' |
darshan-parser --file-list $1| egrep -v '^(#|$)' | cut -f 1-2 | uniq |
while read -r hash suffix stuff ; do
counter=$((counter+1))
file=$(basename $suffix)
......
......@@ -54,6 +54,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
......
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