Index: gs2-extensions/parallel-building/trunk/src/bin/script/generate_gantt.pl
===================================================================
--- gs2-extensions/parallel-building/trunk/src/bin/script/generate_gantt.pl	(revision 27682)
+++ gs2-extensions/parallel-building/trunk/src/bin/script/generate_gantt.pl	(revision 27683)
@@ -129,6 +129,14 @@
       elsif ($parts[1] =~ /W\d+/)
       {
-        $timing_data->{$parts[1]} = {'N'=>$parts[2], 'S'=>$parts[3], 'E'=>$parts[4], 'F'=>{}};
-        $id_2_worker_id->{$parts[0]} = $parts[1];
+        my $worker_id = $parts[1];
+        my $hostname = $parts[2];
+        # Alter the worker name for compute nodes so they can be naturally
+        # sorted
+        if ($hostname =~ /compute-0-(\d+)/)
+        {
+          $worker_id = 'W' . $1;
+        }
+        $timing_data->{$worker_id} = {'N'=>$hostname, 'S'=>$parts[3], 'E'=>$parts[4], 'F'=>{}};
+        $id_2_worker_id->{$parts[0]} = $worker_id;
       }
       elsif ($parts[1] =~ /T\d+/)
@@ -159,7 +167,7 @@
   print HTMLOUT 'div.thread {position:relative}' . "\n";
   print HTMLOUT 'div.master {border:1px solid gray;color:white;font-weight:bold}' . "\n";
-  print HTMLOUT 'div.worker {border:1px solid black;background-color:green;color:white;font-weight:bold}' . "\n";
+  print HTMLOUT 'div.worker {border:1px solid black;background-color:green;color:white;font-weight:bold;margin-bottom:1px;}' . "\n";
   print HTMLOUT 'div.time {font-size:smaller;font-weight:normal}' . "\n";
-  print HTMLOUT 'div.job {background-color:transparent;color:black;border:1px solid black;display:block;font-size:smaller;position:relative;text-align:center;overflow:hidden}' . "\n";
+  print HTMLOUT 'div.job {background-color:transparent;color:black;border:1px solid black;display:block;font-size:smaller;position:relative;text-align:center;overflow:hidden;margin-bottom:1px;}' . "\n";
   print HTMLOUT 'span.process {z-index:-1;background-color:#C7C7C7;position:absolute}' . "\n";
   print HTMLOUT 'span.label {z-index:1;background-color:transparent;overflow:hidden;white-space:nowrap;}' . "\n";
@@ -169,5 +177,5 @@
   print HTMLOUT "<body>\n";
   print HTMLOUT "<h2>Statistics</h2>\n";
-  print HTMLOUT "<table>\n";
+  print HTMLOUT "<table style=\"width:100%;\">\n";
 
   my $total_duration = $timing_data->{'M'}->{'E'} - $timing_data->{'M'}->{'S'};
@@ -229,27 +237,51 @@
   my $avg_cpu_time = int(($total_process_time / $file_count) + 0.5);
 
-  print HTMLOUT "<tr><th>Import Directory:</th><td>" . $import_dir . "</td></tr>\n";
+  print HTMLOUT "<tr>\n";
+  print HTMLOUT ' <th style="width:12%;">Import Directory:</th><td style="width:22%;" colspan="5">' . $import_dir . "</td>\n";
+  print HTMLOUT "</tr>\n";
+
+  print HTMLOUT "<tr>\n";
   my ($sec, $min, $hour, $day, $month, $year) = (localtime($timing_data->{'M'}->{'S'}))[0,1,2,3,4,5];
-  print HTMLOUT "<tr><th>Start Time:</th><td>" . sprintf('%04d%s%02d %02d:%02d:%02d', ($year+1900), $months[$month], $day, $hour, $min, $sec) . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Processing Time:</th><td>" . &renderTime($total_duration) . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Processing Threads:</th><td>" . $number_of_workers . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Files Processed:</th><td>" . $file_count . "</td></tr>\n";
+  print HTMLOUT ' <th style="width:11%;">Start Time:</th><td style="width:22%;">' . sprintf('%04d%s%02d %02d:%02d:%02d', ($year+1900), $months[$month], $day, $hour, $min, $sec) . "</td>\n";
+  ($sec, $min, $hour, $day, $month, $year) = (localtime($timing_data->{'M'}->{'E'}))[0,1,2,3,4,5];
+  print HTMLOUT ' <th style="width:11%;">End Time:</th><td style="width:22%;">' . sprintf('%04d%s%02d %02d:%02d:%02d', ($year+1900), $months[$month], $day, $hour, $min, $sec) . "</td>\n";
+  print HTMLOUT "  <th>Processing Time:</th><td>" . &renderTime($total_duration) . "</td>\n";
+  print HTMLOUT "</tr>\n";
+
+  print HTMLOUT "<tr>\n";
+  print HTMLOUT "  <th>Processing Threads:</th><td>" . $number_of_workers . "</td>\n";
+  print HTMLOUT "  <th>Files Processed:</th><td>" . $file_count . "</td>\n";
+  print HTMLOUT "  <th>Problem Files:</th><td>" . $problem_files . "</td>\n";
+  print HTMLOUT "</tr>\n";
+
+  print HTMLOUT "<tr>\n";
+  print HTMLOUT '  <th>Serial Processing Time:</th><td>' . &renderTime($total_process_time) . "</td>\n";
+  print HTMLOUT '  <th>Serial IO Time:</th><td>' . &renderTime($total_io_time) . "</td>\n";
+  print HTMLOUT '  <th>IO Percentage:</th><td>' . sprintf('%d%%', (($total_io_time / $total_process_time) * 100)) . "</td>\n";
+  print HTMLOUT "</tr>\n";
+
+  print HTMLOUT "<tr>\n";
+  print HTMLOUT "  <th>Average Processing Time:</th><td>" . &renderTime($avg_processing_time) . "</td>\n";
+  print HTMLOUT "  <th>Average File IO Time:</th><td>" . &renderTime($avg_io_time) . "</td>\n";
+  print HTMLOUT "  <th>Average File CPU Time:</th><td>" . &renderTime($avg_cpu_time) . "</td>\n";
+  print HTMLOUT "</tr>\n";
+
+  print HTMLOUT "<tr>\n";
+  print HTMLOUT "  <th>Fastest File:</th><td>" . &renderTime($fastest_file) . "</td>\n";
+  print HTMLOUT "  <th>Slowest File:</th><td>" . &renderTime($slowest_file) . "</td>\n";
   if ($data_locality > 0)
   {
-    print HTMLOUT "<tr><th>Data Locality:</th><td>" . sprintf('%d%% [%d out of %d]', (($data_locality / $file_count) * 100), $data_locality, $file_count) . "</td></tr>\n";
-  }
-  print HTMLOUT "<tr><th>Serial Processing Time:</th><td>" . &renderTime($total_process_time) . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Serial IO Time:</th><td>" . &renderTime($total_io_time) . "</td></tr>\n";
-  print HTMLOUT '<tr><th>IO Percentage:</th><td>' . sprintf('%d%%', (($total_io_time / $total_process_time) * 100)) . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Average File Processing Time:</th><td>" . &renderTime($avg_processing_time) . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Average File IO Time:</th><td>" . &renderTime($avg_io_time) . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Average File CPU Time:</th><td>" . &renderTime($avg_cpu_time) . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Fastest File:</th><td>" . &renderTime($fastest_file) . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Slowest File:</th><td>" . &renderTime($slowest_file) . "</td></tr>\n";
-  print HTMLOUT "<tr><th>Problem Files:</th><td>" . $problem_files . "</td></tr>\n";
+    print HTMLOUT "  <th>Data Locality:</th><td>" . sprintf('%d%% [%d out of %d]', (($data_locality / $file_count) * 100), $data_locality, $file_count) . "</td>\n";
+  }
+  else
+  {
+    print HTMLOUT "  <th></th>\n";
+    print HTMLOUT "  <td></td>\n";
+  }
+  print HTMLOUT "</tr>\n";
 
   print HTMLOUT "</table>\n";
   print HTMLOUT "<hr />\n";
-  print HTMLOUT "<h2>Timing Chart (Gannt)</h2>\n";
+  print HTMLOUT "<h2>Timing Chart (Gantt)</h2>\n";
   print HTMLOUT renderLine($chart_width, $timing_data->{'M'}->{'S'}, $timing_data->{'M'}->{'E'}, 'master', $timing_data->{'M'}->{'N'}, $timing_data->{'M'}->{'S'}, $timing_data->{'M'}->{'E'}, {});
   foreach my $worker_id (nsort keys %{$timing_data})
@@ -392,5 +424,5 @@
   if ($class eq 'master')
   {
-    $html .= '<div style="background-color:blue">';
+    $html .= '<div style="background-color:blue;margin-bottom:1px">';
   }
   $html .= '<div class="time" style="display:table-cell">' . &renderTime($rtstart) . '</div><div style="display:table-cell;padding-left:20px;width:100%;">' . ucfirst($class) . ': ' . $tname . '</div><div class="time" style="display:table-cell">' . renderTime($rtend) . '</div></div>';
@@ -409,5 +441,6 @@
     my $jleft = int(($jleft_percent * $table_width) + 0.5);
     my $jwidth_percent = $jduration / $duration;
-    my $jwidth = int(($jwidth_percent * $table_width) + 0.5);
+    # -2 for left and right 1 pixel border
+    my $jwidth = int(($jwidth_percent * $table_width) + 0.5) - 2;
     if ($jleft + $jwidth > $left + $width)
     {
