From 1518d7e0033bf5d61c7112602abf60a31f43a68d Mon Sep 17 00:00:00 2001 From: Ninad Prabhukhanolkar Date: Thu, 26 Apr 2018 15:01:11 +0530 Subject: [PATCH] Updated aggregate_profile.pl The files array was also storing $phase.prof. This was leading to $phase.prof's output getting dumped into itself again and again. Updated code to initialise files array with files other than $phase.prof. Signed-off-by: Ninad Prabhukhanolkar --- ompi/mca/common/monitoring/aggregate_profile.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ompi/mca/common/monitoring/aggregate_profile.pl b/ompi/mca/common/monitoring/aggregate_profile.pl index 2af537b5ae..1af60b9337 100644 --- a/ompi/mca/common/monitoring/aggregate_profile.pl +++ b/ompi/mca/common/monitoring/aggregate_profile.pl @@ -53,12 +53,13 @@ foreach $id (sort {$a <=> $b} keys %phaseid) { sub aggregate{ $phase = $_[0]; - + #Aggregating all files of given phase in files array.This should be done + # before creating $phase.prof to avoid adding $phase.prof to files array + @files = glob ($phase."*"); print "Building $phase.prof\n"; open OUT,">$phase.prof"; - @files = glob ($phase."*"); foreach $file ( @files) { open IN,$file;