JuliaSparse / Pardiso.jl

Calling the PARDISO library from Julia
Other
100 stars 27 forks source link

Error trying to load MKL on M1 macbook (even when trying to use Pardiso 8.0) #94

Closed mipals closed 8 months ago

mipals commented 8 months ago

Hi there,

I am trying to run this pacakage using the newest Pardiso version from Panua (Pardiso 8.0 as discussed to in #75 ), which seem to load without issues from the build log (NB! I've changed the name of the .dylib file)

Pardiso library
===============
Looking for libraries with name: libpardiso600-MACOS-X86-64.dylib.
Looking in "/Users/***/.julia/packages/Pardiso/rrIt7/deps" for libraries
Looking in "/Users/***/Pardiso" for libraries
    found "/Users/***/Pardiso/libpardiso600-MACOS-X86-64.dylib", attempting to load it...
    loaded successfully!

MKL Pardiso
=============
did not find MKLROOT environment variable, using provided MKL

However, I am getting an error about trying to load MKL (as in #93).

Is there a technical reason why the library always tries to load MKL (even if it is not going to be used) - or would I be able to get some working code by getting it not to load MKL?

Cheers, Mikkel

mipals commented 8 months ago

Just pinging in the hopes that you see it @KristofferC . Note that I do not expect you to fix the issue, it was more to pre-check before I start trying to fix something that can not be fixed.

mipals commented 8 months ago

It seems possible to get around the error by simply not loading MKL Pardiso when on apple silicon. However, as noted in #75 the tests for hermitian indef and symmetric seem to fail. From a quick look at the tests it seems as for hermitian indef and symmetric the pre-allocated does not seem to change. So maybe there is something wrong with the try/catch in the solve function for hermitian matrices?

KristofferC commented 8 months ago

It seems possible to get around the error by simply not loading MKL Pardiso when on apple silicon.

I think that is the correct fix, coupled with some warning and a descriptive error in the MKLPardisoSolver.

ViralBShah commented 8 months ago

The MKL.jl and related packages should be updated to become no-ops in the __init__ of the respective packages on Macs. With 2024, Intel mac support seems to have been dropped, so it may be simplest to disable MKL on all macs going forward.

KristofferC commented 8 months ago

MKL.jl is a no-op on mac, it is just that we do not treat it as a no-op in this package.