Software Archive
Read-only legacy content
17061 Discussions

FFTW wrapper not available in offload mode

Nathanael_S_
Beginner
539 Views

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 Kudos
4 Replies
Dmitry_B_Intel
Employee
539 Views

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

0 Kudos
Nathanael_S_
Beginner
539 Views

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"

0 Kudos
Ravi_N_Intel
Employee
539 Views

Did you use -mkl option on the command line.

0 Kudos
Nathanael_S_
Beginner
539 Views

Using -mkl option solved the problem. Many thanks.

0 Kudos
Reply