Open MPI logo

Open MPI User's Mailing List Archives

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

From: Brian Barrett (bbarrett_at_[hidden])
Date: 2007-07-19 17:39:05

On Jul 19, 2007, at 3:24 PM, Moreland, Kenneth wrote:

> I've run into a problem with the File I/O with openmpi version 1.2.3.
> It is not possible to call MPI_File_set_view with a datatype created
> from a subarray. Instead of letting me set a view of this type, it
> gives an invalid datatype error. I have attached a simple program
> that
> demonstrates the problem. In particular, the following sequence of
> function calls should be supported, but they are not.
> MPI_Type_create_subarray(3, sizes, subsizes, starts,
> MPI_File_set_view(fd, 20, MPI_BYTE, view, "native", MPI_INFO_NULL);
> After poking around in the source code a bit, I discovered that the
> I/O
> implementation actually supports the subarray data type, but there
> is a
> check that is issuing an error before the underlying I/O layer (ROMIO)
> has a chance to handle the request.

You need to commit the datatype after calling
MPI_Type_create_subarray. If you add:


after the Type_create, but before File_set_view, the code will run to

Well, the code will then complain about a Barrier after MPI_Finalize
due to an error in how we shut down when there are files that have
been opened but not closed (you should also add a call to
MPI_File_close after the set_view, but I'm assuming it's not there
because this is a test code). This is something we need to fix, but
also signifies a user error.


   Brian W. Barrett
   Networking Team, CCS-1
   Los Alamos National Laboratory