Thanks, Brian. That did the trick.
> -----Original Message-----
> From: users-bounces_at_[hidden] [mailto:users-bounces_at_[hidden]]
> Behalf Of Brian Barrett
> Sent: Thursday, July 19, 2007 3:39 PM
> To: Open MPI Users
> Subject: Re: [OMPI users] MPI_File_set_view rejecting subarray views.
> 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
> > 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_ORDER_FORTRAN, MPI_BYTE, &view);
> > MPI_File_set_view(fd, 20, MPI_BYTE, view, "native",
> > 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
> > 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
> users mailing list