1

我正在尝试使用 MingW 64 在 64 位机器上使用 MKL blas 构建 IPopt,我可以使用以下命令完成配置过程:

../configure ADD_FFLAGS=-fopenmp --with-blas="-L/c/intel/COMPOS~1/mkl/lib/intel64 \
-lmkl_intel_lp64_dll -lmkl_intel_thread_dll -lmkl_core_dll -Wl,\
--rpath,/c/intel/COMPOS~1/mkl/lib/intel64" \
--with-lapack="-L/c/intel/COMPOS~1/mkl/lib/intel64 \
-lmkl_intel_lp64_dll -lmkl_intel_thread_dll -lmkl_core_dll -Wl,\
--rpath,/c/intel/COMPOS~1/mkl/lib/intel64"

我收到成功的配置消息,但是当我尝试继续“make”时,我收到如下错误:

g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual 
-Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-lon
g-long -DIPOPT_BUILD -o ipopt.exe ampl_ipopt.o -Wl,--rpath -Wl,"/c/intel/COMPOS~
1/mkl/lib/intel64" -Wl,--rpath -Wl,"/c/intel/COMPOS~1/mkl/lib/intel64" -Wl,--rpa
th -Wl,"/c/intel/COMPOS~1/mkl/lib/intel64" -Wl,--rpath -Wl,"/c/intel/COMPOS~1/mk
l/lib/intel64" -Wl,--rpath -Wl,"/c/intel/COMPOS~1/mkl/lib/intel64"  ./.libs/libi
poptamplinterface.a ../../Interfaces/.libs/libipopt.a /home/Kevin/mybuild/coin
ipopt/build_64_intel/ThirdParty/ASL/.libs/libcoinasl.a /home/Kevin/mybuild/coi
nipopt/build_64_intel/ThirdParty/Mumps/.libs/libcoinmumps.a -L/c/intel/COMPOS~1/
mkl/lib/intel64 -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1 -Lc:/mingw6
4/bin/../lib/gcc -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../.
./x86_64-w64-mingw32/lib/../lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4
.7.1/../../../../lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../
../../x86_64-w64-mingw32/lib -Lc:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.
1/../../.. /home/Kevin/mybuild/coinipopt/build_64_intel/ThirdParty/HSLold/.lib
s/libcoinhsl.a -lgfortran -lgomp -lmingwthrd -lmingw32 -lgcc_s -lmoldname -lming
wex -lmsvcrt -lquadmath -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 /home
/Kevin/mybuild/coinipopt/build_64_intel/ThirdParty/Metis/.libs/libcoinmetis.a 
-lmkl_intel_lp64_dll -lmkl_intel_thread_dll -lmkl_core_dll
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc.a(unwind-sjlj.o): In f
unction `_Unwind_SjLj_Register':
c:\crossdev\build\gcc-tdm64\x86_64-w64-mingw32\libgcc/../../../../src/gcc-4.7.1/
libgcc/unwind-sjlj.c:127: multiple definition of `_Unwind_SjLj_Register'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc_s.a(d000017.o):(.text+
0x0): first defined here
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc.a(unwind-sjlj.o): In f
unction `_Unwind_SjLj_Unregister':
c:\crossdev\build\gcc-tdm64\x86_64-w64-mingw32\libgcc/../../../../src/gcc-4.7.1/
libgcc/unwind-sjlj.c:174: multiple definition of `_Unwind_SjLj_Unregister'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc_s.a(d000020.o):(.text+
0x0): first defined here
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc.a(unwind-sjlj.o): In f
unction `_Unwind_SjLj_Resume':
c:\crossdev\build\gcc-tdm64\x86_64-w64-mingw32\libgcc/../../../../src/gcc-4.7.1/
libgcc/unwind.inc:220: multiple definition of `_Unwind_SjLj_Resume'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/libgcc_s.a(d000018.o):(.text+
0x0): first defined here
c:/intel/COMPOS~1/mkl/lib/intel64/mkl_intel_lp64_dll.lib(_dgetrf_lp64.obj):(.tex
t[dgetrf]+0xb4): undefined reference to `__security_check_cookie'
c:/intel/COMPOS~1/mkl/lib/intel64/mkl_intel_lp64_dll.lib(_dgetrf_lp64.obj):(.tex
t[dgetrf]+0xf5): undefined reference to `__security_check_cookie'
c:/intel/COMPOS~1/mkl/lib/intel64/mkl_intel_lp64_dll.lib(_dgetrf_lp64.obj):(.xda
ta+0xc): undefined reference to `__GSHandlerCheck'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: c:/intel/COMPOS~1/mkl/lib/intel64/mkl_intel_lp64_dll.lib(_dgetrf_l
p64.obj): bad reloc address 0x1 in section `.text[DGETRF]'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [ipopt.exe] Error 1
make[3]: Leaving directory `/home/Kevin/mybuild/coinipopt/build_64_intel/Ipopt
/src/Apps/AmplSolver'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/Kevin/mybuild/coinipopt/build_64_intel/Ipopt
/src/Apps'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Kevin/mybuild/coinipopt/build_64_intel/Ipopt
'
make: *** [all-recursive] Error 1

如果有人可以提供帮助,我将不胜感激。

跟进:我想我找到了错误的根源,当运行configure时,它会回到MKL的共享库并获取它的路径(在configure日志文件中可用):

/c/Program Files (x86)/Common Files/Intel/Shared Libraries/redist/intel64/compiler

这确实不是一条捷径!所以我想这会引发问题,但我不知道如何强制配置获取短路径!此外,我使用的是 Windows 8 64 位,尽管启用了 8.3 命名约定(Reg. Key 设置为 0),但我仍然只获得某些目录的 8.3 名称,例如我没有得到 Program Files 和 Program Files 的短路径(x86 )。

4

1 回答 1

1

简单回答:Windows 版英特尔 MKL 不提供与 MingW 提供的 gnu 编译器的兼容性!切换到 OpenBlas 并对其进行了排序。

特别感谢 Tony Kelman。

于 2013-05-19T09:24:25.733 回答