-
Notifications
You must be signed in to change notification settings - Fork 215
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
Add openPMD-viewer test #4747
Add openPMD-viewer test #4747
Conversation
Please reformat your python files to be |
846a13b
to
7920360
Compare
@PrometheusPi I am using openpmd_viewer 1.7.0 |
Please add a |
I tested the new test with ./picongpu/share/picongpu/tests/openPMD-viewer-test/bin/ci.sh picongpu/share/picongpu/tests/openPMD-viewer-test/ ./run01 on hemera and it works fine. |
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.
There are a few (minor) code changes - see comments.
I tested the code to fail by changing the PIConGPU param files to disagree with the (python) parameter dictionary against it was compared.
That lead to the intended errors when:
- changing the background electric field
- changing the gamma from
1.021
to2.021
- not adding ion species
When rebasing against the mainline dev, I assume one gets compile time errors.
(I currently could not test that due to high work load on hemera's v100)
I will test it myself asap, but_
--> Please rebase against the current dev
share/picongpu/tests/openPMD-viewer-test/lib/python/test/param-test.py
Outdated
Show resolved
Hide resolved
eps_s = 1 | ||
eps_l = np.abs( | ||
field_param[f"{density}"] * 1e-1 |
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.
see comment before: please define this in your parameters dictionary (or a separate epsilon dictionary)
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.
what is the meaning of eps_s
and eps_l
please add a comment
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.
field_param[f"{density}"] * 1e-1
Why do we accept an error of 10%? Is this due to the particle motion or can this be reduced?
] | ||
for item in array | ||
] | ||
eps = 0.1 |
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.
see comment above on epsilons
|
||
bool_pass = check_params(2) # false if failure | ||
print("Test result: ", bool_pass) | ||
sys.exit(not bool_pass) |
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.
please add a comment on why we needed to negate the return value - otherwise this is really confusing
|
||
This test reads out openPMD-viewer data and checks if it matches the input values to see if users can rely on the output. | ||
|
||
To run this test, one has to execute ci.sh with the location of the input and output directory. |
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 please add a codeblock to show that?
I rebased against the current |
ca16c00
to
8252eec
Compare
@max-lehman14 There are still compile errors in your code ee.g.:
|
67a6e1d
to
2f732ba
Compare
@max-lehman14 the CI fails due to an undocumented change in behaviour in recent typeguard versions first noted in issue #4853 and fixed by PR #4861, please rebase to the current dev |
696477a
to
811fc38
Compare
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.
Looks very good @max-lehman14 just a few minor issues left.
share/picongpu/tests/openPMD-viewer-test/lib/python/test/param-test.py
Outdated
Show resolved
Hide resolved
@max-lehman14 I think your code base is too old and thus triggers a CI error that your actual code does not cause. |
8802a81
to
fc2f724
Compare
@max-lehman14 perfect - could you please squash all your commits to one. |
fc2f724
to
2c99a09
Compare
b23d490
into
ComputationalRadiationPhysics:dev
A simple example is used and the input parameters are compared to the readout of the openPMD-viewer. This test involves the electromagnetic fields, electron and ion charge density, particle positions and momenta.