Software Archive
Read-only legacy content
17061 Discussions

Not possible to run offload compiled code on CPU only ?

vincent_b_
Beginner
531 Views

Hi,

Sorry, if that question was previously asked. I couldn't find any hint about it.

I have a compiled offload binary, is it possible to make it run on CPU only with some environment variable?
I saw something about setting "export OFFLOAD_DEVICES=" but then I get the following error :

offload error: cannot offload to MIC - device is not available

Thanks for your help.

0 Kudos
3 Replies
Kevin_D_Intel
Employee
531 Views

You are correct in that defining the variable to an empty value causes the offloaded code to execute on the CPU but with the following exception. The offload default is mandatory so you must add the optional specifier on the offload pragma/directive to be able to force the execution on the CPU using the OFFLOAD_DEVICES= setting.

 

0 Kudos
vincent_b_
Beginner
531 Views

Thanks Kevin,

That did the trick.

0 Kudos
Kevin_D_Intel
Employee
531 Views

Great! You're welcome.

0 Kudos
Reply