Software Archive
Read-only legacy content
17061 ディスカッション

FFTW wrapper not available in offload mode

Nathanael_S_
ビギナー
763件の閲覧回数

Hello,

We are trying to offload the main computations to the MIC, which includes FFT via the MKL and its fftw wrappers.
We are now running into this compilation error:

function "fftw_execute_dft" called in offload region must have been declared with compatible "target" attribute

Is this a bug, or is this intended ? Or do we link with the wrong library here ?

Any help appreciated.

0 件の賞賛
4 返答(返信)
Dmitry_B_Intel
従業員
763件の閲覧回数

It may help if you wrap [#include "fftw3.h"] between [#pragma offload_attribute(push) target(mic)] and [#pragma offload_attribute(pop)]

Nathanael_S_
ビギナー
763件の閲覧回数

Hello,

Thank you for your suggestion. There is a typo in your answer, the correct pragma is [#pragma offload_attribute(push target(mic))].
Compilation now works, but at runtime I get this error:

Hello,

Thank you for your suggestion.

Compilation now works, but at runtime I get this error:

On the remote process, dlopen() failed. The error message sent back from the sink is /tmp/coi_procs/1/6438/load_lib/iccoutNOEXQX: undefined symbol: fftw_execute_dft
offload error: cannot load library to the device 0 (error code 20)
On the sink, dlopen() returned NULL. The result of dlerror() is "/tmp/coi_procs/1/6438/load_lib/iccoutNOEXQX: undefined symbol: fftw_execute_dft"

Ravi_N_Intel
従業員
763件の閲覧回数

Did you use -mkl option on the command line.

Nathanael_S_
ビギナー
763件の閲覧回数

Using -mkl option solved the problem. Many thanks.

返信