i am trying to parallelize a loop with prange:
cdef fun(double [::1] someData)) nogil:
#direct call to a external c function
C_function(&someData[0])
#....
def parallelEvaluate(np.ndarray[np.double_t] largerArray):
#....
cdef np.ndarray[np.double_t] array
cdef np.ndarray[np.int] arbitraryIndices
for n in prange(loopLength, nogil=true):
with gil:
arbitraryIndices = # ... indices dependent on n
array = np.copy( largerArray[ arbitraryIndices] ) # copy of a non cont. array to the cont. 'array'
fun(array)
However, this fails with: Fatal Python error: PyThreadState_Get: no current thread
What is the reason for this behavior?
Thank you!