- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am working in a program using LINUX (64 bits) and MATLAB R2010b, CUDA and CULA (environments to use GPUs) and MKL.
Before, when working with MKL 10 update 2, all worked well. Now, when working with last version of MKL, I have a runtime error....It seems a MKL problem:
*** libmkl_mc3.so *** failed with error : /opt/intel/composerxe-2011.1.107/mkl/lib/intel64/libmkl_mc3.so: undefined symbol: i_free
*** libmkl_def.so *** failed with error : /opt/intel/composerxe-2011.1.107/mkl/lib/intel64/libmkl_def.so: undefined symbol: i_free
MKL FATAL ERROR: Cannot load neither libmkl_mc3.so nor libmkl_def.so
I read some about this (I think it is a similar problem) here: http://software.intel.com/en-us/forums/showthread.php?t=60460
but I don't understand what must I do to solve the problem. Now, I include the following libraries:
-lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5
What must I change? Couuld you give me a line telling me the libraries to include?
Thank you very much
jpeinado
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5
Hi,
This MKL libraries are in incorrect order and not grouped :(
Please use Intel MKL Link Line Advisorfor help.
It recommends:
-L$(MKLROOT)/lib/intel64 -Wl,--start-group -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -openmp -lpthread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://software.intel.com/en-us/forums/showthread.php?t=83330&o=a&s=lr
--Vipin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your problems with Matlab can be due to conflicts with Matlabs MKL DLL/.so ( Matlab uses MKL but an older version). This caused me a lot of grief!
But...you can avoid all these problems by building a "custom" MKL DLL using the tools/builder makefiles (found in the MKL area). It is really easy and you end up with one DLL/.so to link against. And there is no conflict with the Matlab MKL DLL's/.so as your dll has a different name....
This also helps a lot when building a MKL extension to Python as well.
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Creating a custom DLL is easier than creating a MEX file!
cd /opt/intel/composerxe-2011.3.174/mkl/tools/builder
make sointel64 export=lapack_list name=libMyMKL
Then link your MEX file against libMyMKL.so
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did what you told me and almost work....but
make sointel64 export=blas_list name=libMyblas
The problem now is:
dgeidreplpa_cu.o: In function `mexFunction':
tmpxft_000045b0_00000000-1_dgeidreplpa_cu.cudafe1.cpp:(.text+0x142e): undefined reference to `idamax'
tmpxft_000045b0_00000000-1_dgeidreplpa_cu.cudafe1.cpp:(.text+0x150d): undefined reference to `idamax'
collect2: ld returned 1 exit status
mex: link of ' "dgeidreplpa_cu.mexa64"' failed.
nm libMyblas.so |grep "idamax"
U idamax_
The "typical" problem of "_"
How can I solve this?
Thank you
jpeinado
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suppose there is a cblas wrapper as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
then do...
make sointel64 export=my_blas_list name=libMyblas
See if that works...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
then do...
make sointel64 export=my_blas_list name=libMyblas
See if that works...
mex: link of ' "dgeidreplpa_cu.mexa64"' failed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anyway, don't get hung up on this. I assume you have the source code to the MEX , change reference to idamax to idamax_ and move on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again:
I tested your two ideas and they did not work
1) I got my own myblas_list and added a line with the "idamax" line. Also I generated libMyBlas.so file correctly. It did not worked
dgeidreplpa_cu.o: In function `mexFunction':
tmpxft_000061b6_00000000-1_dgeidreplpa_cu.cudafe1.cpp:(.text+0x142e): undefined reference to `idamax'
tmpxft_000061b6_00000000-1_dgeidreplpa_cu.cudafe1.cpp:(.text+0x150d): undefined reference to `idamax'
collect2: ld returned 1 exit status
mex: link of ' "dgeidreplpa_cu.mexa64"' failed.
dgeidreplpa_cu.o: In function `mexFunction':tmpxft_000061b6_000000001_dgeidreplpa_cu.cudafe1.cpp:(.text+0x142e): undefined reference to `idamax'tmpxft_000061b6_00000000-1_dgeidreplpa_cu.cudafe1.cpp:(.text+0x150d): undefined reference to `idamax'collect2: ld returned 1 exit status
mex: link of ' "dgeidreplpa_cu.mexa64"' failed.
2) Then in the mex source (C++) file I changed idamax with idamax_ :
dgeidreplpa_cu.cu(406): error: identifier "idamax_" is undefined
1 error detected in the compilation of "/tmp/tmpxft_00006434_00000000-4_dgeidreplpa_cu.cpp1.ii".
There are some important questions here...The compilation steps are 2:
- A Compile step with nvcc (a g++ wrapper to work with CUDA files from NVIDIA)
- A link step using MEX
I give the file to you:
!nvcc -c dgeidreplpa_cu.cu -Xcompiler -fPIC -I/usr/local/cula/include -I/usr/local/cuda/include -I/usr/local/MATLAB/R2010b/extern/include -I/opt/intel/composerxe-2011.1.107/mkl/include
!mex dgeidreplpa_cu.o cudaDMatrixPlusIdentity.o -cxx -L/usr/local/cula/lib64-lcula -lcublas -lcudart -lpthread libMyblas.so
It is very strange. All this worked with the former MKL 10 update 2
Again thank you very much
jpeinado

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page