Problems with my First Offload program

Problems with my First Offload program

Apaar G.'s picture

Hey!

I'm sorry if a similar question has been put up somewhere else too. I'm a newbie to the Xeon Phi world. My problem is, when I put this to my code (which I intend to offload) :

#pragma offload target(mic:0){

/*

some piece of code

*/

}

The program executes just fine. On the other hand, if I execute :

#pragma offload target(mic:0) in(A1,B1,C1,alpha,beta,gamma,tmp) inout(amt){

/*some code*/

}

The above code compiles fine on the host. When the binary is executed, nothing happens (And I eventually have to press Ctrl+C to terminate)

What can be the possible reason(and solution) for this?

Another pointer : While I was preparing the application for native mode, the copying of binary file to MIC from Host machine using scp requires a password. Is it that while running programs in offload mode which require data "in" and "inout" also need some password.

Any help would be appreciated.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Kevin Davis (Intel)'s picture

There is not sufficient detail in what you provided to explain the behavior described. Hangs are uncommon. You might try setting the environment variable OFFLOAD_REPORT=3 to see whether that sheds any clues if/why it may have hung.
 
Are you offloading the same piece of code and just adding the IN/INOUT clauses? 
 
Is your source code small enough that you could share it with us?
(You can post private messages with attachments to avoid exposing the source to everyone in the forum if you wish)
 
The fact that scp prompts for a password is not a reason for the offload to seemingly hang. The offloading is done under a specialized account id. For ssh access for root or other user accounts, unless one takes explicit actions to ensure SSH keys are setup accordingly, attempts to ssh to the card will prompt for a password.  You can review the details for SSH Access and Configuration for the Intel(R) Xeon Phi(TM) Coprocessor in the MPSS readme for help on setting up the SSH access to the card.

Apaar G.'s picture

"Are you offloading the same piece of code and just adding the IN/INOUT clauses? " 

No, they are different codes. I said that to convey if I involve any variable with offloading, it hangs up. Else works fine. 

Thanks for clearing up that scp's prompting for a password isn't any reason for offload to hang. I think I'll be able to figure something out in the offload report. I guess I can share the offload report with you.

Login to leave a comment.