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

Seg fault when measuring time correlators #8

Open
tayral opened this issue May 25, 2014 · 0 comments
Open

Seg fault when measuring time correlators #8

tayral opened this issue May 25, 2014 · 0 comments

Comments

@tayral
Copy link
Member

tayral commented May 25, 2014

Hi,
I am studying the Hubbard dimer and willing to compute some correlator (e.g $ \langle N_\uparrow(\tau) N_\uparrow(\tau)\rangle$). Here is the script I am using:

from pytriqs.gf.local import *
from pytriqs.operators import *
from pytriqs.applications.impurity_solvers.cthyb_matrix import Solver
import pytriqs.utility.mpi as mpi

n_cycles=100000
V = 0.05
U = 5.0
mu = U/2.
beta = 100
e_h=0.5
alpha=0.5
split=0.0
t=1.

S = Solver(beta = beta, gf_struct = [ ('up',[1,2]), ('down', [1,2]) ])
for spin, g0 in S.G0 :
    g0[0,0] = iOmega_n + mu + split/2 - V**2 * (inverse(iOmega_n -e_h)  + inverse(iOmega_n + e_h))
    g0[1,0] = -t - alpha*V**2 *(inverse(iOmega_n -e_h)  + inverse(iOmega_n + e_h))
    g0[1,1] = iOmega_n + mu - split/2 - V**2 *(inverse(iOmega_n -e_h)  + inverse(iOmega_n + e_h))
    g0[0,1] = -t - alpha* V**2 *(inverse(iOmega_n -e_h)  + inverse(iOmega_n + e_h))
    g0.invert()

S.solve(H_local = U * (N('up',1) * N('down',1)+ N('up',2) * N('down',2)),   # Local Hamiltonian 
        quantum_numbers = {
          'Nup': N('up',1)+N('up',2),
          'Ndown': N('down',1)+N('down',2)
        },                   # Quantum Numbers 
        n_cycles  = n_cycles,                      # Number of QMC cycles
        length_cycle = 100,                      # Length of one cycle 
        n_warmup_cycles = 1000,                 # Warmup cycles
        n_legendre = 50,                         # Number of Legendre coefficients
        random_name = 'mt19937',                 # Name of the random number generator
        use_segment_picture = False,              # Use the segment picture
        measured_operators = {                   # Operators to be averaged
          'NimpA' : N('up',1)+N('down',1),
          'NimpB' : N('up',2)+N('down',2),
          },
        measured_time_correlators = {
           'Nup' : [N('up',1)+N('up',2),100]
        }
        )

This script runs fine when the last option of solve(), measured_time_correlators, is absent; when present, I get the error:

Starting on 1 Nodes at : 2014-05-25 14:10:13.513596
Hamiltonian with Eps0 term  : 
 5.0 C^(up,1)C(up,1)C^(down,1)C(down,1) + 5.0 C^(up,2)C(up,2)C^(down,2)C(down,2) - 2.5 C^(up,1)C(up,1) + C^(up,1)C(up,2) - C(up,1)C^(up,2) - 2.5 C^(up,2)C(up,2) - 2.5 C^(down,1)C(down,1) + C^(down,1)C(down,2) - C(down,1)C^(down,2) - 2.5 C^(down,2)C(down,2) 
Operator Nup already defined as Nup, using this instead for measuring
Inv Fourier done

[IPhT-IA-004525:04127] *** Process received signal ***
[IPhT-IA-004525:04127] Signal: Segmentation fault (11)
[IPhT-IA-004525:04127] Signal code:  (128)
[IPhT-IA-004525:04127] Failing at address: (nil)
[IPhT-IA-004525:04127] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f1dac24fcb0]
[IPhT-IA-004525:04127] [ 1] /home/tayral/Work/TRIQS/install/lib/libcthyb_matrix_c.so(_ZN14Measure_OpCorr10accumulateESt7complexIdE+0x2ad) [0x7f1d9d18ec6d]
[IPhT-IA-004525:04127] [ 2] /home/tayral/Work/TRIQS/install/lib/libcthyb_matrix_c.so(_ZN5triqs8mc_tools10mc_genericISt7complexIdENS0_4Step10MetropolisIS3_EEE5startES3_RKSt8functionIFbvEE+0x273) [0x7f1d9d137483]
[IPhT-IA-004525:04127] [ 3] /home/tayral/Work/TRIQS/install/lib/libcthyb_matrix_c.so(_ZN5triqs3app16impurity_solvers9ctqmc_hyb5solveEv+0x71) [0x7f1d9d1333e1]
[IPhT-IA-004525:04127] [ 4] /home/tayral/Work/TRIQS/install/lib/python2.7/site-packages/pytriqs/applications/impurity_solvers/cthyb_matrix/cthyb_matrix.so(+0x33fb0) [0x7f1d9d404fb0]
[IPhT-IA-004525:04127] [ 5] /home/tayral/Work/TRIQS/install/lib/python2.7/site-packages/pytriqs/applications/impurity_solvers/cthyb_matrix/cthyb_matrix.so(+0x11747) [0x7f1d9d3e2747]
[IPhT-IA-004525:04127] [ 6] /home/tayral/Install/mypython/bin/python(PyObject_Call+0x36) [0x4e9f36]
[IPhT-IA-004525:04127] [ 7] /home/tayral/Install/mypython/bin/python(PyEval_EvalFrameEx+0x86a) [0x49846a]
[IPhT-IA-004525:04127] [ 8] /home/tayral/Install/mypython/bin/python(PyEval_EvalCodeEx+0x1a0) [0x49f1c0]
[IPhT-IA-004525:04127] [ 9] /home/tayral/Install/mypython/bin/python(PyRun_FileExFlags+0xe1) [0x4a9081]
[IPhT-IA-004525:04127] [10] /home/tayral/Install/mypython/bin/python(PyRun_SimpleFileExFlags+0x1d1) [0x4a9311]
[IPhT-IA-004525:04127] [11] /home/tayral/Install/mypython/bin/python(Py_Main+0x55d) [0x4aa8bd]
[IPhT-IA-004525:04127] [12] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f1daaf4e76d]
[IPhT-IA-004525:04127] [13] /home/tayral/Install/mypython/bin/python() [0x41b9b1]
[IPhT-IA-004525:04127] *** End of error message ***
/home/tayral/Work/TRIQS/install/bin/pytriqs: line 4:  4127 Segmentation fault      (core dumped) /home/tayral/Install/mypython/bin/python $@

Do you know where this comes from?
Thanks!

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

1 participant