Skip to content

Commit

Permalink
ensure all A matrix information is c-contiguous.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcapriot committed Sep 14, 2024
1 parent 1edad1b commit 5772031
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions pydiso/mkl_solver.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -542,11 +542,11 @@ cdef class MKLPardisoSolver:
par.iparm[55] = 0 # Internal function used to work with pivot and calculation of diagonal arrays turned off.
par.iparm[59] = 0 # operate in-core mode

par.ia = np.require(A.indptr, dtype=int_dtype)
par.ja = np.require(A.indices, dtype=int_dtype)
par.ia = np.require(A.indptr, dtype=int_dtype, requirements='C')
par.ja = np.require(A.indices, dtype=int_dtype, requirements='C')

cdef _set_A(self, data):
self._Adata = data
self._Adata = np.require(data, requirements='C')
self.a = np.PyArray_DATA(data)

def __dealloc__(self):
Expand Down Expand Up @@ -629,6 +629,17 @@ cdef class MKLPardisoSolver:
if self._is_32:
with gil:
print("Calling pardiso")

print("maxfct", self._par.maxfct)
print("mnum", self._par.mnum)
print("mtype", self._par.mtype)
print("phase", phase)
print("n", self._par.n)
print("nrhs" nrhs)
print("msglvl", self._par.msglvl)
print("ia")
for i in range(self._par.n):
print()
sys.stdout.flush()

pardiso(self.handle, &self._par.maxfct, &self._par.mnum, &self._par.mtype,
Expand Down

0 comments on commit 5772031

Please sign in to comment.