Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] MPI_FILE_READ: wrong file-size does not raise an exception
From: Rob Latham (robl_at_[hidden])
Date: 2013-11-15 10:56:13

On 02/11/2013 09:51 AM, Stefan Mauerberger wrote:
> Hi Everyone!
> Playing around with MPI_FILE_READ() puzzles me a little. To catch all
> errors I set the error-handler - the one which is related to file I/O -
> However, when reading from a file which has not the necessary size
> MPI_FILE_READ(...) returns 'MPI_SUCCESS: no errors'. Well, read values
> are just a mess.
> Does anyone have an idea how to catch such an error?

The read succeeded. You would consult the status object to see how many
bytes were actually read.