-
Notifications
You must be signed in to change notification settings - Fork 117
[test] Adapt the petsc test for PE 18.07 #404
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
Conversation
* Adapt to new regression test syntax. * Change the sanity check so that the last residual norm of the KSP method is checked for convergence. * Adapt the source code to be in sync with the newest version of the petsc library.
Codecov Report
@@ Coverage Diff @@
## master #404 +/- ##
=======================================
Coverage 91.11% 91.11%
=======================================
Files 68 68
Lines 8268 8268
=======================================
Hits 7533 7533
Misses 735 735Continue to review full report at Codecov.
|
|
I will merge this after the build systems are merged, so as to adapt it to the syntax as well. |
| @@ -1,22 +1,13 @@ | |||
| import filecmp | |||
| import os | |||
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.
These two imports are not needed anymore.
| def __init__(self, variant): | ||
| super().__init__() | ||
| self.descr = ('Compile/run PETSc 2D Poisson example with cray-petsc ' | ||
| '(%s linking case)') % variant |
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.
Better remove the "case" here.
| self.sanity_patterns = sanity_filecmp( | ||
| 'petsc_poisson2d.out', 'petsc_poisson2d.ref') | ||
| # Check the final residual norm for convergence | ||
| self.sanity_patterns = sn.assert_lt(norms[-1], 1.0e-5) |
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.
Since you don't do anything with the rest of the norms that you extract, you could use sn.extractsingle() and pass item=-1, so to extract the last match. The advantage of this is that it will raise a SanityError instead of IndexError in case of an out-of-bounds error, which means that it will be printed nicely in the failure report. See here for the full spec of the extractsingle() function.
* Also use the build systems instead of the `compile` method.
|
@jenkins-cscs retry daint |
vkarak
left 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.
lgtm
Adapt to new regression test syntax.
Change the sanity check so that the last residual norm of the KSP
method is checked for convergence.
Adapt the source code to be in sync with the newest version of the
petsc library.
Closes #380.
Closes #388.