-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add OMEGA Broadcast functions #36
Add OMEGA Broadcast functions #36
Conversation
This PR adds OMEGA broadcasting functions with documentation. * implements blocking broadcast functions * adds testings for the functions * adds user-guide and developer-guide
@philipwjones , I have made modifications to two lines of the Broadcast design document, where the MachEnv function argument has been updated to a pointer variable. |
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.
Other than the changes noted, this looks good and passes tests on Chrysalis. I'll try building the docs and re-test when the rank and style changes are done.
|
||
//------------------------------------------------------------------------------ | ||
// Broadcast I4 scalar value | ||
int Broadcast(I4 &value, const MachEnv *InEnv, const int rankBcast) { |
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.
Following the style guide, all vars start with a capital letter (I still have trouble with this too as evidenced by the design doc). So Value, RankBcast and Retval/RetVal throughout.
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.
renamed variables as suggested.
namespace OMEGA { | ||
|
||
// blocking broadcast scalar | ||
int Broadcast(I4 &value, const MachEnv *InEnv = MachEnv::getDefaultEnv(), |
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.
One big change here. We allow the MachEnv to define a MasterTask other than 0, so in all these interfaces, we want to set the argument RankBcast to an invalid value and extract MasterTask from the MachEnv.
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.
Thanks a lot for pointing this. Now, if user does not specify RankBcast value(default value is set to an invalid number of "-1"), the module get it using getMasterTask().
A few more changes after building the docs. Remember to add the Broadcast docs to the top-level index.md file. Also, could you make all the headings other than the main broadcast heading a level lower than the main heading. Right now, many of the subsections are showing up as top-level sections in the contents. |
One last (?) thing - I just realized these are in the infra directory. Can you please move them over to the base directory? That's where much of the MPI-related infrastructure should sit. The infra directory should be for utilities that are less dependent on the MPI model (eg Config, Logging, TimeManager, etc). That means also moving the docs, etc to match the change in location. Thanks. |
* properly use MasterRank in MachEnv instead of rank=0 * renamed variable names to match with Clang style * updated document accordingly
* moved Broadcast mode from infra to base directory * fixed bugs in document
@philipwjones Thanks a lot for the suggestions. I think I have applied all of your suggestions, and please review if the changes match with your thought. |
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.
Thanks for making the changes. I have confirmed unit tests pass on both Chrysalis (intel) and Frontier (crayclangcpu). I also built the documentation and it looks fine.
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.
I'm approving just based on a visual inspection of the docs. I don't have time at the moment to do a code review, sorry about that. But I think @philipwjones' review is sufficient.
FSD namelist flag and Abort.
This PR adds OMEGA broadcasting functions with documentation.
Checklist
NOTE: Non-blocking broadcast functions are NOT included in this PR.