Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Size limit??

legend_br
Beginner
736 Views
Hello there!

I'm new to Intel MKL, and I was able to compile a simple program using VML under Netbeans. The example I'm testing is calculating the square root of a vector. Everything work fine, until I increase the size of the vector: if my vector has more than 3421 elements (yes, that's my "magic number"), I get the following error:

MKL func load error: /opt/intel/mkl/10.0.1.014/lib/32/libmkl_vml_p4m.so: undefined symbol: vmlGetErrorCallBack

Here's the code:

#include
#include
#include

#include "mkl.h"

using namespace std;

int main()
{

int n = 3422;
clock_t t0, t1;
double entrada, saida;

for (int i = 0; i < n; i++)
entrada = i;

t0 = clock();

for (int i = 0; i < n; i++)
saida = sqrt(entrada);

t1 = clock();

cout << difftime(t1,t0) << endl;

t0 = clock();

vdSqrt(n,entrada,saida);

t1 = clock();

cout << difftime(t1,t0) << endl;


}



Can anybody give me a hint to what's going on? I'm under Ubuntu 7.10, Intel Compiler version 10.1.008, and MKL version 10.0.1.014.
0 Kudos
4 Replies
Andrey_G_Intel2
Employee
736 Views

Could you provide command line which you are using for building this example?

Andrey

0 Kudos
legend_br
Beginner
736 Views
MADagilev:

Could you provide command line which you are using for building this example?

Andrey



I could, but I've just discovered that the problem was with the libraries. If the program loads them dinamically, there's this problem. But if the libraries are attached to the executable, everything works fine.

I found out about this when compiling the examples from MKL: if I increased the size of the vector and typed "make lib32", everything worked fine. But if I typed "make so32", I wouldn't get the ".res" files, meaning it hasn't worked. For a small vector, both worked fine.

Now I just need to learn how to attach a library to my program on Netbeans :P.
0 Kudos
TimP
Honored Contributor III
736 Views
Can't tell if it affects your case, but there was a correction in the 10.1.012 and later compilers, affecting MKL linking.
0 Kudos
Andrey_G_Intel2
Employee
736 Views

legend_br,

I think, this error fixed already and fix is available in lastest MKL. Download and try the lastest MKL 10.0 update please.

Or you can try to use sequential MKL. Just link your application with libmkl_sequential.so instead libmkl_intel_thread.so.

Andrey

0 Kudos
Reply