-
Notifications
You must be signed in to change notification settings - Fork 137
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
Energy density estimator itself #5139
Energy density estimator itself #5139
Conversation
1e97473
to
07153b5
Compare
virtual std::size_t getFullDataSize() const { return data_.size(); } | ||
virtual void packData(PooledData<Real>& buffer); | ||
virtual void unpackData(PooledData<Real>& buffer); |
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 document these two functions explicitly buffer->local or local->buffer.
@@ -55,10 +54,12 @@ class PerParticleHamiltonianLogger : public OperatorEstBase | |||
|
|||
void write(CrowdLogValues& values, const std::vector<long>& walkers_ids); | |||
|
|||
Real sumOverAll(); |
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.
sumOverAll() const
?
int get_block() { return block_; } | ||
private: | ||
bool crowd_clone = false; | ||
PerParticleHamiltonianLogger * const rank_estimator_; | ||
PerParticleHamiltonianLogger* const rank_estimator_; |
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.
Can we use const OptionalRef<PerParticleHamiltonianLogger>
?
General comment on functions such as |
The purpose of sumOverAll is shown in The pack and unpack data will be used in the next PR. It seems that either the MPI communicator would have to travel over the rank scope estimators or they would need deliver either the addresses of their data or a copy of their data to the MPI communicator. I decided that for now a single packed copy with lifetime decoupled from the estimators provided the best compromise between decoupling, performance, and memory use. The documentation for that will be in the next PR since we haven't made to the enclosing scope or level in the call stack where the buffer lives. |
Restore spawnCrowdClone() const
Test this please |
Please review the developer documentation
on the wiki of this project that contains help and requirements.
Proposed changes
Describe what this PR changes and why. If it closes an issue, link to it here
with a supported keyword.
What type(s) of changes does this code introduce?
Delete the items that do not apply
Does this introduce a breaking change?
What systems has this change been tested on?
Checklist
Update the following with a yes where the items apply. If you're unsure about any of them, don't hesitate to ask. This is
simply a reminder of what we are going to look for before merging your code.