diff --git a/benchmark/measure_g2/hubbard_atom_2bath/calc_cthyb.py b/benchmark/measure_g2/hubbard_atom_2bath/calc_cthyb.py index c10eb81b..6b961180 100644 --- a/benchmark/measure_g2/hubbard_atom_2bath/calc_cthyb.py +++ b/benchmark/measure_g2/hubbard_atom_2bath/calc_cthyb.py @@ -19,6 +19,7 @@ from triqs.operators import * from h5 import HDFArchive from triqs_cthyb import Solver +import triqs_cthyb.version # ---------------------------------------------------------------------- if __name__ == '__main__': @@ -128,6 +129,10 @@ def __init__(self): d.perturbation_order = solv.perturbation_order d.perturbation_order_total = solv.perturbation_order_total + + d.version = triqs_cthyb.version.version + d.triqs_hash = triqs_cthyb.version.triqs_hash + d.triqs_cthyb_hash = triqs_cthyb.version.triqs_cthyb_hash # ------------------------------------------------------------------ # -- Store results diff --git a/benchmark/measure_g2/hubbard_atom_2bath/calc_ed.py b/benchmark/measure_g2/hubbard_atom_2bath/calc_ed.py index fee23d12..9ed52125 100644 --- a/benchmark/measure_g2/hubbard_atom_2bath/calc_ed.py +++ b/benchmark/measure_g2/hubbard_atom_2bath/calc_ed.py @@ -97,21 +97,24 @@ def __init__(self): imtime = MeshImTime(beta, 'Fermion', ntau) prodmesh = MeshProduct(imtime, imtime, imtime) + G2opt = dict(mesh=prodmesh, target_shape=[]) + G2opt_1111 = dict(mesh=prodmesh, target_shape=[1, 1, 1, 1]) - G02_tau = Gf(name='$G^{(2)}_0(\tau_1, \tau_2, \tau_3)$', **G2opt) + G02_tau = Gf(name='$G^{(2)}_0(\tau_1, \tau_2, \tau_3)$', **G2opt_1111) ed.set_g40_tau(G02_tau, d.G_tau) G2_tau = Gf(name='$G^{(2)}(\tau_1, \tau_2, \tau_3)$', **G2opt) ed.set_g4_tau(G2_tau, c_dag(up,0), c(up,0), c_dag(do,0), c(do,0)) - G2opt_1111 = dict(mesh=prodmesh, target_shape=[1, 1, 1, 1]) - - d.G02_tau = Gf(**G2opt_1111) + #d.G02_tau = Gf(**G2opt_1111) d.G2_tau = Gf(**G2opt_1111) - d.G02_tau.data[:, :, :, 0, 0, 0, 0] = G02_tau.data + #d.G02_tau.data[:, :, :, 0, 0, 0, 0] = G02_tau.data d.G2_tau.data[:, :, :, 0, 0, 0, 0] = G2_tau.data + + d.G02_tau = G02_tau + #d.G2_tau = G2_tau # ------------------------------------------------------------------ # -- Store to hdf5 diff --git a/benchmark/measure_g2/hubbard_atom_2bath/calc_pomerol.py b/benchmark/measure_g2/hubbard_atom_2bath/calc_pomerol.py index 7ea8100e..5d2be50b 100644 --- a/benchmark/measure_g2/hubbard_atom_2bath/calc_pomerol.py +++ b/benchmark/measure_g2/hubbard_atom_2bath/calc_pomerol.py @@ -44,9 +44,9 @@ def __init__(self): d = Dummy() # storage space d.params = params - print('--> Solving SIAM with parameters') + if mpi.is_master_node(): print('--> Solving SIAM with parameters') for key, value in list(params.items()): - print('%10s = %-10s' % (key, str(value))) + if mpi.is_master_node(): print('%10s = %-10s' % (key, str(value))) globals()[key] = value # populate global namespace # ------------------------------------------------------------------ @@ -82,7 +82,7 @@ def __init__(self): ed = PomerolED(index_converter, verbose=True) ed.diagonalize(d.H) # -- Diagonalize H - gf_struct = [[up, [0]], [do, [0]]] + gf_struct = [[up, 1], [do, 1]] # -- Single-particle Green's functions G_iw = ed.G_iw(gf_struct, beta, n_iw=niw) @@ -111,11 +111,12 @@ def __init__(self): # ------------------------------------------------------------------ # -- Store to hdf5 - - filename = 'data_pomerol.h5' - with HDFArchive(filename,'w') as res: - for key, value in list(d.__dict__.items()): - res[key] = value + + if mpi.is_master_node(): + filename = 'data_pomerol.h5' + with HDFArchive(filename,'w') as res: + for key, value in list(d.__dict__.items()): + res[key] = value # ---------------------------------------------------------------------- if __name__ == '__main__':