Re: [OMPI users] Accessing data member of MPI_File struct

2012-08-31 Thread Jeff Squyres
On Aug 30, 2012, at 11:35 PM, Ammar Ahmad Awan wrote: > 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 struct

Re: [OMPI users] Accessing data member of MPI_File struct

2012-08-30 Thread Ammar Ahmad Awan
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 p

Re: [OMPI users] Accessing data member of MPI_File struct

2012-08-30 Thread Jeff Squyres
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 structur

[OMPI users] Accessing data member of MPI_File struct

2012-08-30 Thread Ammar Ahmad Awan
Dear All, I am using a simple program to access MPI_File attributes. I know that the API provides functions such as MPI_File_get_atomicity( ) but is there a way to access them directly through code? Example: int atomicity; // method 1 printf("atomicity : %d", MPI_File_get_atomicity(fh,&atomicit