On Jul 28, 2008, at 11:12 PM, Jitendra Kumar wrote:
> While working with multiple file source codes, what is the scope of
> 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
> 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
> anywhere in the code ?
It should be declared as a global. However, this is not a data-type
specific thing, it's a classical symbol visibility problem in C.
> Is any derived data type declared valid anywhere in MPI_COMM_WORLD ?
Absolutely not and it will not be on the foreseeable future. I think
you kind of mix the concept of variable visibility with the concept of
comm_world in MPI. They do not have anything in common.
> Jitendra Kumar
> Doctoral Student
> Department of Civil, Construction and Environmental Engineering
> North Carolina State University
> Raleigh, NC 27695
> users mailing list
- application/pkcs7-signature attachment: smime.p7s