Software Archive
Read-only legacy content
17060 Discussions

wrong offload wait/transfer example code

Alin_M_Elena
Beginner
997 Views

Hi,

In this document
http://software.intel.com/en-us/node/413108#30B8C09D-9EC7-401B-8CFC-E4FC3649C0AF
the code listed as example after this
The following example demonstrates using the OFFLOAD directive, as well as directives OFFLOAD_TRANSFER and OFFLOAD_WAIT.
crashes due to the use of uninitialised variables for signal and wait in the offload
replacing the original line
integer :: sin1, sin2, sout1, sout2
by
integer :: sin1=10, sin2=11, sout1=12, sout2=13
results in a running non crashing example

original code crashing out
[aelena00@node002 fortran]$ ./offloadSync.MIX
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
offload error: device 0 does not have a pending signal for wait((nil))
forrtl: error (76): Abort trap signal
Image PC Routine Line Source
libc.so.6 0000003A3B6328A5 Unknown Unknown Unknown
libc.so.6 0000003A3B634085 Unknown Unknown Unknown
liboffload.so.5 00007FD4C67E6F1E Unknown Unknown Unknown
liboffload.so.5 00007FD4C67F080D Unknown Unknown Unknown
offloadSync.MIX 00000000004047E3 Unknown Unknown Unknown
offloadSync.MIX 00000000004040EA Unknown Unknown Unknown
offloadSync.MIX 00000000004039FC Unknown Unknown Unknown
libc.so.6 0000003A3B61ECDD Unknown Unknown Unknown
offloadSync.MIX 0000000000403889 Unknown Unknown Unknown
Aborted (core dumped)

running output:
[aelena00@node002 fortran]$ ./offloadSync.MIX
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************
USE_RESULT *****************

regards,

Alin

0 Kudos
4 Replies
Kevin_D_Intel
Employee
997 Views

Thank you for the note Alin. The noted mistakes in that example are fixed in the documentation for the coming Composer XE 2013 SP1 release (next month).

0 Kudos
Alin_M_Elena
Beginner
997 Views

Thank you Kevin! Great to hear that!

Alin

0 Kudos
james_B_8
Beginner
997 Views

Word of advice: for up to date examples, always look at the ones that come packaged with the compiler. The ones in the manual and even the Xeon Phi book by James Reinders are full of bugs / deprecated code.

James

0 Kudos
Alin_M_Elena
Beginner
997 Views

this is exactly from the very place you say... the link was just for reference as matched the very version of my compiler.

A

0 Kudos
Reply