Closed tasseff closed 4 years ago
I should also note that I can confirm pardiso_ipopt_newinterface
indeed exists as a symbol in the PARDISO library by using
objdump -T libpardiso600-GNU720-X86-64.so | grep ipopt
and that wssmp_
exists as a symbol in the WSMP library by using
nm -g libwsmp64.a | grep wssmp
Try adding the -fopenmp
into --with-pardiso
.
Also have a look into config.log about the actual linking error. That usually helps to figure out what other libs are missing.
I got the same issue today. After checking out config.log
I realized it was because I did not provide the correct -L
path to Pardiso. Looking at your command, I think the "-L/path/to/libdir" flag in your command might be the culprit. Is "/path/to/libdir" really the path to your Pardiso folder?
No, I used /path/to/libdir
as an example path to not confuse readers.
I did manage to get Ipopt compiled with PARDISO and WSMP using the following:
export MKLSEQ="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
ADD_CFLAGS="-fopenmp -fPIC -fno-common -fexceptions" \
ADD_CXXFLAGS="-fopenmp -fPIC -fno-common -fexceptions" \
ADD_FFLAGS="-fopenmp -fPIC -fexceptions" \
../configure CXXFLAGS="-O0" --with-pic \
--prefix="${IPOPTDIR}" \
--with-pardiso="-L${PARDISODIR} -lpardiso600-GNU720-X86-64 -fopenmp -lgfortran -lquadmath" \
--with-wsmp="${WSMPDIR}/libwsmp64.a -lpthread -lgfortran ${MKLSEQ}"
make -j $(nproc --all)
make install
However, note the use of CXXFLAGS="-O0"
in the configure
options. I've found that if this is not included, Ipopt will encounter a segmentation fault when using PARDISO. @svigerske, any ideas on how to resolve this?
-lmkl_intel_lp64
instead of -lmkl_gf_lp64
.HAVE_PARDISO_MKL
for some reason.libpardiso600-...
). So maybe try whether using another (non-MKL) blas/lapack gets rid of the segfault.And some cleanup you could do:
--with-pic
should be default, especially since shared libs are default, tooADD_
variables are not used by current Ipopt anymoreThank you very much @svigerske, I'm just getting back to this. I seem to have resolved the problem via some minor changes to my configure options, so I will close the issue. I will leave some information below for future readers who might stumble upon this.
Regarding your point about -lmkl_intel_lp64
versus -lmkl_gf_lp64
: to my knowledge, they are meant to be used when compiling with Intel versus GNU compilers, respectively. In this case, I was using GCC 7.4.0 (but still taking advantage of the Intel MKL).
Here is the final sequence I used for configuration:
export MKLSEQ="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
../configure --prefix="${IPOPTSEQDIR}" \
--with-blas-lib="${MKLSEQ} -lmkl_lapack95_lp64" \
--with-lapack-lib="${MKLSEQ} -lmkl_lapack95_lp64" \
--with-pardiso="-L${PARDISODIR} -lpardiso600-GNU720-X86-64 -fopenmp -lgfortran -lquadmath ${MKLSEQ}" \
--with-wsmp="${WSMPDIR}/libwsmp64.a -lpthread -lgfortran ${MKLSEQ}"
I should also note that, with your suggestions, I initially resolved the configuration issue pretty quickly, but Ipopt produced segmentation faults when executed with PARDISO. The segmentation faults were corrected upon adding ${MKLSEQ}
to the --with-pardiso
line, so I assume there indeed might have been a mismatch with BLAS/LAPACK libraries. Thanks again!
I'm trying to configure Ipopt with PARDISO (non-MKL) and WSMP on Linux using GCC 7.4.0. Prior to version 3.13.0, this could be accomplished via something similar to
Using 3.13.0, similar configuration with just PARDISO returns
and configuration with just WSMP returns
It appears that whatever is used for the new
AC_COIN_TRY_LINK
method inconfigure.ac
does not work for these two libraries. Could you confirm? Also, any pointers to get around these errors would be appreciated.