-
Notifications
You must be signed in to change notification settings - Fork 0
14 write comm tests #17
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,186 @@ | ||||||
| /* | ||||||
| //@HEADER | ||||||
| // ***************************************************************************** | ||||||
| // | ||||||
| // test_comm.h | ||||||
|
||||||
| // test_comm.h | |
| // test_comm.cc |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -131,7 +131,7 @@ inline std::string getUniqueFilename(const std::string& ext = "") { | |
| */ | ||
| #define SET_MIN_NUM_NODES_CONSTRAINT(min_req_num_nodes) \ | ||
| { \ | ||
| auto const num_nodes = comm.numRanks(); \ | ||
| auto const num_nodes = this->comm.numRanks(); \ | ||
|
||
| if (num_nodes < min_req_num_nodes) { \ | ||
| GTEST_SKIP() << fmt::format( \ | ||
| "Skipping the run on {} nodes. This test should run on at least {} "\ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] While
std::addressof(val.at(0))is functionally correct, usingval.data()would be more idiomatic for obtaining a pointer to the container's underlying data. For example:std::memcpy(ctx->out_ptr, val.data(), sizeof(ValT) * std::max<std::size_t>(1, ctx->count));