1
  5  ëˆl–ß=¿J	•4Å2 Cp.\JbÑ¿�þ]nU›•×¥qæBØ€çØƒÏ;ÞÀÛ _   ë#!/usr/bin/perl -w

#
# Copyright (c) 2013-2015 The University of Tennessee and The University
#                         of Tennessee Research Foundation.  All rights
#                         reserved.
# Copyright (c) 2013-2015 Inria.  All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

#
# Author Emmanuel Jeannot <emmanuel.jeannot@inria.fr>
#
# This script aggregates the profiles generated by the flush_monitoring function.
# The files need to be in in given format: name_<phase_id>_<process_id>
# They are then aggregated by phases.
# If one needs the profile of all the phases he can concatenate the different files,
# or use the output of the monitoring system done at MPI_Finalize
# in the example it should be call as:
# ./aggregate_profile.pl prof/phase to generate
# prof/phase_1.prof
# prof/phase_2.prof
#
# ensure that this script as the executable right: chmod +x ...
#

die "$0 <name of the  profile>\n\tProfile files should be of the form  \"name_phaseid_processesid.prof\"\n\tFor instance if you saved the monitoring into phase_0.0.prof, phase_0.1.prof, ..., phase_1.0.prof etc you should call: $0 phase\n" if ($#ARGV!=0);

$name = $ARGV[0];

@files = glob ($name."*");

%phaseid = ();


# Detect the different phases
foreach $file (@files) {
  ($id)=($file =~ m/$name\_(\d+)\.\d+/);
  $phaseid{$id} = 1 if ($id);
}

# for each phases aggregate the files
foreach $id (sort {$a <=> $b} keys %phaseid) {
  aggregate($name."_".$id);
}




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";


  foreach $file ( @files) {
    open IN,$file;
    while (<IN>) {
      print OUT;
    }
    close IN;
  }
  close OUT;
}
    íˆÖÕÞ570ÔÀÛ :   í‹      ½–M�Ú0†ïû+\z#C²ìv»›¤Ú¤¢ò%–ªªªœØ!ÁŽl³”þú%­ Í)3Îû}f,;á‹dÜ�}šôÐ»Ùp€&Þú]„[ ¯» É,q/:^Ûè�0Â…1Õ=Àz½öÖ×žTs˜M¡0Ë²Ú(ž�Šã«p;_¡°`„Ú'
7%‹û‚²¯HæäÊhN™�¹Z¥%Ï@åRƒf‚æ¼deKéÚË¤¬ìBTfº¥uyPw ä)LAsÃZ6TDm Ò0d†„àÖ´.`o#L%ÝlÝù;±îŠ@Ò�¡m¨âÐè™”|."ld…ã�/çH«,ÂÀ3)4¤%oÎsŒHi"ü¹ß±:0Åöë8$¨P,�ð›n4zG	ŽGdÉB §5C«yÄñ€hƒ–’òœ3zVüäÄOüÛù	§I˜Î¯—â(‹XGÍd©+bYo,A¡ê*'¡ªÉ~*ÆäqÚÍ’þÔ•„n§8ºûÏ}Åñ„(&J¸b™‘j³'w6^ŠTW‡í¹ŸÇµÐIå?c%B®E½¶Ö'+1¥ž¢ÇîY·ù‹¯ -ßoµäû÷�„Î	½öûrFÌJ1í0êÙ%`ü h²…fDe…c©%AñîšìKÉÅbß”á%0îný&;"t_äÒqãK€¼º}Ý$HeH2gŽ¤–\fk¿ÙZyÌÃþaw‡à~¾\Ç¶‰    7  ïˆl–äY>”Ên-ji@¿pB¸ÈÅ£�þYM¬à„ãñŒBy÷�üÿÙ„žqÿßÁÜ 2E   ï#!/usr/bin/perl

# desktop2menu: This program generates a skeleton menu file from a
# freedesktop.org desktop file
#
# Written by Sune Vuorela <debian@pusling.com>
# Modifications by Adam D. Barratt <adam@adam-barratt.org.uk>
# Copyright 2007 Sune Vuorela <debian@pusling.com>
# Modifications Copyright 2007 Adam D. Barratt <adam@adam-barratt.org.uk>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

=head1 NAME

desktop2menu - create a menu file skeleton from a desktop file

=head1 SYNOPSIS

B<desktop2menu> B<--help>|B<--version>

B<desktop2menu> I<desktop file> [I<package name>]

=head1 DESCRIPTION

B<desktop2menu> generates a skeleton menu file from the supplied
freedesktop.org desktop file.

The package name to be used in the menu file may be passed as an additional
argument. If it is not suppli