int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr);
Now, MPICC/GCC takes this with
void *memory = (void *)0;
int error = MPI_Alloc_mem(1024, MPI_INFO_NULL, &memory);
and you get the memory allocated properly.
What is more, this is incorrect:
int error = MPI_Alloc_mem(1024, MPI_INFO_NULL, memory);
although it compiles fine because that is, indeed, the API.
Why would we have the pointer going in by value, when it is coming out
as an OUT argument?
Isn't this plain wrong? void **baseptr means ---> I am passing you the
address of a void pointer.
Every viable implementation must do *(void **)baseptr = ...
when providing the "malloc'd/special" memory. So... why did we fudge
the C API. Is there some tie-in with the Fortran API?
Thanks in advance,
Tony Skjellum