I am attempting to compile IPOPT 3.13.3 in Windows using Cygwin. I have a copy of Intel Parallel Studio 2019 and am trying to use the Intel compilers as well as Intel MKL from this install. Here's my process:
- Start the Intel compiler 64-bit command prompt
- Run Cygwin.bat to start up the cygwin bash terminal. I can confirm then that ifort and icl are on the path and will run
- Navigate to the ipopt source folder and run
./configure --enable-mscv
From here it finds the compilers fine and it works until trying to get lapack from MKL:
checking for function dsyev_ in /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_intel_lp64_dll.lib /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_sequential_dll.lib /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_core_dll.lib ... no
checking for function dsyev in /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_intel_lp64_dll.lib /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_sequential_dll.lib /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_core_dll.lib ... no
checking for function DSYEV_ in /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_intel_lp64_dll.lib /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_sequential_dll.lib /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_core_dll.lib ... no
checking for function DSYEV in /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_intel_lp64_dll.lib /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_sequential_dll.lib /cygdrive/c/Program Files (x86)/INTELS~1/COMPIL~1.144/windows/mkl/lib/INTEL6~1/mkl_core_dll.lib ... no
It then proceeds to check the cygwin packages for blas/lapack (which I don't want to do anyway) but that fails too:
checking for lapack.pc and blas.pc... yes
checking for function dsyev_ in -llapack ... no
checking for function dsyev in -llapack ... no
checking for function DSYEV_ in -llapack ... no
checking for function DSYEV in -llapack ... no
configure: WARNING: lapack.pc and blas.pc present, but could not find dsyev when trying to link with it.
checking for function dsyev_ in -llapack -lblas ... no
checking for function dsyev in -llapack -lblas ... no
checking for function DSYEV_ in -llapack -lblas ... no
checking for function DSYEV in -llapack -lblas ... no
configure: error: Required package LAPACK not found.
I've tried adding various combinations of libraries manually with the --with-lapack flag, such as suggested here: Linking Ipopt with Intel MKL, but I generally get the same result. Here's another command I tried:
./configure --enable-msvc --with-lapack=" -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -ldl"
And here's the output:
checking for function dsyev_ in -LC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.1.144\windows\mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -ldl ... no
checking for function dsyev in -LC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.1.144\windows\mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -ldl ... no
checking for function DSYEV_ in -LC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.1.144\windows\mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -ldl ... no
checking for function DSYEV in -LC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.1.144\windows\mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -ldl ... no
configure: error: Could not find dsyev in Lapack
It does concern me that there are spaces in the path to MKL (ugh, Windows!), but I tried copying the libraries to another path and linking against that and it didn't change the result.
I also removed the GNU link.exe from the cygwin directory so that running link --version
confirms I'm using the Microsoft linker (per the recommendation here: Installing and using IPopt with Cygwin - or even better alternative?
My internet research is not yielding any more answers. If anyone has some suggestions on what to do here, thank you in advance!