[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [mpi-21] ABI (was: Call for MPI 2.2 and 3.0...)




On Dec 4, 2007, at 3:30 PM, Jeff Squyres wrote:

On Dec 4, 2007, at 4:14 PM, Erez Haba wrote:

1. Calling convention

I'm not sure what you mean by this...? The MPI API is the same in all
MPI implementations.


[erezh] __cdecl vs __stdcall vs __fastall vs your parameter passing convention.

Are those Microsoft-specific conventions? I don't recognize them. In POSIX, there's only one way to call the C MPI API functions.

[goodell] I believe that Erez is referring to the nitty-gritty mechanics of actually calling a function. On most (all?) architectures, most function calls are not specified by a single machine instruction. The caller must put arguments in to the correct registers or push arguments on to the stack in the proper order and with the proper alignment. The callers instruction pointer must be stored somewhere (typically register or stack). The return value might come back from the function in a number of different ways. The caller and the callee must agree on the way these things are done, which is known as the calling convention. It will almost always vary from one architecture to the next and may even vary from compiler to compiler. It can even depend on whether or not the function being compiled calls any other functions.


-Dave Goodell
Argonne National Laboratory