bmcage / odes

The ODES scikit for ordinary differential and algebraic equations, an extension to scipy
https://scikits-odes.readthedocs.io/
Other
124 stars 44 forks source link

fixes #147: SUNDIALS_BLAS_LAPACK not present in sundials 6 #160

Open stuart-nolan opened 1 year ago

stuart-nolan commented 1 year ago

Tested with scikits.odes 2.7.0 (at commit 57466a97a278f687a6b0a92343b767c495834b31), python 3.11.4, and sundials 6.6.1 compiled against oneMKL 2023.0 Update 2 on Ubuntu 22.04.3 LTS. The test details below were taken from this comment in #97:

Testing code and output w/ and w/o lapack ### With lapack ``` import numpy as np from scikits.odes.odeint import odeint tout = np.linspace(0, 1) initial_values = np.array([1]) def right_hand_side(t, y, ydot): ydot[0] = y[0] output = odeint(right_hand_side, tout, initial_values,linsolver='lapackdense') print(output.values.y) ``` In a bash shell ``` export MKL_VERBOSE=1 ipython MKL_VERBOSE oneMKL 2023.0 Update 2 Product build 20230613 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors, Lnx 1.90GHz lp64 gnu_thread MKL_VERBOSE SDOT(2,0x562640d4f1a0,1,0x562640d4f1a0,1) 1.89ms CNR:OFF Dyn:1 FastMM:1 TID:0 NThr:2 ... [2.66339741] [2.7183115 ]] ``` ### With out lapack ``` import numpy as np from scikits.odes.odeint import odeint tout = np.linspace(0, 1) initial_values = np.array([1]) def right_hand_side(t, y, ydot): ydot[0] = y[0] output = odeint(right_hand_side, tout, initial_values,linsolver='dense') print(output.values.y) ``` same bash shell/ipython session as above with lapack ``` ... [2.66339741] [2.7183115 ]] ```
aragilar commented 4 months ago

@stuart-nolan Can you see if the new refactor has solved your issue?

stuart-nolan commented 4 months ago

No.

Looks like this PR needs to be updated and applied for scikits.odes 3.0. I'll do that but I may not get to it quickly.

stuart-nolan commented 4 months ago

I'm not sure if you plan to merge this. No worries if you don't as interest in this capability seems low and I'm not using it.

Tested with scikits-odes v3.0.0, python 3.11.4, sundials 6.6.1, oneMKL 2024.2, on Ubuntu 22.04.4 LTS.

At some point in the coming months I'll upgrade to python 3.12.x and possibly sundials 7.x.x and test if this still works.