Problem with running Ipopt with Pardiso on jupyter notebook

Dear all,

I am trying to solve an optimization problem from jupyter notebook using JuMP with solver Ipopt (Pardiso linear solver). I can solve the problem without any problem when the code is in a filename.jl file and I run it using include("filename.jl") method. However, when I am trying to run the same code line by line from the jupyter notebook, I get the following errors:

  1. While running the codeblock:
Libdl.dlopen("/usr/lib/x86_64-linux-gnu/libomp.so.5", RTLD_GLOBAL)

(the path name is correct, it does contain the file and so on)

I get the error:

LoadError: could not load library "/usr/lib/x86_64-linux-gnu/libomp.so.5"
/usr/lib/x86_64-linux-gnu/libomp.so.5/libomp.so.5: cannot open shared object file: No such file or directory
  1. While running the codeblock
set_optimizer_attribute(model, "linear_solver", "pardiso")

I get the error:

Exception of type: DYNAMIC_LIBRARY_FAILURE in file "Common/IpLibraryLoader.cpp" at line 67:
 Exception message: libpardiso.so: cannot open shared object file: No such file or directory

I am not sure what is going on. Any tips/suggestion will be much appreciated.

I can solve the problem without any problem when the code is in a filename.jl file and I run it using include("filename.jl") method

I’m not sure then. It’s likely that Jupyter is messing with your load path. This seems more like a Jupyter question than one specific to Ipopt.

Yes, I think so too as well. I was trying to run this on MIT Supercloud's jupyter environment and found that it does not have the same environment variables as their terminal system. I have asked the people in charge of MIT Supercloud to help with this. I am closing this issue, thanks @odow !

1 Like

Okay, yeah if this is on MIT’s cloud environment any number of things could be set up differently.

If you can’t figure out the problem, you should be able to compile a new version of Ipopt with Pardiso included, and then use an override:
https://jump.dev/JuMP.jl/stable/developers/custom_solver_binaries/

Thanks @odow ! Sounds good, the supercloud admins have given me some tips, let me try to implement those and see if I can make it work. If not, I will try to compile a new version of Ipopt as you suggested.