2004-01-10 11:22:06 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "lam_config.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "mpi.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "mpi/c/bindings.h"
|
2004-01-10 11:22:06 +03:00
|
|
|
|
2004-01-15 08:24:14 +03:00
|
|
|
#if LAM_HAVE_WEAK_SYMBOLS && LAM_PROFILING_DEFINES
|
|
|
|
#pragma weak MPI_Alloc_mem = PMPI_Alloc_mem
|
2004-01-10 11:22:06 +03:00
|
|
|
#endif
|
|
|
|
|
2004-04-20 22:50:43 +04:00
|
|
|
#if LAM_PROFILING_DEFINES
|
|
|
|
#include "mpi/c/profile/defines.h"
|
|
|
|
#endif
|
|
|
|
|
2004-01-10 11:22:06 +03:00
|
|
|
int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr)
|
|
|
|
{
|
|
|
|
if (size < 0) {
|
|
|
|
/* Return error on MPI_COMM_WORLD */
|
|
|
|
}
|
2004-01-11 00:32:32 +03:00
|
|
|
if (NULL == baseptr) {
|
2004-01-10 11:22:06 +03:00
|
|
|
/* Return error on MPI_COMM_WORLD */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check the MPI_Info and see if we requested a specific MCA
|
|
|
|
type/module. If so, invoke that module's alloc_mem function
|
|
|
|
(query the MCA base ?or the type base? to find the module and/or
|
|
|
|
invoke the alloc_mem on it). Otherwise, call malloc().
|
|
|
|
|
|
|
|
If either fails, return an error on MPI_COMM_WORLD. */
|
|
|
|
|
|
|
|
return MPI_SUCCESS;
|
|
|
|
}
|