Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
haoweixu opened this issue Oct 5, 2021 · 3 comments

Comments

@haoweixu
Copy link

haoweixu commented Oct 5, 2021

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

@shinaoka
Copy link
Contributor

shinaoka commented Oct 6, 2021

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.

@bfield1
Copy link

bfield1 commented Nov 17, 2021

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.

@shinaoka
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants