Skip to content

Commit

Permalink
updated to use new _matching_message_event column
Browse files Browse the repository at this point in the history
  • Loading branch information
movsesyanae committed Oct 30, 2024
1 parent 7c87624 commit 098318e
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions pipit/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,10 @@ def _match_messages(self):
"""
Matches corresponding MpiSend/MpiRecv and MpiIsend/MpiIrecv instant events
"""
if "_matching_event" not in self.events.columns:
self.events["_matching_event"] = None

if "_matching_timestamp" not in self.events.columns:
self.events["_matching_timestamp"] = np.nan
if "_matching_message_event" not in self.events.columns:
self.events["_matching_message_event"] = None

matching_events = list(self.events["_matching_event"])
matching_times = list(self.events["_matching_timestamp"])
matching_events = list(self.events["_matching_message_event"])

# Filter by send/receive events
send_events_names = ["MpiSend", "MpiISend"]
Expand Down Expand Up @@ -272,13 +268,9 @@ def _match_messages(self):
matching_events[send_df_index] = curr_df_index
matching_events[curr_df_index] = send_df_index

matching_times[send_df_index] = curr_timestamp
matching_times[curr_df_index] = send_timestamp

self.events["_matching_event"] = matching_events
self.events["_matching_timestamp"] = matching_times

self.events = self.events.astype({"_matching_event": "Int32"})
self.events["_matching_message_event"] = matching_events
self.events = self.events.astype({"_matching_message_event": "Int32"})

def _match_caller_callee(self):
"""Matches callers (parents) to callees (children) and adds three
Expand Down

0 comments on commit 098318e

Please sign in to comment.