Skip to content

Commit

Permalink
flush here too
Browse files Browse the repository at this point in the history
  • Loading branch information
jcapriot committed Sep 14, 2024
1 parent 9d870f2 commit 1edad1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pydiso/mkl_solver.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ cdef class MKLPardisoSolver:
print("assigned x and b pointers")

if bp == xp:
Py_DECREF(b)
Py_DECREF(x)
raise PardisoError("b and x must be different arrays")

cdef int_t nrhs = b.shape[1] if b.ndim == 2 else 1
Expand Down Expand Up @@ -635,6 +637,7 @@ cdef class MKLPardisoSolver:

with gil:
print("Called pardiso, error was ", error)
sys.stdout.flush()
else:
pardiso_64(self.handle, &self._par64.maxfct, &self._par64.mnum, &self._par64.mtype,
&phase64, &self._par64.n, self.a, &self._par64.ia[0], &self._par64.ja[0],
Expand Down

0 comments on commit 1edad1b

Please sign in to comment.