Jacobi Iteration: create topology
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
MPI_Comm_size( MPI_COMM_WORLD, &size );
periods[0] = 0; periods[1] = 0;
dims[0] = npy; dims[1] = npx;
MPI_Cart_create(MPI_COMM_WORLD, 2, dims, periods,
MPI_Cart_coords(comm2d, rank, 2, coords);
MPI_Cart_shift(comm2d, 0, 1, &bottomneighbor, &topneighbor);
MPI_Cart_shift(comm2d, 1, 1, &leftneighbor, &rightneighbor);