Community
cancel
Showing results for 
Search instead for 
Did you mean: 
69 Views

vdexp crashes calling it from java in Linux Fedora

Hi,

In our company we have a multi thread application that uses the MKL from Java and JNI. The code that gives us problems copies data in simple precision to double (in order to avoid performance problems with denormalized floats) and then calls the exponential. I would be something like this:

[cpp]       // This buffer is used as input an output
        double *bufIn = new double;

        register std::size_t i;
        for (i = 0; i < n; i++, ip1 += is1)
        {
            bufIn = (double)*((R*)ip1);
        }

        vdExp ((MKL_INT)n, bufIn, bufIn);

        for (i=0; i < n; i++, op1 += os1)
        {
            *((R*)op1) = ( bufIn);
        }

        delete []bufIn;
[/cpp]

Recently we moved to MKL 10.2 (10.2.5.035). Since then in our Fedora 9 (it does not repoduce in other distributions) we are getting SIGSEVs inside the exponential but it does not seem a corrupted memory issue because the code above is reentrant.

Having a look to the included Java examples we noticed the next line in the makefile for executing the examples.

[bash]export LD_PRELOAD=libmkl_intel_lp64.so:libmkl_intel_thread.so:libmkl_core.so:libiomp5.so

[/bash]
We have a customized library that includes the sequential MKL statically, basically we use the next line to link with MKL:

[bash]-Wl,--start-group libmkl_intel_lp64.a libmkl_sequential.a libmkl_core.a -Wl,--end-group [/bash]

So if we set the LD_PRELOAD pointing to our custom library the problem disappears.

On the other hand we have experienced the issue described http://software.intel.com/en-us/forums/showthread.php?t=62561 and here http://software.intel.com/en-us/forums/showthread.php?t=69301 doing some test with the MKL in parallel mode.

So now we wonder if there is any kind of conflict between the Java signal handling (we know the JVM uses SIGSEV inside) and the MKL one and how it can be solved for different cases.



0 Kudos
1 Reply
69 Views

Folks,

The issues (with signal handling by libiomp5) described in the previous posts were resolved in Composer 2011 beta update 2 and Compiler Pro 12.0 beta update 1. Now the defualt behaviour of libiomp is do nothandle signals. But it can be turned on by setting (environment variable) KMP_HANDLE_SIGNALS to 1. Please, try to run your tests with using the latest Composer (at least Composer 2011 beta update 2 or Compiler Pro 12.0 beta update 1) .

--andrew
Reply