I would like to build a big array of dimensions (nx, ny, nz) starting from more smaller arrays of dimensions (nx, ny, nz/np), where np is the number of processors.
As I am new to MPI, I don't exactly know the best procedure. What I tried for now is this (fortran):
call mpi_sendrecv(u_small(nx, ny, nz/np), nx*ny*nz/np, rp, up, 1, u_tot(nx, ny,nz),nx*ny*nz, rp, down, 1, comm, status, ierr)
in which rp, comm and status are already properly defined and they're correct.
Thanks for the help