Installing Pardiso on Julia (Mac)

Hi everyone,

I am trying to install Pardiso on Mac to be used through JuMP but I am a bit lost. I downloaded Pardison from the webpage and I have my academic license key but the file downloaded is “libpardiso600-MACOS-X86-64.dylib”. Do I need to place this file somewhere within my computer or /.Julia folder to be able to get it to work in Julia?

Thanks a lot and sorry if this issue is trivial but the usage manual from Pardiso project has little to non information about the installation process.

Miguel.

1 Like

As a follow up: this is what I get then I try to run JuMP with Pardiso as the linear solver:

Why is it looking at those weird locations?

Hi @mb96,

I assume you mean you want to use pardiso as the linear solver to Ipopt. You should be able to get it working as follows:

using JuMP
import Ipopt
model = Model(Ipopt.Optimizer)
set_optimizer_attribute(model, "linear_solver", "pardiso")
set_optimizer_attribute(model, "pardisolib", "/full/path/to/libpardiso600-MACOS-X86-64.dylib")

where you replace /full/path/to with the appropriate path. For example, "/Users/miguelborrero/Desktop/libpardiso600-MACOS-X86-64.dylib" if you placed the file on your desktop.

I need to update the instructions in the Ipopt.jl README. We’re in the process of simplifying things, so hopefully it’ll be a lot easier in future.

1 Like

Hi @odow,

Thanks a lot for the reply but this is not working. As show below, Julia does not recognize “pardisolib” as a valid option within Ipopt.

Here is how I set the option:

Here is the error message:

Are you using a recent version of Ipopt? What is the output of ] status -m Ipopt_jll?

Try updating your packages.

You need a newer version of Ipopt to use pardisolib (a version that shows at least v300.1400.XXX; ignore the change from 3.14 to 300.1400, there are just some extra 00).

Update your packages, and if that doesn’t help, do ] add Ipopt_jll@300.1400

I did that and still getting the same problem. Here are the new versions:

Nevertheless, it still does not recognize “pardisolib” as an Ipopt option.

You have somehow installed a very old version of Ipopt that is not actually using Ipopt_jll.

Do you have lots of other packages in your environment? You should use a new environment for each project. Don’t install a bunch of packages into the default environment; bad things can happen like this that lead to version conflicts.

You can work with projects like this:

(base) oscar@Oscars-MBP /tmp % julia                
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.7 (2022-07-19)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.6) pkg> activate /Users/Oscar/Documents/julia-projects/ipopt
  Activating new environment at `/Users/Oscar/Documents/julia-projects/ipopt/Project.toml`

(ipopt) pkg> st
      Status `~/Documents/julia-projects/ipopt/Project.toml` (empty project)

(ipopt) pkg> add Ipopt JuMP

... lots of stuff omitted ...

julia> exit()
(base) oscar@Oscars-MBP /tmp % julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.7 (2022-07-19)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.6) pkg> st
      Status `~/.julia/environments/v1.6/Project.toml` (empty project)

(@v1.6) pkg> activate /Users/Oscar/Documents/julia-projects/ipopt
  Activating environment at `/Users/Oscar/Documents/julia-projects/ipopt/Project.toml`

(ipopt) pkg> st
      Status `~/Documents/julia-projects/ipopt/Project.toml`
  [b6b21f68] Ipopt v1.1.0
  [4076af6c] JuMP v1.4.0
1 Like

@odow Thanks a lot Oscar! It is really is a much better practice to do what you said.

I have done it and now I can set pardisolib as an option however I have now another problem:

Apparently the .dylib file is not compatible with my architecture (I have M1 chip). I believe there’s not much more I can do here because Pardiso does not seem to have a file for “arm64” architecture. Has anyone ran into the same problem?

Use the Rosetta build of Julia. I haven’t tried Pardiso on M1.

Sorry, could you explain a bit more on what you mean by the Rosetta build of Julia?

could you explain a bit more on what you mean by the Rosetta build of Julia?

Oops. Sure :smile:

Download and use the macOS x86 (Intel or Rosetta) version of Julia from: Download Julia. This should let you use the x86 version of Pardiso.

@odow a quick stupid question: I have now 2 versions of Julia in my applications folder. When I type julia in the terminal it will direct me to the M1 architecture version. Is there a quick way to create a second command (e.g julia_2) that opens the x86 one?

Consider using juliaup instead: GitHub - JuliaLang/juliaup: Julia installer and version multiplexer

For example, I have:

oscardowson@Oscars-Mac-mini ~ % juliaup status
 Default  Channel      Version          Update 
-----------------------------------------------
       *  release      1.8.3+0.aarch64         
          release~x64  1.8.3+0.x64    
         
oscardowson@Oscars-Mac-mini ~ % julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.3 (2022-11-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> versioninfo()

Julia Version 1.8.3
Commit 0434deb161e (2022-11-14 20:14 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores

julia> exit()

oscardowson@Oscars-Mac-mini ~ % julia +release~x64
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.3 (2022-11-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> versioninfo()
Julia Version 1.8.3
Commit 0434deb161e (2022-11-14 20:14 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin21.4.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, westmere)
  Threads: 1 on 8 virtual cores
1 Like

@odow Interesting. I have downloaded juliaup and julia x86 but the only versions that juliaup allow me to add are the x64:

Screenshot 2022-12-01 at 12.58.22 PM

The julia +release~x64 should work with your x86_64 version of Pardiso.

1 Like

@odow It does thanks! Now I only need one last thing. It does not found my pardiso license. Where do I have to place it? Currently its in the same folder as the .dylib document. There’s a pardiso.lic file with the license number.

Where do I have to place it?

From the documentation: https://pardiso-project.org/manual/manual.pdf

1 Like