Thanks, Brian.  That did the trick.

-Ken

> -----Original Message-----
> From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org]
On
> 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
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_ORDER_FORTRAN, MPI_BYTE, &view);
> >   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:
> 
>    MPI_Type_commit(&view);
> 
> after the Type_create, but before File_set_view, the code will run to
> completion.
> 
> 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
> 
> --
>    Brian W. Barrett
>    Networking Team, CCS-1
>    Los Alamos National Laboratory
> 
> 
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users



Reply via email to