I have written a simulation code that offloads part of the simulation to MIC cards using #pragma offload. We have two MIC cards in our system. After running the simulation, I notice that the MIC cards have to be rebooted before the simulation can be rerun. Otherwise, when attempting to start a second run, I get an error -
offload error: cannot get device 0 handle (error code 2)
The simulation runs just fine after the cards are rebooted. Why is this happening?