-
Notifications
You must be signed in to change notification settings - Fork 139
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
MCPopulation now gives walkers useful walker and parent ids #5063
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.
Thank you for breaking up the initial PR.
I leave a few comments and questions but questions needs to be sorted out but should not be blocking.
src/QMCDrivers/MCPopulation.cpp
Outdated
@@ -156,27 +210,27 @@ WalkerElementsRef MCPopulation::spawnWalker() | |||
walkers_.back()->Age = 0; | |||
walkers_.back()->Multiplicity = 1.0; | |||
walkers_.back()->Weight = 1.0; | |||
// this does count as a walker creation so it gets a new walker id | |||
auto walker_id = nextWalkerID(); | |||
walkers_.back()->setWalkerID(walker_id); |
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.
Fuse the above 2 lines in one?
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.
Seems just as clear will do.
src/QMCDrivers/MCPopulation.cpp
Outdated
@@ -293,8 +347,16 @@ void MCPopulation::saveWalkerConfigurations(WalkerConfigurations& walker_configs | |||
walker_configs.resize(walker_elec_particle_sets_.size(), elec_particle_set_->getTotalNum()); | |||
for (int iw = 0; iw < walker_elec_particle_sets_.size(); iw++) | |||
{ | |||
// The semantics of this call are not what would I would expecte. |
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.
typo expect
src/QMCDrivers/MCPopulation.cpp
Outdated
for (size_t iw = 0; iw < num_walkers_plus_reserve; iw++) | ||
{ | ||
walkers_[iw] = std::make_unique<MCPWalker>(elec_particle_set_->getTotalNum()); | ||
int parent_id = 0; | ||
walkers_[iw] = std::make_unique<MCPWalker>(walker_ids[iw], parent_id, elec_particle_set_->getTotalNum() ); |
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.
could you do "0 /* parent_id */"?
Comment: shocked to find out Walker
class has 4 constructors.
auto walker_id = nextWalkerID(); | ||
app_warning() << "Spawning walker ID " << walker_id << " this is living walker number " << walkers_.size() | ||
<< "which is beyond the allocated walker reserves, ideally this should never happen." << '\n'; | ||
walkers_.push_back(std::make_unique<MCPWalker>(*(walkers_.back()), walker_id, 0)); |
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.
put "0 /* parent_id */"
Please address the remaining minor issues and this PR will be ready to go. |
Test this please |
I have no ideas on the osx CI failure and can't reproduce it, I can't build with gcc-12 at all on my mac, there are problems just compiling with GCC-12 and the osx headers for me. Homebrew is onto gcc-14 at this point. gcc-14 has some sort of issue with catch. current llvm is fine. @jptowns already reported this bus error but resolved it by going to gcc-14 but with M1/2 mac and not sure the OSX rev. But I have compile issues with that gcc in osx 14.5 on my x86 mac... |
Proposed changes
segment of #5010
Walker
MCPopulation
What type(s) of changes does this code introduce?
There is should be no user observable change except due to #5019 where walker_id's will be different but still undependable.
Does this introduce a breaking change?
What systems has this change been tested on?
OSX laptop
linux x86 vm
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.