- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Regarding the include file gsl/gsl_rng.h add the location of gsl to MIC_LD_LIBRARAY_PATH also.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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:
- matrix/minmax_source.c
- vector/minmax_source.c
but a simple "#pragma novector" solved the problem in those files.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora