Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28455 Discussions

ifort -coarray=shared produces incorrect exit status

Laasner__Raul
Beginner
306 Views

If I compile and run

  print*, 1/0
end program

with ifort then I get a division by zero error with an exit status of 2 (echo $?), as expected. However, If I compile using ifort -coarray=shared then I still get the error but now the exit status is 0. Is this a compiler bug? Each image seems to produce the correct exit code, but the exit code somehow doesn't propagate through the wrapper executable which launches the MPI processes.

Here's the long version of the problem: http://stackoverflow.com/questions/25912031/ifort-coarray-shared-produces-incorrect-exit-status

Thanks

0 Kudos
4 Replies
Steven_L_Intel1
Employee
306 Views

I don't consider this a bug. What should happen if image 1 exits with status 3 and image 2 with status 4? What would you expect the executable to return?

0 Kudos
Laasner__Raul
Beginner
306 Views

Thanks for pointing that out. I continued the discussion at Stackoverflow.

0 Kudos
Steven_L_Intel1
Employee
306 Views

I submitted a request to the developers, issue DPD200361211, that at least the ERROR STOP stop code be propagated. I also asked them to see if an exception that triggered termination could also be propagated.

0 Kudos
Steven_L_Intel1
Employee
306 Views

This has been implemented for Windows in a future major release (calendar year 2017). However, we haven't yet found a way to do this reliably on Linux.

0 Kudos
Reply