0

(#143734) 915186754 SendMessage: sender 1, receiver 2, group 1000000000, type 24050, length 384, source 0
(#143781) 915248646 ReceiveMessage: receiver 1, sender 3, group 1000000000, type 24050, length 256, source 0
(#143658) 914941174 Collective: process 1, collective 11, group 1000000000, root 0, sent 0, received 0, duration 242440, source 0
(#143657) 914941174 Enter: MPI_Barrier, process 1, source 0
(#143728) 915183614 Leave: function 0, process 1, source 0

I have an input file that looks like the above. I need to:
1) Read in file // done
2) Determine if record type is "SendMessage", "ReceiveMessage", "Collective", "Enter", or "Leave"
3) Then parse data into the correct record struct.

I can think of a really inefficient loop looking for token "SendMessage", etc. Then for each message type I know the format of the rest of the record and can use the "," as a token to get the values. I'm wondering if there is a more elegant solution.

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by vijayan121
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.