Software Archive
Read-only legacy content
17060 Discussões

catastrophic error: *MIC* cannot open source file "gsl/gsl_rng.h"

rasoolpour__babak
Principiante
2.235 Visualizações

Hello everyone,

I'm trying to offload the openmp parts of a code to be offloaded on Phi. I added

#pragma offload target (mic)

just before

#pragma omp parallel

and had to add

__attribute__((target(mic)))

to a function to prevent the error

function has not been declared with compatible "target" attribute

However now I get

catastrophic error: *MIC* cannot open source file "gsl/gsl_rng.h"
  #include <gsl/gsl_rng.h>


Can anyone help me with this please?

Cheers,

Babak

0 Kudos
6 Respostas
Frances_R_Intel
Funcionário
2.235 Visualizações

You don't say which function you added the target(mic) attribute to and you don't say how you built your gsl library. I suspect the answer is in there. You will need a copy of the gsl library built for the coprocessor and the gsl include files will need to be where the compiler can find them when compiling your offloaded code. Perhaps if you could provide a simplified test case illustrating the problem, it would be helpful.

rasoolpour__babak
Principiante
2.235 Visualizações

Hi Frances,

Thank you for responding. The function that generates this error at compile time calls several other functions that are all written for a homogeneous system (they are shared between parallel and serial parts). Because of this, I changed my strategy to just run the whole thing natively. Is premade gsl library available or I should build it myself?

Cheers,

Babak

Frances_R_Intel
Funcionário
2.235 Visualizações

Sorry, I don't know of a prebuilt gsl library. However, there are a number of people who have built it. After you source the environment script for the Intel compilers, you should be able to configure the make for gsl as:

./configure --host=x86_64-unknown-linux-gnu CC=icc CXX=icpc CFLAGS="-mmic"

and be able to build it.

Ravi_N_Intel
Funcionário
2.235 Visualizações

Regarding the include file gsl/gsl_rng.h  add the location of gsl to MIC_LD_LIBRARAY_PATH also.

JJK
Novo colaborador III
2.235 Visualizações

FWIW: About 1 year ago I built gsl 1.16 for the Xeon Phi. There are two files that did not pass the test suit:

  1.   matrix/minmax_source.c
  2.   vector/minmax_source.c

but a simple "#pragma novector"  solved the problem in those files.

 

rasoolpour__babak
Principiante
2.235 Visualizações

Thank you JJK!

I managed to compile gsl using Intel's composerxe. The trick is to link mic's library to the gsl make file.

Cheers,

Babak

Responder