-
Notifications
You must be signed in to change notification settings - Fork 142
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
Two body Jastrow issue when there are more than 2 particle types but only one particle of each type #3137
Comments
Changing J2OrbitalSoA.h, line 409 from
to
fixes the issue for me. I don't know if the same change needs to be done in DiffTwoBodyJastrowOrbital.h or not. |
The problem comes in from J2OrbitalSoA.h::computeU3 where it loops over all the functors for all inter-particle types, including the same particle interactions. These don't exist if there is only one particle of each type, so the functor (f2) is NULL. Access to the member variable DeltaRInv fails. The solutions are either to check for a NULL functor, or ensure all the functors are defined. The It looks like the current special case ( |
Here's a fix that should work. Two changes
I don't know if this will fix the original
|
Ah Thanks for the quick replies. I will give this a try now |
This does fix the issue and it doesn't seem to be breaking the u/d only case. (All the deterministic tests pass and I think the u/d case is covered by https://github.com/QMCPACK/qmcpack/blob/develop/src/QMCWaveFunctions/tests/test_wf.cpp since it was also modified in #364) |
Describe the bug
Thanks to @markdewing, I was able to progress further until I broke things again 😄
When running a calculation with 1 particle in each of >2 particle types, there is a segfault.
To Reproduce
Steps to reproduce the behavior:
cmake -DCMAKE_BUILD_TYPE=Debug ..
qmcpack H_wpos.qmc.in-wfj.xml
The files needed to replicate this issue are located here https://gist.github.com/shivupa/e390aa40b77d6957d72f59b3c1be7203.
Expected behavior
The calculation wouldn't segfault. I think the two body jastrow builder should bypass building the uu jastrow?
System:
Additional context
Potential Solution?:
src/QMCWaveFunctions/Jastrow/DiffTwoBodyJastrowOrbital.h 94 seems to guard against the 1 elec up/1 elec down case. This might be the source of the issue.
Portion of Output before Seg Fault:
gdb trouble shooting
I didn't find this incredibly enlightening besides this resulting in a divide by zero.
Let me know what you think.
The text was updated successfully, but these errors were encountered: