public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <burnus@net-b.de>
To: Janne Blomqvist <blomqvist.janne@gmail.com>
Cc: Daniel Carrera <dcarrera@gmail.com>,
	gfortran <fortran@gcc.gnu.org>,
	 gcc patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, Fortran] Add caf_runtime_error to libgfortran/caf/single.c
Date: Thu, 14 Jul 2011 21:28:00 -0000	[thread overview]
Message-ID: <4E1F52DB.1010909@net-b.de> (raw)
In-Reply-To: <CAO9iq9G-Kc_wyoidjhs=6xbS_Ub+CNxh9-j0B3xTQPpA3O9haQ@mail.gmail.com>

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

  parent reply	other threads:[~2011-07-14 20:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14  9:56 Daniel Carrera
2011-07-14 10:06 ` Tobias Burnus
2011-07-14 10:31   ` Daniel Carrera
2011-07-14 11:20     ` Tobias Burnus
     [not found]       ` <4E1ED584.50303@gmail.com>
     [not found]         ` <4E1EF7B8.8070303@net-b.de>
     [not found]           ` <4E1F05A7.7060501@gmail.com>
     [not found]             ` <4E1F0BC4.6030604@net-b.de>
2011-07-14 15:46               ` Daniel Carrera
2011-07-14 16:04                 ` Daniel Carrera
2011-07-14 20:11                   ` Janne Blomqvist
2011-07-14 21:14                     ` Daniel Carrera
2011-07-14 21:28                     ` Tobias Burnus [this message]
2011-07-14 21:44                       ` Janne Blomqvist

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E1F52DB.1010909@net-b.de \
    --to=burnus@net-b.de \
    --cc=blomqvist.janne@gmail.com \
    --cc=dcarrera@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).