Skip to content
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

Merge DiffOneBodyJastrowOrbital.h into J1OrbitalSoA.h #3243

Merged
merged 20 commits into from
Jul 13, 2021

Conversation

shivupa
Copy link
Contributor

@shivupa shivupa commented Jun 12, 2021

Proposed changes

This PR addresses some maintenance work suggested by @ye-luo for One body jastrows. This merges the two files mentioned in the title, and uses unique_ptr. I used #3217 as a guide.

What type(s) of changes does this code introduce?

  • Refactoring (no functional changes, no api changes)

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

Laptop i7-7700HQ

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • Yes. Code added or changed in the PR has been clang-formatted
  • No. This PR adds tests to cover any new code, or to catch a bug that is being fixed
  • No. Documentation has been added (if appropriate)

@qmc-robot
Copy link

Can one of the admins verify this patch?

@shivupa
Copy link
Contributor Author

shivupa commented Jun 15, 2021

I noticed some things that need changed on this PR. I'll update here when I finish

@shivupa
Copy link
Contributor Author

shivupa commented Jun 15, 2021

Fixed

@prckent
Copy link
Contributor

prckent commented Jun 16, 2021

Thanks. Will wait for @ye-luo comments.

@ye-luo ye-luo self-requested a review June 16, 2021 18:12
@ye-luo
Copy link
Contributor

ye-luo commented Jun 18, 2021

heads up. It takes a bit longer than expected to review this. I found a quite a few issues not necessarily directly caused by this PR but surfaced.

@shivupa
Copy link
Contributor Author

shivupa commented Jun 18, 2021

No worries no rush, just let me know if there is anything I should do to help.

This was referenced Jun 24, 2021
@ye-luo
Copy link
Contributor

ye-luo commented Jun 24, 2021

@shivupa I fixed the legacy CUDA build but the actual code needs to be updated. Pull before you continue.

@ye-luo
Copy link
Contributor

ye-luo commented Jun 29, 2021

Test this please

@shivupa shivupa force-pushed the onebodyjasmerge branch 3 times, most recently from 7582d4d to 4b6f060 Compare June 30, 2021 21:09
@shivupa
Copy link
Contributor Author

shivupa commented Jun 30, 2021

Rebased on develop and ready for review! Thanks @ye-luo

Copy link
Contributor

@PDoakORNL PDoakORNL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the nullptr early bails are quite a code smell. I assume somewhere you don't have to add input to define a functor for each pair or triple and this is a lazy and potentially error prone way to deal with that. sdt::Optional or a no-op functor see a better way to deal with this. It doesn't look right the the J1 jastrow at all.

src/QMCWaveFunctions/Jastrow/J1OrbitalSoA.h Outdated Show resolved Hide resolved
src/QMCWaveFunctions/Jastrow/RadialJastrowBuilder.cpp Outdated Show resolved Hide resolved
src/QMCWaveFunctions/Jastrow/J1OrbitalSoA.h Outdated Show resolved Hide resolved
src/QMCWaveFunctions/Jastrow/J1OrbitalSoA.h Outdated Show resolved Hide resolved
src/QMCWaveFunctions/Jastrow/J1OrbitalSoA.h Show resolved Hide resolved
@PDoakORNL
Copy link
Contributor

The test does not check the very likely case that for multiple ions and "electron" species some of the Jastrows are not defined in input. From my reading of the code this really needs to be part of the testing of these classes.

@prckent
Copy link
Contributor

prckent commented Jul 1, 2021

^^^ Good point on testing for the missing in input case, and not just for the code in this PR. Most times this would be an error but it could also be intentional. The code should handle all cases.

@shivupa
Copy link
Contributor Author

shivupa commented Jul 2, 2021

Thanks for the review I'll start working on these!

@shivupa shivupa force-pushed the onebodyjasmerge branch from 4b6f060 to de48649 Compare July 7, 2021 04:14
@shivupa shivupa force-pushed the onebodyjasmerge branch from 0943c6a to 2ea8880 Compare July 9, 2021 15:58
@ye-luo
Copy link
Contributor

ye-luo commented Jul 9, 2021

Test this please

@ye-luo
Copy link
Contributor

ye-luo commented Jul 9, 2021

The current GPU CI failure is actually caused by develop branch. The legacy CUDA build with ASAN enabled already fails. This is the reason why I put up #3280 yesterday.

src/QMCWaveFunctions/Jastrow/J1OrbitalSoA.h Show resolved Hide resolved

ions_.get(app_log());
elec_.get(app_log());

const char* jasxml = "<wavefunction name=\"psi0\" target=\"e\"> \
<jastrow name=\"J1\" type=\"One-Body\" function=\"Bspline\" print=\"yes\" source=\"ion0\"> \
<correlation elementType=\"H\" cusp=\"0.0\" size=\"2\" rcut=\"5.0\"> \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shivupa Missing ion group in J1 seems not fully supported. The added test was causing problems, so I add J1O parameter to make it passing for now. We definitely need to fix the case of missing group but not in this PR and also not adding two dummy parameters as the added test indicates.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I can take a look in a following PR

@ye-luo
Copy link
Contributor

ye-luo commented Jul 13, 2021

Test this please

@ye-luo
Copy link
Contributor

ye-luo commented Jul 13, 2021

@PDoakORNL This PR so far looks good for me now. OK to merge? Trying to eliminate long standing PRs.

@ye-luo ye-luo merged commit 7331e85 into QMCPACK:develop Jul 13, 2021
@shivupa shivupa deleted the onebodyjasmerge branch July 13, 2021 18:10
shivupa added a commit to shivupa/qmcpack that referenced this pull request Jul 15, 2021
shivupa added a commit to shivupa/qmcpack that referenced this pull request Jul 24, 2021
shivupa added a commit to shivupa/qmcpack that referenced this pull request Jul 26, 2021
shivupa added a commit to shivupa/qmcpack that referenced this pull request Jul 31, 2021
shivupa added a commit to shivupa/qmcpack that referenced this pull request Jul 31, 2021
shivupa added a commit to shivupa/qmcpack that referenced this pull request Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants