Skip to content

Commit

Permalink
added reference for restart integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
merkelm committed Feb 23, 2024
1 parent 893af70 commit 27b3bf7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ set (restart_integration_test
foreach(test ${restart_integration_test})
set (test_dir ${CMAKE_CURRENT_BINARY_DIR}/${test})

foreach(file test_restart.py)
foreach(file ref_restart.h5 test_restart.py)
FILE(COPY ${test}/${file} DESTINATION ${test_dir})
endforeach()

Expand Down
Binary file added test/python/svo_hubbardI_basic/ref_restart.h5
Binary file not shown.
19 changes: 19 additions & 0 deletions test/python/svo_hubbardI_basic/test_restart.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
from triqs.utility.comparison_tests import assert_block_gfs_are_close
from h5 import HDFArchive
import triqs.utility.mpi as mpi

import solid_dmft.main as solid

solid.main([None, 'dmft_config.toml'])

mpi.barrier()

if mpi.is_master_node():
with HDFArchive('out/inp.h5', 'r')['DMFT_results']['last_iter'] as out, \
HDFArchive('ref_restart.h5', 'r')['DMFT_results']['last_iter'] as ref:
for key in ['Delta_time_0', 'G0_Refreq_0', 'G0_freq_0', 'Gimp_Refreq_0',
'Gimp_freq_0', 'Gimp_time_0', 'Sigma_Refreq_0', 'Sigma_freq_0']:
print(key)
assert_block_gfs_are_close(out[key],ref[key])

for key in ['chemical_potential_pre', 'chemical_potential_post']:
print(key)
assert abs(out[key]-ref[key]) < 0.001, "chemical potential mismatch"

0 comments on commit 27b3bf7

Please sign in to comment.