PowerNetworkMatrices.jl icon indicating copy to clipboard operation
PowerNetworkMatrices.jl copied to clipboard

Manage better Pardiso dependency

Open jd-lara opened this issue 1 year ago • 9 comments

Consider the following issue from the MKL library

https://github.com/JuliaLinearAlgebra/MKL.jl/issues/146

https://github.com/JuliaLinearAlgebra/MKL.jl/issues/129

Check the use of https://github.com/JuliaPackaging/Preferences.jl to avoid issues.

Refs for Mac Users

https://developer.apple.com/documentation/accelerate/sparse_solvers/sparse_direct_solving_functions_matrix_rhs

jd-lara avatar Feb 13 '24 15:02 jd-lara

On top of this, some users have been facing challenges with the binaries in windows.

jd-lara avatar Feb 13 '24 15:02 jd-lara

@jd-lara Try MKL.jl master to see if helps, and do see the recent PRs I merged.

ViralBShah avatar Feb 23 '24 22:02 ViralBShah

@jd-lara I am still getting a warning about MKL_jll when I install and load in PowerNetworkMatrices on macOS with Apple Silicon. It seems everything is working fine, but are there plans to address this? Is it indicating something actually wrong or is everything fine? I will note also that MKL itself actually installs fine, when I install that on its own.

Screenshot 2024-07-26 at 2 27 56 PM

gmantegna avatar Jul 26 '24 18:07 gmantegna

macOS aarch64 is not an Intel platform, and hence won't have Intel MKL!

This is just a no-op and the warning is just fyi - not a sign of something being wrong or broken.

ViralBShah avatar Jul 27 '24 03:07 ViralBShah

Yes of course. My question is more specifically: 1) is there something wrong with the functioning of the code if a user is not on an Intel platform? (presumably OpenBLAS is used instead or something like that?), and 2) if the answer to 1) is no, is it really worth throwing a warning? To me "warning" implies that the code developers think there is potentially something going wrong with the functioning of the code, if the thing that triggers the warning is happening.

On Fri, Jul 26, 2024 at 11:13 PM Viral B. Shah @.***> wrote:

macOS aarch64 is not an Intel platform, and hence won't have Intel MKL!

— Reply to this email directly, view it on GitHub https://github.com/NREL-Sienna/PowerNetworkMatrices.jl/issues/74#issuecomment-2253726568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHKPARU255NJMGJXU35GR6LZOMF7BAVCNFSM6AAAAABDGXYDJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJTG4ZDMNJWHA . You are receiving this because you commented.Message ID: @.***>

gmantegna avatar Jul 29 '24 16:07 gmantegna

I have been thinking about that too. This is really for the package author to address - because one could use AppleAccelerate on apple silicon, and should ideally not load MKL which is a platform specific library.

Perhaps we need a BLASPreferences.jl package that helps deal with all this in a more streamlined way.

ViralBShah avatar Jul 29 '24 16:07 ViralBShah

Ok. @jd-lara any thoughts?

gmantegna avatar Jul 29 '24 16:07 gmantegna

@gmantegna we support MKLPardiso for our HPC applications for large scale. Most of the developers from Sienna use Macs and we use the KLU solver since for systems below 15k buses there is no real difference between KLU and MKLPardiso.

TBH we mostly ignore that warning since we don't use that solver in Mac applications.

jd-lara avatar Jul 29 '24 16:07 jd-lara

You could just put an @static if platform check around MKL.

ViralBShah avatar Jul 29 '24 16:07 ViralBShah