Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Accessing data member of MPI_File struct
From: Ammar Ahmad Awan (ammar.ahmad.awan_at_[hidden])
Date: 2012-08-30 23:35:46


Thanks for your answer.

Yes, I mistakenly printed the return value of the function rather than
atomicity.

My real problem is that I want to access the fields from the MPI_File
structure other than the ones provided by the API e.g. the fd_sys.

Atomicity was just one example I used to explain my problem. If MPI_File is
an opaque structure, is there any other way or any other structure through
which I can reach the fields?

Thanks
-- ammar

On Thu, Aug 30, 2012 at 8:48 PM, Jeff Squyres <jsquyres_at_[hidden]> wrote:

> On Aug 30, 2012, at 5:05 AM, Ammar Ahmad Awan wrote:
>
> > int atomicity;
> >
> > // method 1
> > printf("atomicity : %d", MPI_File_get_atomicity(fh,&atomicity));
>
> I think you want:
>
> int atomicity;
> MPI_File_get_atomicity(fh, &atomicity);
> printf("atomicity: %d\n", atomicity);
>
> MPI_File is an opaque structure; you won't be able to access any of the
> fields inside of it directly.
>
> --
> Jeff Squyres
> jsquyres_at_[hidden]
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>