I am calculating slices of a multivariate function, with and without threads (here, commented out):
function calculate_slice(f, x, i, xl, xu; n = 50)
z = range(xl, xu; length = n)
fz = zeros(n)
#=Threads.@threads=# for j in 1:n
y = vcat(x[1:(i-1)], z[j], x[(i+1):end])
fz[i] = f(y)
end
(i = i, xi = x[i], z = z, fz = fz)
end
f
here is very CPU- and memory-intensive (about 10K LOC + dependencies, so sorry, no MWE ).
When I use threads, the julia process ends up killed with no error message. I am using the 1.4-rc branch.
Any hints on debugging this would be appreciated. Would something like this happen if Julia ran out of memory?