Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track Message Type in Execution Graph #175

Merged
merged 4 commits into from
Nov 12, 2021
Merged

Track Message Type in Execution Graph #175

merged 4 commits into from
Nov 12, 2021

Conversation

csegarragonz
Copy link
Collaborator

@csegarragonz csegarragonz commented Nov 12, 2021

I am half-hearted on wether we should merge this in or not. On the one hand it is useful to have, and doesn't do any harm. On the other hand, it's just a profiling tool we have used at a point in time.

I am slightly leaning towards merging it in, but also happy to keep this out.

@csegarragonz csegarragonz self-assigned this Nov 12, 2021
@@ -36,8 +36,6 @@ TEST_CASE_METHOD(MpiTestFixture,
rankA1, rankA2, BYTES(buffer), MPI_INT, messageData.size(), &status);
}

REQUIRE(msg.intexecgraphdetails_size() == 1);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have had to increase this number every time we tracked a different thing. It did not seem a useful thing to test/easy to forget to change.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See point about constant above, I think this is worth testing.

@csegarragonz csegarragonz marked this pull request as ready for review November 12, 2021 10:11
@@ -16,4 +16,6 @@ void incrementCounter(faabric::Message& msg,
const int valueToIncrement = 1);

static inline std::string const mpiMsgCountPrefix = "mpi-msgcount-torank-";

static inline std::string const mpiMsgTypeCountPrefix = "mpi-msgtype-torank";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember what the conclusion of our last discussion on these two points was, but to reiterate (feel free to ignore) I think these constants should (a) be #defines to fit with the style of the repo; (b) live in the MPI headers if possible because (i) they're MPI specific; (ii) this list will continue to grow and potentiall become quite big otherwise.

Either way, re. your point below about tracking the number of fields, I think it's still useful, but to more obviously connect them up, I'd add a constant wherever these labels are defined, e.g. #define N_MPI_EXEC_GRAPH_DETAILS 2, then use that in the test.

@@ -36,8 +36,6 @@ TEST_CASE_METHOD(MpiTestFixture,
rankA1, rankA2, BYTES(buffer), MPI_INT, messageData.size(), &status);
}

REQUIRE(msg.intexecgraphdetails_size() == 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See point about constant above, I think this is worth testing.

Copy link
Collaborator

@Shillaker Shillaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, one small question, feel free to disregard.


// Work out the message type breakdown
faabric::util::exec_graph::incrementCounter(
*thisRankMsg,
fmt::format("{}-{}-{}",
faabric::util::exec_graph::mpiMsgTypeCountPrefix,
MPI_MSGTYPE_COUNT_PREFIX,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this string format then result in a double hyphen at the beginning (as the prefix already has a hyphen)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the MSGTYPE_COUNT we have to provide two values, so the constant actually hasn't got a trailing hyphen. I will change it to make them both consistent.

@csegarragonz csegarragonz merged commit 38cc87f into master Nov 12, 2021
@csegarragonz csegarragonz deleted the track-msg-type branch November 12, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants