jump-dev / Ipopt.jl

A Julia interface to the Ipopt nonlinear solver
https://github.com/coin-or/ipopt
Other
149 stars 58 forks source link

BLIS for Ipopt.jl #412

Closed stumarcus314 closed 1 month ago

stumarcus314 commented 1 month ago

In the Ipopt.jl README in the Section "BLAS and LAPACK" (https://github.com/jump-dev/Ipopt.jl#blas-and-lapack), you can also mention BLIS as an alternative to OpenBLAS (the default), Intel MKL, and Apple Accelerate. BLISBLAS.jl is a Julia package that uses BLIS for Julia's underlying BLAS and is compatible with LBT.

"Using LBT, we can also switch dynamically to other BLAS backends such as Intel MKL and Apple Accelerate." -> "Using LBT, we can also switch dynamically to other BLAS backends such as Intel MKL, BLIS, and Apple Accelerate."

BLIS If you have BLISBLAS.jl (https://github.com/JuliaLinearAlgebra/BLISBLAS.jl) installed, switch to BLIS by adding using BLISBLAS to your code:

using BLISBLAS  # Replace OpenBLAS BLAS functionality by BLIS. OpenBLAS is still used for LAPACK functionality.
using Ipopt
amontoison commented 1 month ago

BLISBLAS.jl only loads an ILP64 BLAS (blis_jll.jl). We need an LP64 BLAS / LAPACK for Ipopt and the dependencies. Note that blis32_jll.jl must be combined with LAPACK32_jll.jl if we want to replace OpenBLAS32_jll.jl, MKL.jl or AppleAccelerate.jl.

amontoison commented 1 month ago

I also wanted to add a comment about sequential BLAS / LAPACK for MA86, MA87, MA97. They already use parallelism within the linear solver so we should not oversubscribe the threads with a multithreaded BLAS / LAPACK.

I will open a PR.