Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

Offload error: process on the device 0 was terminated by signal 11 (SIGSEGV)

$
0
0

I have the error message: offload error: process on the device 0 was terminated by signal 11 (SIGSEGV)

Compiler flags: 

     icc $(SOURCES) -lOpenCL -fopenmp -O3

Offload code:

void Convolution_Serial_Offload_ExplicitMemCopy(float * pInput, float * pFilter, float * pOutput,

          const int nInWidth, const int nWidth, const int nHeight,

          const int nFilterWidth)

{

#pragma offload target(mic) in(pInput:length(nInWidth*nInWidth)) in(pFilter:length(nFilterWidth*nFilterWidth)) inout(pOutput:length(nWidth*nHeight))

//explict copying of data from host to MIC at start

    for (int yOut = 0; yOut < nHeight; yOut++)

    {

        const int yInTopLeft = yOut;

        for (int xOut = 0; xOut < nWidth; xOut++)

        {

            const int xInTopLeft = xOut;

            float sum = 0;

            for (int r = 0; r < nFilterWidth; r++)

            {

                const int idxFtmp = r * nFilterWidth;

                const int yIn = yInTopLeft + r;

                const int idxIntmp = yIn * nInWidth + xInTopLeft;

#pragma ivdep                                                            //discards any data dependencies assumed by compiler

#pragma vector aligned                                                    //all data accessed in the loop is properly aligned 

                for (int c = 0; c < nFilterWidth; c++)

                {

                    const int idxF  = idxFtmp  + c;

                    const int idxIn = idxIntmp + c;    

                    sum += pFilter[idxF]*pInput[idxIn];

                }

            }

            const int idxOut = yOut * nWidth + xOut;

            pOutput[idxOut] = sum;

        } 

    } 

    //end MIC offload: explict copying of data from MIC to host at finish

}

 

What could be the problem when I call this function from host?

 

Thanks

Dave

 

 


Viewing all articles
Browse latest Browse all 1347

Trending Articles