Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] Scope of MPI derived data types in MPI_COMM_WORLD
From: Jitendra Kumar (jkumar_at_[hidden])
Date: 2008-07-28 17:12:17

While working with multiple file source codes, what is the scope of the
MPI derived data types.
- I am trying to declare a derived data type for a complex struct
containing dynamic arrays in main() function in a C code.
- In a different function located in a seperate file, I am trying to use
the data type for sending a struct using MPI_Send. The corresponding
receive is again in a separate function which may or may not exist in
the same file.
However, it throws as error as it doesn't knows the declared data type
outside main( ). How should the data type be declared to have it's scope
anywhere in the code ?
Is any derived data type declared valid anywhere in MPI_COMM_WORLD ?


Jitendra Kumar
Doctoral Student
Department of Civil, Construction and Environmental Engineering
North Carolina State University
Raleigh, NC 27695