I'm not sure that it is worth it, but it is simply (with the Win_create's
added):
float *p;
MPI_Win win;
MPI_Alloc_mem( sizeof(float)*100*100, MPI_INFO_NULL, &p );
...
MPI_Win_create( p, sizeof(float)*100*100, sizeof(float),
MPI_INFO_NULL, MPI_COMM_WORLD, &win );
...
MPI_Free_mem( p );
In C++, it would be:
float *p;
p = MPI::Alloc_mem( sizeof(float)*100*100, MPI::INFO_NULL );
...
win = MPI::Win_create( p, sizeof(float)*100*100, sizeof(float),
MPI::INFO_NULL, MPI::COMM_WORLD );
...
MPI::Free_mem( p );
Note that in both cases, we are using "void *" where "void **" has the
appropriate intent because of a "feature" in C/C++ that makes "void *"
friendlier for users.
Bill