Question

The MPI standard declares the dummy argument buf as follows:

<type> buf(*)

I know as a whole it declares buf as an array with certain type. But I never saw <type> is used in a declaration in Fortran before. Can anyone explain it to me or refer me to the Fortran standard that shows the grammar?

Was it helpful?

Solution

This is explained in the MPI Standard itself in section 2.5.5 on page 16 lines 17 to 22:

MPI functions sometimes use arguments with a choice (or union) data type. Distinct calls to the same routine may pass by reference actual arguments of different types. The mechanism for providing such arguments will differ from language to language. For Fortran with the include file mpif.h or the mpi module, the document uses <type> to represent a choice variable

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top