Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing test on macOS #96

Closed
mipals opened this issue Feb 15, 2024 · 6 comments
Closed

Fixing test on macOS #96

mipals opened this issue Feb 15, 2024 · 6 comments

Comments

@mipals
Copy link
Member

mipals commented Feb 15, 2024

Hi there,

Thanks for updating the package to run on macOS.

While the code does run, the tests fails on macOS for various reasons. I would like to try to fix that, but I need a few pointers.

For the CI-failures, it might be fixable by pinning to MKL_jll to verison 2022?

In addition the tests fails when MKL is not available locally but Panua-Pardiso is. This is due to MKL being hard-coded into some tests. In the code I see that you simply use MKL_jll.is_available() to check if MKL is available. Is it ok to simply add MKL_jll as dependency in the tests?
Furthermore the three examples included in the tests hard-codes MKL. This could be fixed by creating three separate examples for Pardiso, but maybe there is a better way?

Cheers,
Mikkel

@KristofferC
Copy link
Member

  • For MKL mac, pinning to 2022 seems ok.
  • For is_available you can check Pardiso.MKL_jll.is_available().
  • For the examples, we can make them functions that take a solver as an argument and pass in the available solvers from the tests.

@mipals
Copy link
Member Author

mipals commented Feb 15, 2024

  • I don't know how to pin versions in CI or a particular OS. Any pointers of where to look?
  • Perfect!
  • That sounds reasonable to some extend. However, I am afraid that it will make it harder for new users to use them as examples?

@j-fu
Copy link
Collaborator

j-fu commented Feb 15, 2024

We might add some API calls like MKLPardiso_available() and Pardiso_available()

@KristofferC
Copy link
Member

I don't know how to pin versions in CI or a particular OS

You could maybe just do it in the runtests.jl file. Pkg.add("MKL_jll"; version = "2022" if the OS is a mac or something. Maybe not elegant but if it works for now...

That sounds reasonable to some extend. However, I am afraid that it will make it harder for new users to use them as examples?

They could look like:

run_example_1(solver=MKLPardisoSolvers)

and the tests do:

include("example1.jl")
include("example2.jl")
for solver in available_solvers
    run_example_1(solver)
    run_example_2(solver)
end

perhaps?

@mipals
Copy link
Member Author

mipals commented Feb 15, 2024

Thanks for the inputs. I will try to do that.

In regards to the MKL version, then 2023 might also be okay - Its only from 2024 and onwards that Intel is stopping the support for macOS? At least it seems like apple is part of the MKL_jll 2023 tag at
https://github.com/JuliaBinaryWrappers/MKL_jll.jl/releases/tag/MKL-v2023.2.0%2B0
I just took the 2022 from the README, but I guess it might not have been updated?

@KristofferC
Copy link
Member

If 2023 works, let's go with that and update the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants