Skip to content

Commit

Permalink
test mkl 2024 (exclude on high macos versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jcapriot committed Sep 10, 2024
1 parent b655371 commit c8a681e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ jobs:
matrix:
os: [ubuntu-latest, macos-12, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
mkl-version: ['2023'] # currently 2024 fails building for some reason...
mkl-version: ['2023', '2024']
include:
- os: ubuntu-latest
python-version: "3.12"
coverage: ${{ true }}
- os: ubuntu-latest
python-version: "3.12"
mkl-version: '2024'
- os: windows-latest
python-version: "3.12"
mkl-version: '2024'
exclude:
- os: macos-12
mkl-version: "2024"

steps:
- uses: actions/checkout@v4
Expand Down
10 changes: 5 additions & 5 deletions pydiso/mkl_solver.pyx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#cython: language_level=3
cimport numpy as np
cimport numpy as cnp
import cython
from cython cimport numeric
from cpython.pythread cimport (
PyThread_type_lock,
PyThread_allocate_lock,
Expand Down Expand Up @@ -403,8 +402,8 @@ cdef class MKLPardisoSolver:
raise ValueError(f"incorrect length of x, expected {self.shape[0]}, got {x.shape[0]}")
x = np.require(x, requirements='F')

cdef void * bp = np.PyArray_DATA(b)
cdef void * xp = np.PyArray_DATA(x)
cdef void * bp = cnp.PyArray_DATA(b)
cdef void * xp = cnp.PyArray_DATA(x)

if bp == xp:
raise PardisoError("b and x must be different arrays")
Expand Down Expand Up @@ -510,7 +509,7 @@ cdef class MKLPardisoSolver:

cdef _set_A(self, data):
self._Adata = data
self.a = np.PyArray_DATA(data)
self.a = cnp.PyArray_DATA(data)

def __dealloc__(self):
# Need to call pardiso with phase=-1 to release memory
Expand Down Expand Up @@ -542,6 +541,7 @@ cdef class MKLPardisoSolver:
if self.lock:
#dealloc lock
PyThread_free_lock(self.lock)
self.lock = NULL

cdef _analyze(self):
#phase = 11
Expand Down

0 comments on commit c8a681e

Please sign in to comment.