I am having a strange problem, and I’m not sure where else to ask, so I’m hoping this is the right place.
I am using mac os x mojave, python 3.8.12, numba 0.54.1, llvmlite 0.37.0. I’m attempting to do a very basic test of numba functionality. My script is very simple (see below). However, it throws a segmentation fault or illegal hardware instruction fault when I try to run it. I’m new to numba and could just be doing something stupid, but I’m at a loss after trying to fix it.
import numba as nb
@nb.jit
def test(a):
return a
print(test(1))
When running this script line-by-line, I am able to import numba fine. It only fails after the “return a” line and before the “print” line. Ie., it is failing when I try to define test(a).
The errors I am getting are, eg:
780 segmentation fault python test.py
or
786 illegal hardware instruction python test.py
The faulthandler suggests that the problem is llvmlite/binding/ffi.py. At least, that is the last item that pings before it has a fault.
I have come across some older threads that said there was a conflict between llvmlite and symengine that produces a similar fault (though, that occurs when importing numba, not when defining a function). However, I am using a clean env, and the only thing that is installed is numba (and its dependents) using pip. There is no symengine.
I have a very similar setup on a separate computer. Same os. And numba works fine on that one. Unfortunately, my work won’t allow me to program on that computer, so I’m stuck with the one that’s misbehaving.
I would appreciate any advice. Thank you.