next up previous
Next: User Control of Profiling Up: The MPI Profiling Interface Previous: Plain implementation

Fancy Implementation

If the compiler and linker support ``weak'' external symbols, as some do, then we can achieve the same effect without having essentially duplicate libraries. The declaration

 #pragma weak MPI_Bcast = PMPI_Bcast
    int PMPI_Bcast( ... )
    {
        ...
    }
defines MPI_Bcast to be PMPI_Bcast if there is no other definition of MPI_Bcast, but the linker does not complain if there is.



Karen D. Toonen
1998-11-19