Open MPI logo

Open MPI User's Mailing List Archives

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

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


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,&atomicity));

// method 2
printf("atomicity : %d", fh->atomicity);

Method 1 in the above code works fine as expected but method 2 give me the
following error

error: dereferencing pointer to incomplete type

Can anybody guide me on how to solve this problem.

Kind Regards
-- Ammar
----------------------------------------------------------------------
Masters Student
Dept. Of Computer Engineering,
Kyung Hee University
----------------------------------------------------------------------