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

Better testing of miniqmc #152

Open
markdewing opened this issue Jul 17, 2018 · 4 comments
Open

Better testing of miniqmc #152

markdewing opened this issue Jul 17, 2018 · 4 comments

Comments

@markdewing
Copy link
Collaborator

This was brought up in the miniqmc meeting, and I'm putting it here to organize further discussion.

Currently, testing for correctness is done by comparing against a reference implementation for the SPO's, Jastrow factors, and determinant update.

Missing are checks that the higher level algorithms in miniqmc are correct.
One possible solution is to run a step or two with a rigged RNG and check the results against known good results (similar to what is done with the driver unit tests in QMCPACK)

Another issue is debugging problems once the check_* drivers report a problem. Two possible solutions:

  • add unit testing to test smaller pieces of functionality
  • create a simpler kernel driver. For example, this driver evaluates the SPO at one point and prints out the values for the trial and reference implementations.
@rcclay
Copy link

rcclay commented Jul 17, 2018

For me personally, I would much rather have decent unit tests than simple kernel drivers for debugging purposes. Simple drivers are nice too, and would definitely complement the existing checks... but I feel like decent unit tests would have made implementation of something like GPU offload a bit more straightforward.

@markdewing
Copy link
Collaborator Author

For an example of simple kernel driver, this is the SPO driver I wrote to help with debugging the GA implementation
https://github.com/markdewing/miniqmc-1/blob/kernel_drivers/src/Drivers/spo_driver.cpp

@ye-luo
Copy link
Collaborator

ye-luo commented Jul 17, 2018

I think tests at SPO level and WavefunctionComponent level is good so we only need to maintain one no matter the underlying implementation changes. The test code body can added directly in the check_XXX.

@markdewing
Copy link
Collaborator Author

As an example for unit testing, this branch (unit_test) adds Catch2 as a unit test framework and one test (src/Particle/test/test_bcond.cpp)

It builds a single unit test executable, bin/unit_test.

https://github.com/markdewing/miniqmc-1/tree/unit_test/

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

No branches or pull requests

3 participants