TRIQS / triqs

a Toolbox for Research on Interacting Quantum Systems
https://triqs.github.io
GNU General Public License v3.0
141 stars 72 forks source link

[test] MeshCycLat iteration #878

Closed HugoStrand closed 1 year ago

HugoStrand commented 1 year ago

Dear Triqs devs,

Iteration over MeshCycLat in Python is broken on triqs/unstable after gfv2 the merge. It seems like the cyclic lattice mesh point python wrapping has gone missing. We hit this error in tprf and it is holding us back getting tprf/unstable passing all test. Please help.

This pull request contains a failing test that attempts to iterate over the mesh.

        rm = MeshCycLat(bl, per_mat)
        print(rm)

        for r in rm:
            print(r)

producing the error

264: Test timeout computed to be: 10000000
264: E
264: ======================================================================
264: ERROR: test_mesh_iteration (__main__.test_cyclic_lattice)
264: ----------------------------------------------------------------------
264: Traceback (most recent call last):
264:   File "/Users/hugstr/dev/triqs_dlr_dev/test/python/base/cyclic_lattice.py", line 39, in test_mesh_iteration
264:     for r in rm:
264: RuntimeError: The type N5triqs7lattice15bravais_lattice7point_tE can not be converted
264: 
264: ----------------------------------------------------------------------
264: Ran 1 test in 0.000s
264: 
264: FAILED (errors=1)
264: Cyclic Lattice Mesh with linear dimensions (8 1 1)
264:  -- units = 
264: [[1,0,0]
264:  [0,1,0]
264:  [0,0,1]]
264:  -- lattice: Bravais Lattice with dimension 3, units 
264: [[1,0,0]
264:  [0,1,0]
264:  [0,0,1]], n_orbitals 1
1/1 Test #264: py_cyclic_lattice ................***Failed    0.15 sec
Wentzell commented 1 year ago

Thank you @HugoStrand for pointing this out. This has been fixed in d3520e4a2