1

The following link represent function name prefix conventions in MPICH/MVAPICH (e.g., MPID and MPIU prefixes)

Function Name Prefix Convention in MPICH/MVAPICH

I am just wondering what MPIR prefix represents (not explained in the link above)? At which layer it is implemented and which layers have access to it? Thanks in advnace

Wesley Bland
  • 8,816
  • 3
  • 44
  • 59
Iman
  • 188
  • 9

1 Answers1

2

MPIR_ is usually used for symbols which are defined in the top-level layer which is below the actual MPI_ interface but above the Abstract Device Interface (ADI), whose symbols usually have an MPID_ prefix. Most MPIU_ symbols are also defined at this layer, but they are usually for completely separate utility routines which do not implement any "MPI business logic". As always with these naming conventions, the convention has not been followed 100% strictly in all cases.

Source: my brain; I've been developing MPICH for >5 years.

Using non-MPI_ names for routines defined inside the library is important, since it means that we won't accidentally stomp on the MPI namespace and potentially conflict with future standardization or confuse users about what is actually standard functionality: http://www.mpi-forum.org/docs/mpi22-report/node31.htm#Node31

We use the ISO C declaration format. All MPI names have an MPI_ prefix, defined constants are in all capital letters, and defined types and functions have one capital letter after the prefix. Programs must not declare variables or functions with names beginning with the prefix MPI_. To support the profiling interface, programs should not declare functions with names beginning with the prefix PMPI_.

Dave Goodell
  • 2,143
  • 16
  • 18
  • Thanks, So you're saying that there's a layer between MPI interface and the device layer. So when we say "MPID_ functions are implemented by the device to be used by the MPI level" by "MPI level" we mean MPIR, right? And when we say "MPI_ functions are implemented by the MPI level to be used by the application" by MPI level we mean MPI Interface, right? – Iman Apr 10 '13 at 15:29
  • Sort of depends on how you want to look at it. I look at the "MPI level" and the "MPIR level" as the same layer in the diagram. That is, an interface is a boundary between layers, ideally composed of a well-defined set of functions and datatypes (imagine a well designed set of headers). Layers are where the actual implementation of those functions lives (the `.c` files for those headers). Unfortunately I don't have the diagram handy that clearly illustrates this. – Dave Goodell Apr 11 '13 at 13:09