Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

offload error: cannot get device 0 handle (error code 2)

Arpit_S_
Beginner
567 Views

Hello ,

I have a setup of 2 MIC cards on one node, if lets say MIC 0 is not up while MIC 1 is up, Then on executing code, it gives me following error.

      offload error: cannot get device 0 handle (error code 2).

     On offload statement like this  :

      #pragma offload target(mic:-1) inout(a : length(size) alloc_if(1) free_if(0)) in(size)

      OR 

        #pragma offload target(mic:1) inout(a : length(size) alloc_if(1) free_if(0)) in(size)

It would be helpful if there is any complied document for all types of offload error, its reason and possible solution to it.

Thanks in advance.

0 Kudos
1 Reply
Kevin_D_Intel
Employee
567 Views

You appear to be using the Composer XE 2013 Update 1 2013.1.117 (or earlier) where the offload RTL initialized all cards configured in the system, booted or not.

Beginning with the Composer XE 2013 Update 2 (2013.2.146), and still true with the current Update 3 release (2013.3.163), only cards that are actually booted and usable are initialized.

You should upgrade your Composer to the Update 3 as soon as convenient.

As a work around, you can set the environment variable OFFLOAD_DEVICES=1 to restrict initialization/execution to the physical card 1 that you know is available.

A related note, users may control card initialization using OFFLOAD_INIT. Refer to the User’s Guide for information about both environment variables.

We are working on documenting and improving offload related errors. The content of errors has been rather dynamic over the course of developing the offload feature thus complicating documenting those but the intent is to provide those in the documentation in the future.

Hope that helps.

0 Kudos
Reply