When N processes share memory on one node, and they allocate a shared memory window with
MPI_Win_allocate_shared(), if the local size on some process is zero but the total size of the window is not, the process with zero size obtains a NULL pointer in the return parameter baseptr.
This does not seem to be compatible with the MPI-3.1 standard, which requires (line 43 of page 407) "The allocated memory is contiguous across process ranks".
Certainly, the NULL pointer will not be contiguous to other ranks...
Workaround: get the actual pointer through a call to MPI_WIN_SHARED_QUERY() + some basic computations.
This has been found in OpenMPI v2.0.4. I know it is not supported anymore, but maybe this is also an issue in more recent OpenMPI versions (I can't test because I cannot install a newer version).