- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Sorry if this is a duplicate post, I haven't worked out how to search on the new forum layout.
It appears that the "error stop" statement only affects the image on which it was called, and doesn't cause the termination of other images. Consider this code:
program test
if (this_image() == 1) write(*, *) num_images()
if (this_image() == 1) error stop
write(*, *) this_image(), "Might be printed..."
sync all
write(*, *) "Shouldn't be printed..."
end program test
I would expect it to only print the number of images once, and maybe print the maybe line on some of the images, and then terminate (the error stop would interrupt the sync all). Instead, I get this output:
8
2 Might be printed...
4 Might be printed...
8 Might be printed...
6 Might be printed...
7 Might be printed...
5 Might be printed...
3 Might be printed...
Shouldn't be printed...
Shouldn't be printed...
Shouldn't be printed...
Shouldn't be printed...
Shouldn't be printed...
Shouldn't be printed...
Shouldn't be printed...
at which point it hangs until I ctrl+c it. I'm not sure what's going on. It happend in both Debug and Release mode builds (with/without optimisation). Here's my compiler version:
Compiling with Intel(R) Visual Fortran Compiler XE 12.1.5.344 [Intel(R) 64]...
Thanks,
Ben
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jimdempseyatthecove wrote:
SYNC ALL(STAT=iStat, ERRMSG=aCharVariableForMessage)
Annalee (Intel) wrote:
I have escalated this issue to the developers.
Thanks Jim, Annalee.
I tried your suggestion, replacing the sync and write with
[fortran]
sync all (stat=istat, errmsg=imsg)
write(*, *) this_image(), istat, imsg
[/fortran]
This is what I get:
[plain]
6 Might be printed...
7 Might be printed...
3 Might be printed...
8 Might be printed...
2 Might be printed...
4 Might be printed...
8
2 0
6 0
5 Might be printed...
3 0
7 0
5 0
8 0
4 0
[/plain]
The message is a blank string.
Cheers,
Ben
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page