-
Notifications
You must be signed in to change notification settings - Fork 28
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 option to allow Lumberjack to own communicator #1513
base: develop
Are you sure you want to change the base?
Conversation
|
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.
Looks okay to me pending the comment of @white238 .
…/github.com/LLNL/axom into feature/bergel1/lumberjack_set_communicator
To Address comments from @white238, the following were added to this PR:
|
👍 |
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.
Please add setCommunicator(). Actually, if setCommunicator() returned existing communicator, then swapCommunicator() would not be needed.
@rhornung67 I changed the name of |
@gberg617 my preference is to just go with |
Co-authored-by: Chris White <[email protected]>
Co-authored-by: Chris White <[email protected]>
Co-authored-by: Chris White <[email protected]>
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 @gberg617
src/axom/lumberjack/Lumberjack.cpp
Outdated
void Lumberjack::setCommunicator(Communicator* communicator) | ||
{ | ||
if(m_isCommunicatorOwned && m_communicator != nullptr) | ||
{ | ||
m_communicator->finalize(); | ||
delete m_communicator; | ||
} | ||
m_communicator = communicator; | ||
} |
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.
Should this function allow the user to indicate if the new communicator is owned?
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 added a bool flag to allow the user to set the ownership of the communicator passed in. I am assuming that the user has to set the ownership flag (i.e. it's not an optional parameter). Let me know if there are any issues with this.
…/github.com/LLNL/axom into feature/bergel1/lumberjack_set_communicator
Summary