About 'error stop' statement

Anton Shterenlikht mexas@bris.ac.uk
Sun Aug 6 12:24:00 GMT 2017


>What is the right output?
 
All of the above outputs are acceptable.
 
> Sincerely, I don't understand WHY that output
>in (1), (2) and (3)...
>
>Really in (1) it has to produce a Segm. Fault or BT in (2) and (3)?
>
>Thanks,
>    Angelo.
 
ERROR STOP initiates error termination.
The standard says, N2134, 5.3.7p3 [42:16-17]:
"When error termination on an image has been
initiated, the processor should initiate
error termination on other images as quickly
as possible."

Basically, anything can happen. 
If calling MPI_abort is deemed by the implementors
to be the quickest way, then this is acceptable.
If an image has initiated error termination, it's
data might or might not be accessible from other images.
If other images try to access it's data before they
realise that error termination was initiated, you 
can segfaults or MPI errors or any other error, really.
None of this matters, because the aim of error termination
is to quit the execution on all images as fast as possible.
The way this is achieved does not matter.

Anton



More information about the Fortran mailing list