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

Floating exception error when using a custom library with tools/builder

sgwood
Beginner
509 Views
Hi,
I'm running into an annoyning problem when trying to build my own custom library using the makefile in tools/builder. I have MKL version 10.0.011 and for the sake of simplicity I will simply use the default example it ships with:

1. Contents of user_list:
dgemm_
ddot_
dgetrf_

2. Build mkl_custom.so library with the following command:
make ia32

3. Link the custom library with a simple hello world program (note: the program does not call any routine from the library):
contents of hello.cpp:

#include
using namespace std;
int main()
{
cout << "Hello world" << endl;
return 0;
}

4. Now, compile and link the program:
icpc hello.cpp mkl_custom.so -lpthread

5. Execute the program
./a.out
- This gives the correct output.

6. This is the interesting part (or so I think). If I now copy the custom library mkl_custom.so and the source file hello.cpp to a different machine and repeat the build/execute steps of 4 and 5 I get a "Floating exception" error. However, if I regenerate the custom library on the remote machine using step 2 above then everything works and I'm able to run the program without getting the "Floating exception" error.

Does anyone have any ideas as to what can be happening here? Also, I have tried all different combinations of:

- Use the g++ compiler instead of icpc => does not matter
- Use the static vs. dynamic linking => does not matter
- I have the same set of libmkl_*.a libraries that I copy from place to place to generate the custom_mkl.so library.

Also, this is the setup on each of the machines:

Machine A:
- corei7
- g++ 4.3.2
- icpc 11.0 20081105

Machine B:
- Intel Pentium 4 CPU 3.00GHz
- g++ 3.4.5
- icpc 11.0 20081105

One additional note: I have found that the problem is in going from Machine A to Machine B. I can start on Machine B, generate mkl_custom.so, copy it to Machine A and use it with no perceived probelms.

-Simon
0 Kudos
2 Replies
Gennady_F_Intel
Moderator
509 Views

Interesting ...
Probably some issue with CPU dispatching because of CoreTM i7 processors started to support in MKL 10.1 version only.
But this is just a guess!! -:), especially as your program doesn't call mkl's routines explicitly.
--Gennady

0 Kudos
sgwood
Beginner
509 Views

Interesting ...
Probably some issue with CPU dispatching because of CoreTM i7 processors started to support in MKL 10.1 version only.
But this is just a guess!! -:), especially as your program doesn't call mkl's routines explicitly.
--Gennady


Interesting thought. I decided to try all previous versions of MKL starting with the intial 10.0 release. Using the default example in the tools/builder directory gives the same result. I am starting to believe that the custom library builder never worked. Again, it works great on the machine that it is built on, however if you try to use a custom library on a different machine you have the potential of getting the Floating Exception error.

-Simon
0 Kudos
Reply