0

I am new to the optimization field. Did some projects with fmincon though, and am now looking for an alternative usable in OpenSource, preferrably somehow usable in Python. Therefore I found IPopt. Any other suggestions which are equally good as fmincon?

I tried to install IPopt by compiling it. And I must say, it seems like a mess. I tried all version and ended up with the most promising one "Installation with Cygwin using the MSVC++ compiler " from the Manual. Therefore I have to install CYGwin and change the make.exe. Done. Add the cl.exe from Visual Studio (Visual Studio 1 in my case) to the Apth environment. Done. add "call "call "C:\Program Files (x86)\Microsoft Visual Studio 14\VC\vcvarsall.bat" " to the cygwin.bat. Done.

Now two things. When I do "./configure" with the downloaded IPopt sources I get: "configure: error: /bin/sh './configure' failed for Ipopt"

Also like suggested in the manual calling "./configure -enable-doscompile=msvc" to tell cygwin to use the windows compiler gives me "configure: error: --enable-doscompile=mscv not supported anymore."

So. Basically I am not able to install Ipopt. Using it seem like impossible, as all other methods to build it also failed on my Win10 64bit. It seems that the manual is outdated or I am not finding the corect way to do it, hope some of u guys probably can help. Compiling is something rather new and I am happy to learn. Tahnks in advance.

RandomMario
  • 71
  • 1
  • 1
  • 4
  • Also I found a user which seems to be using it. Unfortunately I am not able to ask how he got it working. Therefore I hope someone can help here. @Ingrid got it working: https://stackoverflow.com/questions/46609929/why-do-ipopt-and-scipy-bring-different-results-using-the-same-inputs-constraint – RandomMario Nov 20 '17 at 22:46

1 Answers1

1

Ensure that you have the following packages installed in Cygwin.

  • Devel: gcc
  • Devel: gfortran
  • Devel: pkg-config
  • Devel: subversion
  • Archive: unzip
  • Utils: patch
  • Web: wget
  • Utils: dos2unix

Assuming you are building for 64-bit, add path to cl.exe in Cygwin.bat (located in root directory of location where Cygwin was installed) so that msvc can be used from Cygwin – call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\vcvars64.bat" (vcvarsall needs you to specify architecture version)

You will need the Intel Fortran Compiler. It comes along with Parallel Studio. Free for students, faculty, open source contributors.


In .bash_profile (located in pathto/cygwin64/home/username/) add this line so that ifort recognizes msvc linker (path given above should be to link.exe of msvc) –
alias ifort='ifort -Qlocation,link,"C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64"'

Intel Fortran gets integrated to a visual studio shell. Run this shell. Execute cygwin.bat from this shell. Check the version of link (link --version). If it is not the microsoft linker, you may have to remove the Cygwin link.exe file from Cygwin folder.

Note that any other bash terminals (e.g. Git Bash) might interfere. You will come to know only while running the configure script. It tries to access packages from those bash terminals. You may have to place them elsewhere temporarily, so cygwin does not find them.

I understand you have read the manual, so you must have downloaded the required third-party tools for Ipopt (asl, lapck, blas and one linear solver) .

You can now run (in Ipopt root folder):

mkdir build  
cd build  
../configure --enable-msvc=MD  
make  
make  install
leo valdez
  • 259
  • 1
  • 15