Commit d7371539 authored by Kevin Harms's avatar Kevin Harms

Add warning when darshan log has no file records in it. Exists without

generating a summary PDF.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@340 3b7491f3-a168-0410-bf4b-c445ed680a29
parent abea14f5
......@@ -13,6 +13,7 @@ use Cwd;
use Getopt::Long;
use English;
use Number::Bytes::Human qw(format_bytes);
use POSIX qw(strftime);
my $gnuplot = "";
......@@ -82,7 +83,7 @@ my %file_record_hash = ();
my %fs_data = ();
while ($line = <TRACE>) {
chop($line);
chomp($line);
if ($line =~ /^\s*$/) {
# ignore blank lines
......@@ -266,6 +267,24 @@ while ($line = <TRACE>) {
}
}
#
# Exit out if there are no actual file accesses
#
if ($first_data_line)
{
$strtm = strftime("%a %b %e %H:%M:%S %Y", localtime($starttime));
print "This darshan log has no file records. No summary was produced.\n";
print " jobid:$jobid\n";
print " uid:$uid\n";
print "starttime: $strtm ($starttime )\n";
print " runtime:$runtime (seconds)\n";
print " nprocs:$nprocs\n";
print " version: $version\n";
close(TRACE);
exit(1);
}
# process last file record
$file_record_hash{CP_NAME_SUFFIX} = $fields[4];
process_file_record($current_rank, $current_hash, \%file_record_hash);
......
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