Closed kbarros closed 1 year ago
The underlying problem was that deepcopy
is frequently memory unsafe, per Julia developers (this needs to be announced more broadly). Attempting to deecopy
an FFTW plan was leading to a use-after-free, reported here https://github.com/JuliaMath/FFTW.jl/issues/261. In the future we will avoid all uses of deepcopy
in Sunny.
See discussion here: https://github.com/JuliaLang/julia/issues/48722
As a temporary workaround, we have disabled dipole-dipole interactions in unit tests that check for energy consistency. https://github.com/SunnySuite/Sunny.jl/commit/3d54b13249d67f2c0829809e89d0a5ebb9ed261d