TRIQS / triqs_0.x

DEPRECATED -- This is the repository of the older versions of TRIQS
Other
11 stars 9 forks source link

Test single_site_bethe fails if n_loops>1 [TypeError: Quantum_Numbers_Selection is not of the correct type] #121

Closed tayral closed 11 years ago

tayral commented 11 years ago

Hi, Upon running the test single_site_bethe.py (in /solvers/ctqmc_hyb/pytriqs/test) after having set n_loops = 2 (instead of n_loops = 1 originally) (on Ubuntu 12.04)

LABO:~/Work/TRIQS-github/test $ mpirun -np 2 /home/tayral/Work/TRIQS-github/build/INSTALL_DIR/bin/pytriqs single_site_bethe.py 
Starting on 2 Nodes at : 2013-03-05 00:26:29.671939
------ Node : 0 -------- Iteration Number = 1

Optional parameters defined to their default values: 
 *Global_Moves -> []
   Description :
     A list of global moves

 *Fitting_Frequency_Start -> 50
   Description :
     Frequency at which the fit starts

 *Record_Statistics_Configurations -> False
   Description :
     (Expert only) Get the kink length statistics

 *Quantum_Numbers_Selection -> <cyfunction Solver.<lambda> at 0x1b4cec0>
   Description :
     (Prototype) A function to select quantum numbers

 *Use_F -> False
   Description :
     (Expert only) Compute F

 *Nmax_Matrix -> 100
   Description :
     Initial size of the determinant matrices

 *Keep_Full_MC_Series -> False
   Description :
     (Expert only) Store the Green's function for later analysis

 *Measured_Operators -> {}
   Description :
     A dict of operators that will be averaged

 *N_Frequencies_Accumulated -> 100
   Description :
     Number of frequencies to accumulate

 *Time_Accumulation -> False
   Description :
     Do we accumulate in imaginary-time?

 *Random_Seed -> 34788
   Description :
     Seed for the random generator

 *Eta -> 0.0
   Description :
     (Expert only) Value of eta, the minimum value of the det

 *Legendre_Accumulation -> True
   Description :
     Do we accumulate in legendre?

 *Proba_Move -> 1.0
   Description :
     Probability to move operators

 *Proba_Insert_Remove -> 1.0
   Description :
     Probability to insert/remove operators

 *Measured_Time_Correlators -> {}
   Description :
     A dict of operators, whose time correlations are to be measured

------------------------------------------------

Hamiltonian with Eps0 term  : 
 2.5 C^(up,1)C(up,1)C^(down,1)C(down,1) - 1.25 C^(up,1)C(up,1) - 1.25 C^(down,1)C(down,1) 
Inv Fourier done

1%; 2%; 3%; 4%; 5%; 6%; 7%; 8%; 9%; 10%; 11%; 12%; 13%; 14%; 15%; 16%; 17%; 18%; 19%; 20%; 21%; 22%; 23%; 24%; 25%; 26%; 27%; 28%; 29%; 30%; 31%; 32%; 33%; 34%; 35%; 36%; 37%; 38%; 39%; 40%; 41%; 42%; 43%; 44%; 45%; 46%; 47%; 48%; 49%; 50%; 51%; 52%; 53%; 54%; 55%; 56%; 57%; 58%; 59%; 60%; 61%; 62%; 63%; 64%; 65%; 66%; 67%; 68%; 69%; 70%; 71%; 72%; 73%; 74%; 75%; 76%; 77%; 78%; 79%; 80%; 81%; 82%; 83%; 84%; 85%; 86%; 87%; 88%; 89%; 90%; 91%; 92%; 93%; 94%; 95%; 96%; 97%; 98%; 99%; 100%; 

Acceptance rate for all moves:

Move set INSERT: 0.362096
  Move Insert0: 0.362126
  Move Insert1: 0.362067
Move set REMOVE: 0.361953
  Move Remove0: 0.361649
  Move Remove1: 0.362257
Move Move C Delta: 0.435031

Simulation lasted: 23 seconds
Total measures: 10000 measures
Average sign: (1,0)

Average sign: 1
Average sign: 1
Solver Hybridization Expansion has ended.
------ Node : 0 -------- Iteration Number = 2
Traceback (most recent call last):
  File "single_site_bethe.py", line 70, in <module>
    myloop(solver_list = S).run(n_loops = 2)
  File "/home/tayral/Work/TRIQS-github/build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/base/dmft/loop_generic.py", line 135, in run
    sol.Solve()
  File "ctqmc_solver.pyx", line 124, in pytriqs.solvers.ctqmc_hyb.ctqmc_solver.Solver.Solve (/home/tayral/Work/TRIQS-github/build/pytriqs/solvers/ctqmc_hyb/wrap_ctqmc_hyb_by_cython.cpp:4104)
  File "/home/tayral/Work/TRIQS-github/build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/base/utility/parameters.py", line 174, in check
    check_type(p,DIC[p],ty)
  File "/home/tayral/Work/TRIQS-github/build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/base/utility/parameters.py", line 144, in check_type
    raise TypeError, "%s is not of the correct type. Should be %s, not %s"%(p,ty, type(val))
TypeError: Quantum_Numbers_Selection is not of the correct type. Should be <type 'function'>, not <type 'cython_function_or_method'>
Traceback (most recent call last):
  File "single_site_bethe.py", line 70, in <module>
    myloop(solver_list = S).run(n_loops = 2)
  File "/home/tayral/Work/TRIQS-github/build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/base/dmft/loop_generic.py", line 135, in run
    sol.Solve()
  File "ctqmc_solver.pyx", line 124, in pytriqs.solvers.ctqmc_hyb.ctqmc_solver.Solver.Solve (/home/tayral/Work/TRIQS-github/build/pytriqs/solvers/ctqmc_hyb/wrap_ctqmc_hyb_by_cython.cpp:4104)
  File "/home/tayral/Work/TRIQS-github/build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/base/utility/parameters.py", line 174, in check
    check_type(p,DIC[p],ty)
  File "/home/tayral/Work/TRIQS-github/build/INSTALL_DIR/lib/python2.7/site-packages/pytriqs/base/utility/parameters.py", line 144, in check_type
    raise TypeError, "%s is not of the correct type. Should be %s, not %s"%(p,ty, type(val))
TypeError: Quantum_Numbers_Selection is not of the correct type. Should be <type 'function'>, not <type 'cython_function_or_method'>

Note: the same problem occurs without mpirun (just pytriqs single_site_bethe.py) or without using the DMFTLoopGeneric class. Do you have any idea how to solve this? Thanks.

mferrero commented 11 years ago

Should be OK now. Reopen if there are still problems.

tayral commented 11 years ago

works, thanks!

Le 05/03/13 17:56, Michel Ferrero a écrit :

Should be OK now. Reopen if there are still problems.

— Reply to this email directly or view it on GitHub https://github.com/TRIQS/TRIQS/issues/121#issuecomment-14429604.

tayral commented 11 years ago

Works, thanks.

Fyi, there is still a warning:

{}/build/pytriqs/solvers/ctqmc_hyb/wrap_ctqmc_hyb_by_cython.cpp:11538:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

Thomas

Le 05/03/13 17:56, Michel Ferrero a écrit :

Should be OK now. Reopen if there are still problems.

— Reply to this email directly or view it on GitHub https://github.com/TRIQS/TRIQS/issues/121#issuecomment-14429604.