The merger module

Utilities to process the data from a single .cubex file, or merge the information that comes from multiple .cubex files.

Single/Multi .cubex files processing

merger.process_cubex(profile_file, exclusive=True)

Processes a single .cubex file, returning the numeric data from the profiling, plus information about the call tree and the metrics.

Note: returns a dict.

Parameters
  • profile_file (str) – The name of the .cubex file.

  • exclusive (bool) – Whether to ask cube_dump for exclusive (True) or inclusive (False) metrics.

Returns

  • ctree (calltree.CubeTreeNode) – A call tree recursive object

  • ctree_df (pandas.DataFrame) – A DataFrame representation of the call tree object

  • df (pandas.DataFrame) – A dataframe containing the profiling data, from

  • conv_info (list) – convertibility information (to inclusive) for the metrics contained in the dump.

merger.process_multi(profile_files, exclusive=True)

Processes .cubex files coming from different profiling runs, e.g. from a scalasca -analyze run, aggregating the results.

Assumes that there is a set of metrics which are common to all files, and that no pair of files share metrics that are not shared by all the others.

Note: returns a dict.

Parameters
  • profile_file (list) – List of .cubex filenames;

  • exclusive (bool) – Whether to ask cube_dump for exclusive (True) or inclusive (False) metrics.

Returns

  • ctree (calltree.CubeTreeNode) – A call tree recursive structure;

  • ctree_df (pandas.DataFrame) – DataFrame representation of the call tree;

  • common (pandas.DataFrame) – A data frame containing all the data relative to metrics that are shared among all the .cubex files (“common” metrics);

  • noncommon (pandas.DataFrame) – A data frame containing all the data relatige that are specific to single .cubex files (“non-common” metrics);

  • conv_info (list) – A list of metrics that can be converted to inclusive.

  • ncmetric (padas.DataFrame) – A dataframe expressing, for each metric coming from only a single .cubex file (the “non-common” metrics) the ID of the run it came from.