1 /* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
10 #include <smpi/smpi.h>
12 #define AMPI_CALL(type, name, args) \
13 type A##name args __attribute__((weak)); \
17 // Internally disable these overrides (HAVE_SMPI is only defined when building the library)
18 #define malloc(nbytes) _sampi_malloc(nbytes)
19 #define calloc(n_elm,elm_size) _sampi_calloc(n_elm,elm_size)
20 #define realloc(ptr,nbytes) _sampi_realloc(ptr,nbytes)
21 #define free(ptr) _sampi_free(ptr)
26 XBT_PUBLIC void* _sampi_malloc(size_t size);
27 XBT_PUBLIC void* _sampi_calloc(size_t n_elm, size_t elm_size);
28 XBT_PUBLIC void* _sampi_realloc(void *ptr, size_t size);
29 XBT_PUBLIC void _sampi_free(void* ptr);
31 AMPI_CALL(XBT_PUBLIC int, MPI_Iteration_in, (MPI_Comm comm))
32 AMPI_CALL(XBT_PUBLIC int, MPI_Iteration_out, (MPI_Comm comm))
33 AMPI_CALL(XBT_PUBLIC void, MPI_Migrate, (MPI_Comm comm))