Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] MPI_File_write_ordered does not truncate files
From: Ralph Castain (rhc_at_[hidden])
Date: 2009-02-18 11:17:40

Can you confirm - are you -really- using 1.1.2???

You might consider updating to something more recent, like 1.3.0 or at
least 1.2.8. It would be interesting to know if you see the same

On Feb 15, 2009, at 3:27 PM, Brian Austin wrote:

> Hi,
> When I use MPI_File_write_ordered to overwrite an existing file, the
> new file is not truncated to the appropriate size.
> For example, if I first create a new file and write "aa" from two
> nodes, the file contains "aaaa".
> Then I close the file, and compute for a while.
> Later, I reopen the file with amode=CREATE | WRONLY and write "b"
> from two nodes, the file contains "bbaa".
> I would have expected the file to contain only "bb".
> Am I misunderstanding something, or is this a bug?
> Now that I think about it, this seems more like a problem with
> MPI_File_Open:
> this is the behavior I would have expected if I had reopened the
> file with amode=CREATE | RDRW.
> Shouldn't MPI_File_Open truncate the file to 0 when it is opened
> WRONLY and not APPEND?
> I'm able to obtain my desired result by calling
> MPI_File_get_position_shared()
> MPI_File_set_size()
> Thanks
> -Brian
> PS. I'm using (Open MPI) 1.1.2
> _______________________________________________
> users mailing list
> users_at_[hidden]