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] Parallel I/O Usage
From: Rob Latham (robl_at_[hidden])
Date: 2009-07-08 16:47:44


On Mon, Jul 06, 2009 at 11:39:59AM +0200, Manuel Holtgrewe wrote:
> do I understand the MPI-2 Parallel I/O correctly (C++)?
>
> After opening a file with MPI::File::Open, I can use Read_at on the
> returned file object. I give offsets in bytes and I can perform random
> access reads from any process at any point of the file without
> violating correctness (although the performance might/should/will be
> better using views):
>
> MPI::File f = MPI::File::Open(MPI::COMM_WORLD, filename, MPI::MODE_RDONLY,
> MPI::INFO_NULL);
> // ...
> MPI::Offset pos_in_file = ...;
> // ...
> f.Read_at(pos_in_file, buffer, local_n + 1, MPI::INTEGER);
> // ...
> f.Close();

why the +1 ? what's local_n in the first place?

> I have some problems with the program reading invalid data and want to
> make sure I am actually using parallel I/O the right way.

I think you're OK here. What are you seeing? Is this NFS?

==rob

-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA