Ising Hamiltonian mostly only works for power of two square lattices
I have checked out the master branch and compiled the Ising model without optimizations with gfortran. For quadratic lattices I get the following results: 2x2 runs 3x3 crash 4x4 runs 5x5 crash 6x6 runs 7x7 crash 8x8 works 9x9 crash 10x10 runs Now follows some debugging: For 3x3 I see this:
Program received signal SIGSEGV, Segmentation fault.
0x000055555557791e in wrapul (ntau1=100, ntau=90, ul=..., dl=..., vl=...) at wrapul.f90:37
37 X = Phi(nsigma(n,nt),Op_V(n,nf)%type)
(gdb) p n
$1 = 16
(gdb) p nt
$2 = 100
For 5x5 I see this:
in confin () at inconfc.f90:28
28 Allocate (Nsigma(Size(Op_V,1),Ltrot))
For 7x7 I get pointed to wrapul, but I think this trace is useless For 9x9 I get pointed by the debugger here:
in hamiltonian::ham_v () at Hamiltonian_Ising.f90:303
303 Ising_nnlist(n,1) = n1
with rectangular lattices I see the following: 3x7 crash 5x7 crash 9x7 crash 6x8 crash 4x8 crash 8x16 runs 14x6 crash 28x12 seems to run 20x28 seems to run 36x28 seems to run For the 3x7 case I see this:
#0 0x00007ffff65c17a6 in ?? () from /lib64/libc.so.6
#1 0x00007ffff65c2c10 in ?? () from /lib64/libc.so.6
#2 0x00007ffff65c4fd2 in malloc () from /lib64/libc.so.6
#3 0x0000555555581dc7 in confin () at inconfc.f90:28
#4 0x00005555555701ac in MAIN__ () at main.f90:107
For the 5x7 case I see this:
#0 0x00007ffff657870b in raise () from /lib64/libc.so.6
#1 0x00007ffff6579cd1 in abort () from /lib64/libc.so.6
#2 0x00007ffff65bb6ec in ?? () from /lib64/libc.so.6
#3 0x00007ffff65c1567 in ?? () from /lib64/libc.so.6
#4 0x00007ffff65c1dcb in ?? () from /lib64/libc.so.6
#5 0x00005555555785a5 in wrapul (ntau1=100, ntau=90, ul=<error reading variable: frame address is not available.>,
dl=<error reading variable: frame address is not available.>,
vl=<error reading variable: frame address is not available.>) at wrapul.f90:23
#6 0x0000555555572d6b in MAIN__ () at main.f90:207
For the 9x7 case I see this:
(gdb) bt
#0 0x00005555555656c4 in hamiltonian::ham_v () at Hamiltonian_Ising.f90:303
#1 0x00005555555678df in hamiltonian::ham_set () at Hamiltonian_Ising.f90:134
#2 0x00005555555701a2 in MAIN__ () at main.f90:105
(gdb) frame 0
#0 0x00005555555656c4 in hamiltonian::ham_v () at Hamiltonian_Ising.f90:303
303 Ising_nnlist(n,1) = n1
(gdb) p n
$1 = -255588285
(gdb) p n1
$2 = 26
For the 6x8 and similarly for the 4x8 case I see this:
#0 0x0000555555563f02 in hamiltonian::s0 (n=49, nt=1) at Hamiltonian_Ising.f90:339
#1 0x000055555557e897 in upgrade (gr=<error reading variable: Cannot access memory at address 0x55555587d000>, n_op=49,
nt=1, phase=(1,0), op_dim=2) at upgrade.f90:65
#2 0x000055555557be8a in wrapgrup (gr=..., ntau=0, phase=(1,0)) at wrapgrup.f90:46
#3 0x0000555555573b8a in MAIN__ () at main.f90:290
(gdb) frame 0
#0 0x0000555555563f02 in hamiltonian::s0 (n=49, nt=1) at Hamiltonian_Ising.f90:339
339 S0 = S0*DW_Ising_space(nsigma(n,nt)*nsigma(Ising_nnlist(n,i),nt))
(gdb) p n
$1 = 49
(gdb) p nt
$2 = 1
(gdb) p i
$3 = 1
Most of the backtraces seem to be corrupted, but maybe ham_V() and S0() look like good places to start. Somewhere it is built in that the length in every dimension is divisible by 4.