Commit 6993b2b3 authored by Kevin Harms's avatar Kevin Harms
Browse files

Add a warning when per-file system data isn't shown for log version previous to 1.24.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@310 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 9eea459b
...@@ -101,6 +101,12 @@ while ($line = <TRACE>) { ...@@ -101,6 +101,12 @@ while ($line = <TRACE>) {
if ($line =~ /^# jobid: /) { if ($line =~ /^# jobid: /) {
($junk, $jobid) = split(':', $line, 2); ($junk, $jobid) = split(':', $line, 2);
} }
if ($line =~ /^# darshan log version: /) {
($junk, $version) = split(':', $line, 2);
$version =~ s/^\s+//;
($major, $minor) = split(/\./, $version, 2);
print "version:$version major:$major minor:$minor\n";
}
} }
else { else {
# parse line # parse line
...@@ -642,49 +648,59 @@ close(TABLES); ...@@ -642,49 +648,59 @@ close(TABLES);
# Generate Per Filesystem Data # Generate Per Filesystem Data
# #
open(TABLES, ">$tmp_dir/fs-data-table.tex") || die("error opening output files:$!\n"); open(TABLES, ">$tmp_dir/fs-data-table.tex") || die("error opening output files:$!\n");
print TABLES " if (($major > 1) or ($minor > 23))
\\begin{tabular}{c|r|r|r|r}
\\multicolumn{5}{c}{ } \\\\
\\multicolumn{5}{c}{Data Transfer Per Filesystem} \\\\
\\hline
\\multirow{2}{*}{File System} \& \\multicolumn{2}{c}{Write} \\vline \& \\multicolumn{2}{c}{Read} \\\\
\\cline{2-5}
\& MiB \& Ratio \& MiB \& Ratio \\\\\
\\hline
\\hline
";
foreach $key (keys %fs_data)
{ {
my $wr_total_mb = ($fs_data{$key}->[1] / (1024*1024)); print TABLES "
my $rd_total_mb = ($fs_data{$key}->[0] / (1024*1024)); \\begin{tabular}{c|r|r|r|r}
my $wr_total_rt; \\multicolumn{5}{c}{ } \\\\
\\multicolumn{5}{c}{Data Transfer Per Filesystem} \\\\
if ($cumul_write_bytes_shared+$cumul_write_bytes_shared) \\hline
{ \\multirow{2}{*}{File System} \& \\multicolumn{2}{c}{Write} \\vline \& \\multicolumn{2}{c}{Read} \\\\
$wr_total_rt = ($fs_data{$key}->[1] / ($cumul_write_bytes_shared + $cumul_write_bytes_indep)); \\cline{2-5}
} \& MiB \& Ratio \& MiB \& Ratio \\\\\
else \\hline
\\hline
";
foreach $key (keys %fs_data)
{ {
$wr_total_rt = 0; my $wr_total_mb = ($fs_data{$key}->[1] / (1024*1024));
} my $rd_total_mb = ($fs_data{$key}->[0] / (1024*1024));
my $wr_total_rt;
my $rd_total_rt; if ($cumul_write_bytes_shared+$cumul_write_bytes_shared)
if ($cumul_read_bytes_shared+$cumul_read_bytes_indep) {
{ $wr_total_rt = ($fs_data{$key}->[1] / ($cumul_write_bytes_shared + $cumul_write_bytes_indep));
$rd_total_rt = ($fs_data{$key}->[0] / ($cumul_read_bytes_shared + $cumul_read_bytes_indep)); }
} else
else {
{ $wr_total_rt = 0;
$rd_total_rt = 0; }
}
my $rd_total_rt;
if ($cumul_read_bytes_shared+$cumul_read_bytes_indep)
{
$rd_total_rt = ($fs_data{$key}->[0] / ($cumul_read_bytes_shared + $cumul_read_bytes_indep));
}
else
{
$rd_total_rt = 0;
}
printf TABLES "%s \& %.5f \& %.5f \& %.5f \& %.5f \\\\\n", printf TABLES "%s \& %.5f \& %.5f \& %.5f \& %.5f \\\\\n",
$key, $wr_total_mb, $wr_total_rt, $rd_total_mb, $rd_total_rt; $key, $wr_total_mb, $wr_total_rt, $rd_total_mb, $rd_total_rt;
} }
print TABLES " print TABLES "
\\hline \\hline
\\end{tabular} \\end{tabular}
"; ";
}
else
{
print TABLES "
\\rule{0in}{1in}
\\parbox{5in}{Log versions prior to 1.24 do not support per-filesystem data.}
";
}
close(TABLES); close(TABLES);
......
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