Multi-threading and expect issues #519
-
Hey everyone! I have a question regarding a weird issue I encountered while trying to run several realizations of a particular circuit with different initial states in parallel. I've managed to pinpoint that the issue is coming from the expect() calls so here's a simplified example which still gives me the same error. using Base.Threads
println(nthreads())
using LinearAlgebra, Yao, Yao.AD, Yao.EasyBuild
N=5
h = heisenberg(N)
Threads.@threads for i = 1:50
i_state = rand_state(N)
Ei = expect(h,i_state)
end I get a very large error message stating: Invalid instruction at 0x7f2588427b08: 0xc5, 0xfb, 0x92, 0xc8, 0x62, 0xf1, 0xff, 0x08, 0xc2, 0xd0, 0x07, 0x62, 0xf1, 0xff, 0x09 [1189069] signal (4.2): Illegal instruction [More error message] Allocations: 4133851 (Pool: 4132253; Big: 1598); GC: 6 The weird part is, when I run this same code on my local machine it works just fine. Therefore, I'm unsure if it's just a hardware issue or a matter of permissions. I've also tried the same with distributed and the same issue occurs. If anyone has any idea of what could be going or experienced something similar I'd appreciate your input! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This sounds like a Julia bug but I'm not sure. What's your Julia version? |
Beta Was this translation helpful? Give feedback.
This sounds like a Julia bug but I'm not sure. What's your Julia version?