Using MPI_Shared memory with multidimensional arrays


I am trying use shared mpi mem (per Node) for allocating a N-Dimensional array. Following a simple example* I can get a C pointer (1d) to the shared memory location. My question is how can I best “map” or “wrap” the N-Dim Fortran array (used later on) to this C-pointer without using additional memory or tmp variables. Can you share an example? (or adapt the one on the link)

* (the title of the thread is missleading)


This seems to be the answer:

call C_F_POINTER (C_LOC(rank1_array), rank3_array, [3,2,4])