Janne Blomqvist wrote:
        * caf/mpi.c (caf_runtime_error): Remove "error" parameter.
        Return EXIT_FAILURE instead.
> From the patch:

  /* FIXME: Shutdown the Fortran RTL to flush the buffer.  PR 43849.  */

This is unnecessary, as the call to exit() will call the libgfortran
destructor which will close all units, as explained in comment #3 in
the PR.

While I think it should be sufficient for single-processor usage, I am not sure that that way all I/O buffers gets written before one calls MPI_Finalize - nor am I sure how one would handle ERROR STOP with regards to I/O.

In terms of I/O, there are three kinds of I/O, which might need to be treated differently: * I/O to stdout (OUTPUT_UNIT): Here, all output should be collected by MPI - I am not sure whether it will come to later in a destructor
* I/O to (local) files
* I/O via the communication library: Here, I see the greatest problems, but that's not in F2008's coarrays, but might well be added with the Technical Report.

I somehow would feel better if I could ensure that the buffers are flushed and the files closed before I pull the MPI plug (MPI_Finalize, MPI_Abort).

For reference, the comment Janne is referring to is the one at the bottom (comment 3) of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43849

Tobias

Reply via email to