issp-center-dev/DCore

expecting triqs_cthyb::many_body_op_t in C++, but got 'triqs.operators.operators.Operator' in Python.

haoweixu opened this issue · 3 comments

Hi, I was trying to use DCore with TRIQS/cthyb impurity solver. I have DCore version=3.0.0, TRIQS=3.0, TRIQS/DFTTools=3.0, and TRIQS/cthyb=3.0.

I used a pretty simple test input, which is as follows

[model]
seedname = bethe
lattice = bethe
norb = 1
nelec = 1.0
t = 1.0
kanamori = [(4.0, 0.0, 0.0)]
nk = 100

[system]
beta = 40.0

[impurity_solver]
name = TRIQS/cthyb
#name = null
#n_warmup_cycles{int} = 10000
n_cycles{int} = 3000
length_cycle{int} = 50

[control]
max_step = 1

However, we I run DCore, I always have the error message
"expecting triqs_cthyb::many_body_op_t in C++, but got 'triqs.operators.operators.Operator' in Python."
And the full error output is

Unexpected error:
---- There is 1 error in Python -> C++ transcription for the class triqs_cthyb::solve_parameters_t

1 The parameter h_int does not have the right type : expecting triqs_cthyb::many_body_op_t in C++, but got 'triqs.operators.operators.Operator' in Python.
Unexpected error:
---- There is 1 error in Python -> C++ transcription for the class triqs_cthyb::solve_parameters_t

1 The parameter h_int does not have the right type : expecting triqs_cthyb::many_body_op_t in C++, but got 'triqs.operators.operators.Operator' in Python.
Starting run with 2 MPI rank(s) at : 2021-10-05 10:30:54.347398
Traceback (most recent call last):
File "/home/haoweixu/.conda/envs/dcore/lib/python3.6/site-packages/dcore/impurity_solvers/triqs_cthyb_impl.py", line 100, in
main(args.input_file, args.output_file)
File "/home/haoweixu/.conda/envs/dcore/lib/python3.6/site-packages/dcore/impurity_solvers/triqs_cthyb_impl.py", line 74, in main
S.solve(h_int=h_int, **params)
File "/home/haoweixu/.conda/envs/dcore/lib/python3.6/site-packages/triqs_cthyb/solver.py", line 140, in solve
solve_status = SolverCore.solve(self, **params_kw)
TypeError:
---- There is 1 error in Python -> C++ transcription for the class triqs_cthyb::solve_parameters_t

1 The parameter h_int does not have the right type : expecting triqs_cthyb::many_body_op_t in C++, but got 'triqs.operators.operators.Operator' in Python.
Traceback (most recent call last):
File "/home/haoweixu/.conda/envs/dcore/lib/python3.6/site-packages/dcore/impurity_solvers/triqs_cthyb_impl.py", line 100, in
main(args.input_file, args.output_file)
File "/home/haoweixu/.conda/envs/dcore/lib/python3.6/site-packages/dcore/impurity_solvers/triqs_cthyb_impl.py", line 74, in main
S.solve(h_int=h_int, **params)
File "/home/haoweixu/.conda/envs/dcore/lib/python3.6/site-packages/triqs_cthyb/solver.py", line 140, in solve
solve_status = SolverCore.solve(self, **params_kw)
TypeError:
---- There is 1 error in Python -> C++ transcription for the class triqs_cthyb::solve_parameters_t

1 The parameter h_int does not have the right type : expecting triqs_cthyb::many_body_op_t in C++, but got 'triqs.operators.operators.Operator' in Python.

Looks like there are some incompabilities between TRIQS/cthyb and DCore. Could you please help solve this issue? Thank you very much!

Best wishes

Hi, sorry for the inconvenience.

My environment is TRIQS 3.0.1 and cthyb (commit d8ae5f386838, the latest one in the 3.0.x branch).
I failed to reproduce your problem in my environment.
Do you mind if I ask you to upgrade your triqs libraries to the latest versions.

I have the same issue.
My TRIQS version is 3.0.1 (git hash fea808e79cd2e66627ddd8eed535317bc1561466).
My TRIQS cthyb version is 3.0.0 (git hash ba23ff9573cc89f95fac36485ffccecbf7905377).
These are the versions obtained from the latest TRIQS Docker image.

Thanks for the information.
DCore assumes that TRIQS cthyb is built with the following options:
-DLocal_hamiltonian_is_complex=ON -DHybridisation_is_complex=ON
https://issp-center-dev.github.io/DCore/master/impuritysolvers/triqs_cthyb/cthyb.html

But, these options are not enabled in the TRIQS cthyb binary package.