wrong offload wait/transfer example code

wrong offload wait/transfer example code

Hi,

In this document
http://software.intel.com/en-us/node/413108#30B8C09D-9EC7-401B-8CFC-E4FC...
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

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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).

Thank you Kevin! Great to hear that!

Alin

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

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

A

Leave a Comment

Please sign in to add a comment. Not a member? Join today