From f5a89eead043c11c1acece4df70e38c52a53b14b Mon Sep 17 00:00:00 2001 From: adityaranjan Date: Wed, 6 Mar 2024 15:00:49 -0500 Subject: [PATCH 1/2] minor fixes to projections reader --- pipit/readers/projections_reader.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pipit/readers/projections_reader.py b/pipit/readers/projections_reader.py index 38153e8f..128ef092 100644 --- a/pipit/readers/projections_reader.py +++ b/pipit/readers/projections_reader.py @@ -165,10 +165,9 @@ def read_sts_file(self): # Add to self.chares elif line_arr[0] == "CHARE": id = int(line_arr[1]) - name = line_arr[2][1 : len(line_arr[2]) - 1] - dimensions = int(line_arr[3]) + name = " ".join(line_arr[2:-1])[1:-1] + dimensions = int(line_arr[-1]) self.chares[id] = (name, dimensions) - # print(int(line_arr[1]), line_arr[2][1:len(line_arr[2]) - 1]) # add to self.entries elif line_arr[0] == "ENTRY": @@ -180,7 +179,6 @@ def read_sts_file(self): id = int(line_arr[2]) entry_name = line_arr[3][1 : len(line_arr[3]) - 1] chare_id = int(line_arr[4]) - # name = self.chares[chare_id][0] + '::' + entry_name self.entries[id] = (entry_name, chare_id) # Add to message_table @@ -525,7 +523,7 @@ def _read_log_file(self, rank_size) -> pd.DataFrame: "Message Length": msglen, "Event ID": event, "Send Time": send_time, - "Destinatopn PEs": destPEs, + "Destination PEs": destPEs, } _add_to_trace_dict( @@ -563,7 +561,7 @@ def _read_log_file(self, rank_size) -> pd.DataFrame: "Entry Type": "Processing", "Event ID": event, "Message Length": msglen, - "Recieve Time": recv_time, + "Receive Time": recv_time, "ID List": id, "CPU Start Time": cpu_start_time, "perf counts list": perf_counts, From 4600d089b14f1544e17b45af38284a85d58c3855 Mon Sep 17 00:00:00 2001 From: adityaranjan Date: Wed, 6 Mar 2024 15:04:32 -0500 Subject: [PATCH 2/2] minor style --- pipit/readers/otf2_reader.py | 6 +++--- pipit/util/cct.py | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pipit/readers/otf2_reader.py b/pipit/readers/otf2_reader.py index b1fae889..b685c3a7 100644 --- a/pipit/readers/otf2_reader.py +++ b/pipit/readers/otf2_reader.py @@ -316,9 +316,9 @@ def events_reader(self, rank_size): if value is not None and key != "time": # uses field_to_val to convert all data types # and ensure that there are no pickling errors - attributes_dict[ - self.field_to_val(key) - ] = self.handle_data(value) + attributes_dict[self.field_to_val(key)] = ( + self.handle_data(value) + ) event_attributes.append(attributes_dict) else: # nan attributes for leave rows diff --git a/pipit/util/cct.py b/pipit/util/cct.py index 6557a588..b4992271 100644 --- a/pipit/util/cct.py +++ b/pipit/util/cct.py @@ -86,9 +86,11 @@ def create_cct(events): # add node as root or child of its # parent depending on current depth - graph.add_root( - curr_node - ) if curr_depth == 0 else parent_node.add_child(curr_node) + ( + graph.add_root(curr_node) + if curr_depth == 0 + else parent_node.add_child(curr_node) + ) # Update nodes stack, column, and current depth nodes_stack.append(curr_node)