Skip to content

Commit 3a8f945

Browse files
authored
Merge pull request #174 from eth-cscs/checks/numerical-sanity-espresso
Numerical sanity check in quantum espresso test
2 parents 9b4c0c3 + fc9ef3e commit 3a8f945

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cscs-checks/apps/espresso/espresso_check.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ def __init__(self, variant, **kwargs):
1515
'Espresso')
1616
self.executable = 'pw.x'
1717
self.executable_opts = '-in ausurf.in'.split()
18-
19-
self.sanity_patterns = sn.assert_found(
20-
r'convergence has been achieved', self.stdout)
18+
energy = sn.extractsingle(r'!\s+total energy\s+=\s+(?P<energy>\S+) Ry',
19+
self.stdout, 'energy', float)
20+
self.sanity_patterns = sn.all([
21+
sn.assert_found(r'convergence has been achieved', self.stdout),
22+
sn.assert_reference(energy, -11427.08612278, -1e-10, 1e-10)])
2123
self.perf_patterns = {
2224
'sec': sn.extractsingle(r'electrons :\s+(?P<sec>\S+)s CPU ',
2325
self.stdout, 'sec', float)

0 commit comments

Comments
 (0)