forum.alglib.net
http://forum.alglib.net/

Cannot build ALGLIB with MKL and g++/TDM-64
http://forum.alglib.net/viewtopic.php?f=2&t=4631
Page 1 of 1

Author:  mazay [ Mon Sep 02, 2024 3:09 pm ]
Post subject:  Cannot build ALGLIB with MKL and g++/TDM-64

Hello everyone.

I am trying to use a trial ALGLIB version with linking to pre-built MKL libraries.
My IDE is Code::Blocks, my compilers are MinGW g++ and TDM-64. I am building the application for Windows 64-bit environment.

When I am trying to build application without MKL libraries, it is fine. It is also fine when using Intel-specific optimizations ("AE_CPU=AE_INTEL"), SIMD-capable kernels ("-mavx2 -mfma") and when using muliprocessing capabilities ("AE_OS=AE_WINDOWS" and "alglib::setglobalthreading(alglib::parallel);"). But when I am trying to speed-up my application even more with linking to "alglib402_64mkl.lib" and using #define "AE_MKL", I get the following error:
Code:
alglib-cpp\addons-mkl\libalglib402_64mkl.lib: error adding symbols: File format not recognized
collect2.exe: error: ld returned 1 exit status


I also put the corresponding *.dll file to root folder of my application as it was demonstrated in manual.
I get the similar error message when linking to "libalglib402_64mkl.so".

When linking to 32-bit precompiled MKL library, I get the following error messages:
Code:
obj\Release\alglib-cpp\src\ap.o:ap.cpp: (.text+0x1d1a5): undefined reference to `_alglib2mkl_disable_fast_mm`
obj\Release\alglib-cpp\src\ap.o:ap.cpp: (.text+0x1d254): undefined reference to `_alglib2mkl_rmatrixtrsv`
...
(omitted, a lot of similar messages)
...
collect2.exe: error: ld returned 1 exit status


I suppose that I get these errors because MKL-interface libraries were built with Microsoft Visual Studio and my programm was built with MinGW g++/TDM-64.
Is that correct?
Do I need to install Microsoft Visual Studio to test ALGLIB with MKL-related features? Or maybe it is possible to build application for Windows with ALGLIB and MKL with MinGW g++ or TDM-64 compilers?

Thanks in advance.

Author:  mazay [ Fri Sep 06, 2024 11:39 am ]
Post subject:  Re: Cannot build ALGLIB with MKL and g++/TDM-64

I've checked the building ALGLIB with pre-compiled MKL-interface libraries within Microsoft Visual Studio. It is fine, my program with ALGLIB and MKL builds without errors and works with speed-up of about 2 times compared to program without MKL, as expected from manual.

So there are no such problems when using Microsoft Visual Studio as when using Code::Blocks with MinGW g++ or TDM-64.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/