Open adamcallison opened 4 years ago
So not sure quite what to do here (other than update the jitclass import as per warning) - the code runs without crashing on my windows laptop and also ubuntu desktop - both with numba=0.49
.
Numba does seem to have these kind of bugs, particularly in relation to parallel. Another thing to try is to turn off the numba caching - which also seems to interact badly with the parallel stuff.
Try:
export QUIMB_NUMBA_CACHE=off
I've come across these numba segfaults before and they didn't happen deterministically so were particularly hard to identify minimal reproducer for.
I've come across some strange behaviour when using
quimb
andxyzpy
together. Not sure which library would be best to put the issue on, but I've chosen this one. I've not been able to replicate the exact bug in a minimal example, but in doing so I've discovered another one (which may or may not be the same thing manifesting differently.The minimal example is (note line that imports
xyzpy
is commented):If put this in a file
test.py
and run withpython test.py
, I get the following, as expected:However, if I uncomment the
import xyzpy as xyz
line (even without actually using it anywhere), I get a warning and segfaultMore mysteriously, if I change the stype in
to
and run, I get the warning but no segfault:
After some digging (and inspired by output of the original bug), it seems to have something to do with
quimb
dispatching sparse dot products to parallel methods, vianumba
, for matrices with more than 50000 nonzero elements (which is true for the2**12
case but not the2**11
case) where available. I can suppress this behaviour by adding the following lines to the top of thetest.py
.which stops the crash (but not the warning). I don't know where to begin with fixing this.
I am using python version 3.7.6, quimb version '1.2.0+142.g40e5a2a' (current state of develop branch), xyzpy version ''0.3.1+28.gd5afe9b'' (current state of develop branch), and my numba version is 0.49.0.