Software Archive
Read-only legacy content
17061 Discussions

simple questions

Jen_B_
Beginner
440 Views

1) I have only one coprocessor, then "offload target(mic)" is same as "offload target(mic:0)"?

2) I specify only fortran arrays inside "in/out/inout" for the offloaded openmp parallel region, do variables used inside that region also need to be explicitly specified inside the "in/out/inout"? Or are they implicitly put inside the "in"? thanks.

 

0 Kudos
3 Replies
Jen_B_
Beginner
440 Views

forgot to tell that in 2) I won't need those variables back. thanks.

0 Kudos
Kevin_D_Intel
Employee
440 Views

1) Yes

2) Variables the compiler sees within the lexical scope of the offload code are implicitly transferred by default with INOUT so add them to an explicit IN to avoid transferring their values back to the host at the conclusion of the offload code block.

0 Kudos
Jen_B_
Beginner
440 Views

Thanks!

0 Kudos
Reply