pyipopt not working with dolfin-adjoint-2017.1.0 docker image
Issue #78
resolved
importing pyipopt fails with
In [1]: import pyipopt
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-d53c3bfda105> in <module>()
----> 1 import pyipopt
/home/fenics/local/lib/python2.7/site-packages/pyipopt/__init__.py in <module>()
14
15 from ipoptconst import *
---> 16 from pyipoptcore import *
17 from ipoptunconstrained import fmin_unconstrained
18
ImportError: libipopt.so.1: cannot open shared object file: No such file or directory
I am using the following docker command
docker run -ti quay.io/dolfinadjoint/dolfin-adjoint:dolfin-adjoint-2017.1.0 /usr/local/bin/ipython
could i use another docker image which contains a working version of IPOPT? or do i have to install the missing ipopt library by myself?
thanks in advance best wishes Florian
Comments (5)
-
-
This might come a bit late, sorry.
libipopt.so.1 is installed in the $HOME/fenics/local/lib directory. All you need to do is to add this path to $LD_LIBRARY_PATH, and it should work:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/local/lib
Add this line to your .bashrc file.
-
Thanks David, I pushed your fix into the master. However, since FEniCS.2017.2.0 we now get this error:
ImportError: /home/fenics/local/lib/libipopt.so.1: undefined symbol: MPI_Comm_rank
-
I get the MPI error only if I don't import dolfin first. The sequence
from dolfin import * import pyipopt
seems to work on the dolfin-adjoint master image.
-
- changed status to resolved
Resolved in master
- Log in to comment
Yes, installing pyipopt from source (https://github.com/xuy/pyipopt) gives this error if "ldconfig" is not run after installing.
I am not entirely certain how to fix this problem with docker, as "ldconfig" does nothing....