You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Debug segfault with multithreading when loading t8codeusing MPI
using T8code
if!MPI.Initialized()
mpiret = MPI.Init()
end# segfaults
T8code.Libt8.sc_init(MPI.COMM_WORLD, 1, 1, C_NULL, T8code.Libt8.SC_LP_ERROR)
# segfaults# T8code.Libt8.sc_init(MPI.COMM_WORLD, 1, 0, C_NULL, T8code.Libt8.SC_LP_ERROR)# does not segfault# T8code.Libt8.sc_init(MPI.COMM_WORLD, 0, 1, C_NULL, T8code.Libt8.SC_LP_ERROR)# does not segfault# T8code.Libt8.sc_init(MPI.COMM_WORLD, 0, 0, C_NULL, T8code.Libt8.SC_LP_ERROR)functionallocate_as_crazy()
n =1_000
k =100
A = [randn(k, k) for _ in1:n]
B = [randn(k, k) for _ in1:n]
Threads.@threadsfor i in1:n
A[i] = A[i] * B[i]
endreturnsum(sum(A))
end@showallocate_as_crazy()
Saving this script as debug_segfaults_t8code.jl, initializing an appropriate project with MPI and T8code, and running Julia v1.9.3 yields something like
Here is an MWE:
Saving this script as
debug_segfaults_t8code.jl
, initializing an appropriate project with MPI and T8code, and running Julia v1.9.3 yields something likeIt seems to be fine if libsc is initialized with
T8code.Libt8.sc_init(MPI.COMM_WORLD, 0, ...)
, i.e., withcatch_signals = 0
.CC @NicolasRiel
The text was updated successfully, but these errors were encountered: