简体   繁体   中英

How to use (/install) the pardiso linear solver in ipopt using the pyomo modelling framework?

I am developing an optimization model using pyomo with python (python 3 - i manage packages with anaconda on windows). I need to use a non-linear solver, ipopt. It seems that the default linear solver used by ipopt (mumps or ma27) is relatively slow and not threadable, i wish to use the pardiso solver for the linear part of ipopt. There seems to be two versions of it: the MKL-intel pardiso version and the "independent" version - I am fine with any of them. - but i do not manage to use pardiso.

I have ipopt working, i choose it for my pyomo problem by:

solver = SolverFactory('ipopt')

And i choose 'pardiso' as the linear solver using the ipopt options

solver.options['linear_solver']='pardiso'

I get the following error:

Exception message: Selected linear solver Pardiso not available.
Tried to obtain Pardiso from shared library "libpardiso.dll", but the following error occured:
Windows error while loading dynamic library libpardiso.dll, error = 126.

Which I guess means the solver is not installed. If i choose 'mumps' or do not specify anything, everything works.

However it says that the pardiso solver comes within the mkl library (which I have), now ideally i would like to know which packages i have to install from anaconda to have the pardiso solver working ?

This post stipulates that in order to work, specific Anaconda libraries folders have to be added to the system path, which i did

sys.path.append('C:\Programs\pkgs\mkl-2019.3-203\Library\bin')
sys.path.append('C:\Programs\pkgs\intel-openmp-2019.3-203\Library\bin')

Nothing changes

Alternatively I downloaded the pardiso model from https://www.pardiso-project.org/ which gave me 3 files libpardiso600-WIN-X86-64.dll .exp and .lib with which i don't know what to do or where to place (no explanation on the solver website)

thanks for your help,

With this version of Ipopt, it looks for a file libpardiso.dll . So if you have libpardiso600-WIN-X86-64.dll , then rename this to libpardiso.dll and make sure that it can be found.
With Ipopt 3.14, there will be an option 'pardisolib' to specify the name (possibly including path) of pardiso library.

To load Pardiso from MKL, maybe try copying mkl_rt.dll to libpardiso.dll .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM