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

Create script for automated regression testing #13

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

ilectra
Copy link
Collaborator

@ilectra ilectra commented Nov 27, 2024

Fixes #8 .
This is stil WIP, I need to

  • check that all files are copied properly to the build directory and paths are correct
  • possibly convert to pytest

But you can already use it from inside the directory that the test sits in build, after copying the file with the reference values over.
@edbennett are the values we're checking the right ones? Or do we need the palette value to a gazillion decimals?

@ilectra ilectra requested review from edbennett and qiUip November 27, 2024 12:13
@ilectra ilectra self-assigned this Nov 27, 2024
tests/run_regression_test.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@qiUip qiUip left a comment

Choose a reason for hiding this comment

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

In terms of functionality, this works great! A few suggestions in the review.

I also noticed that the results change based on compilation options, e.g. when compiling for sp2n (--enable-Sp --enable-Nc=4) and running Test_hmc_IwasakiGauge I got different results than the same test when compiled for su3 (--enable-Nc=3). I'm not sure these values will make a lot of sense without a very strict compile and run parameters.

tests/run_regression_test.py Outdated Show resolved Hide resolved
tests/run_regression_test.py Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
8.8.8.8 1.1.1.1 0.0256253844 922c392f d1e4cc1c
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
8.8.8.8 1.1.1.1 0.0256253844 922c392f d1e4cc1c
8.8.8.8 1.1.1.1 0.281507042 922c392f 716ec776

Copy link
Collaborator

Choose a reason for hiding this comment

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

Updated expected output to align with original test (MDsteps = 36 and trajL = 1.0).

Comment on lines +67 to +68
TheHMC.Parameters.MD.MDsteps = 2;
TheHMC.Parameters.MD.trajL = 0.1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
TheHMC.Parameters.MD.MDsteps = 2;
TheHMC.Parameters.MD.trajL = 0.1;
TheHMC.Parameters.MD.MDsteps = 36;
TheHMC.Parameters.MD.trajL = 1.0;

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be best to to change the test case in the develop branch as it should stay consistent with the upstream.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I hope you mean "not to change the test case...." :) . The problem is that the expected value is for the modified MDsteps and trajL. Do we want to ditch them completely? (I saw you fixed those in the expected values file below)

@edbennett
Copy link
Collaborator

Something I should have considered earlier: since this uses a Metropolis algorithm, checking the final value of the plaquette is only valid if the version being compared against accepts the change. (In the case of a rejected change, then the value of the plaquette output is the input value, and only depends on the code we are touching if it changes in such a way that the change is accepted instead, which is unlikely.)

Provided we consistently stick with the same test case (and have verified that it accepts), then I think this is fine, but we should be careful about generalising this.

@ilectra
Copy link
Collaborator Author

ilectra commented Dec 20, 2024

  • To add more parameters/references to check for: nthreads, CPUvsGPU
  • read references from command line (if possible)

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.

Make automated test from example
3 participants