#pragma weak MPI_Example = PMPI_Example int PMPI_Example(/* appropriate args */) { /* Useful content */ }
The effect of this #pragma is to define the external symbol MPI_Example as a weak definition. This means that the linker will not complain if there is another definition of the symbol (for instance in the profiling library), however if no other definition exists, then the linker will use the weak definition.
MPI-Standard for MARMOT