From 02c2281f0fbf7c97f872ff7421a023c069dfa581 Mon Sep 17 00:00:00 2001
From: Jonathon Lynn Duerig <duerig@flux.utah.edu>
Date: Wed, 19 Sep 2007 18:57:29 +0000
Subject: [PATCH] Added explicit handling of the nan case.

---
 pelab/bw-bottleneck/sharedBottle.pl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/pelab/bw-bottleneck/sharedBottle.pl b/pelab/bw-bottleneck/sharedBottle.pl
index a9c2de042f..d6230c3317 100644
--- a/pelab/bw-bottleneck/sharedBottle.pl
+++ b/pelab/bw-bottleneck/sharedBottle.pl
@@ -146,7 +146,7 @@ foreach $sourceName (readdir(logsDirHandle))
                         $filterFile2 = $fullPath . "/" . "dest1.filter";
                         $filterFile3 = $fullPath . "/" . "dest2.filter";
 
-                        if (!(-r $filterFile1) || !(-r $filterFile2) || !($filterFile3))
+                        if (!(-r $filterFile1) || !(-r $filterFile2) || !(-r $filterFile3))
                         {
                             print "Missing file. Cannot process $fullPath\n";
                             continue;
@@ -167,7 +167,9 @@ foreach $sourceName (readdir(logsDirHandle))
                         if($scriptOutput[$#scriptOutput - 1] =~ /last CHANGE\s(\w*)\s(\w*)\,[\w\d\W\:\,]*/)
                         {
                             print "For source $sourceName: Comparing $destOne $destTwo: $scriptOutput[$#scriptOutput]";
-                            if($2 eq "CORRELATED")
+			    $corrResult = $2;
+                            if($corrResult eq "CORRELATED"
+			       && !($scriptOutput[$#scriptOutput] =~ /nan/))
                             {
                                 push(@{ $bottleNecks{$sourceName} },$destOne . ":" . $destTwo);
                                 push(@destLists,$destOne);
@@ -175,7 +177,8 @@ foreach $sourceName (readdir(logsDirHandle))
                                 print "CORRELATED\n\n";
 
                             }
-                            elsif($2 eq "UNCORRELATED")
+                            elsif($corrResult eq "UNCORRELATED"
+				  && !($scriptOutput[$#scriptOutput] =~ /nan/))
                             {
                                 push(@destLists,$destOne);
                                 push(@destLists,$destTwo);
-- 
GitLab