I am trying to install the IPOPT algorithm using the pyOptSparse package. I got the SNOPT and SLSQP algorithms working. For the IPOPT algorithm, the build is successful, however when using the algorithm i get the error:
pyOptSparse Error: There was an error importing the compiled IPOPT module
I am building the project in a Ubuntu based Docker container, and have followed the documentation(doc/optimizers/pyipopt.rst) on IPOPT in pyOptSparse pretty much exactly. The complete dockerfile is available( I have included my attempts using both the apt-based package, and some copying of the source per this suggestion). The most relevant part is:
RUN wget http://www.coin-or.org/download/source/Ipopt/Ipopt-3.11.7.tgz && \
gunzip Ipopt-3.11.7.tgz && \
tar -xvf Ipopt-3.11.7.tar && \
rm -rf Ipopt-3.11.7.tar && \
mv Ipopt-3.11.7 /pyoptsparse/pyoptsparse/pyIPOPT/Ipopt && \
wget -P /pyoptsparse/pyoptsparse/pyIPOPT/Ipopt/ThirdParty/HSLold/ \
https://bitbucket.org/mdolab/pyoptsparse/downloads/ma27ad.f && \
cd /pyoptsparse/pyoptsparse/pyIPOPT/Ipopt/ThirdParty/Blas/ && \
./get.Blas && \
cd /pyoptsparse/pyoptsparse/pyIPOPT/Ipopt/ThirdParty/Lapack/ && \
./get.Lapack && \
cd /pyoptsparse/pyoptsparse/pyIPOPT/Ipopt && \
./configure --disable-linear-solver-loader && \
make install
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/pyoptsparse/pyoptsparse/pyIPOPT/Ipopt/lib
RUN cd pyoptsparse && \
python setup.py build_ext --inplace
In the output of the build, pyOptSparse picks up IPOPT "building 'pyoptsparse.pyIPOPT.pyipoptcore' extension".
Does anyone have any suggestions on how I might get the IPOPT algorithm installed, or how I might debug the installation?
Thanks!
Additional notes:
- I did not get the SLSQP algorithm latest commit of pyOptSparse to work, thus I am using the commit fd33788 from late last year.
- I have tried various combinations of the --prefix=/usr/local, but if any one have any specific suggestions on the location and environment variables, I am all ears