NREL-Sienna / PowerNetworkMatrices.jl

Methods to generate matrix representations of power systems matrices
https://nrel-sienna.github.io/PowerNetworkMatrices.jl/stable/
BSD 3-Clause "New" or "Revised" License
20 stars 8 forks source link

Manage better Pardiso dependency #74

Open jd-lara opened 8 months ago

jd-lara commented 8 months ago

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 commented 8 months ago

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

ViralBShah commented 8 months ago

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

gmantegna commented 3 months ago

@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
ViralBShah commented 3 months ago

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.

gmantegna commented 3 months ago

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: @.***>

ViralBShah commented 3 months ago

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.

gmantegna commented 3 months ago

Ok. @jd-lara any thoughts?

jd-lara commented 3 months ago

@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.

ViralBShah commented 3 months ago

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