MPI_Sendrecv(&df0[(T+2)*LX*LY*LZ + T*LY*LZ][0],    1, g_deri_x_slice_cont, g_nb_x_dn, 44, &ddummy[(LX-1)*LY*LZ][0],             1, g_deri_x_slice_gath, g_nb_x_up, 44,
MPI_Sendrecv(&df0[(T+2)*LX*LY*LZ + T*LY*LZ][0],    1, deri_x_slice_cont, g_nb_x_dn, 44, &ddummy[(LX-1)*LY*LZ][0],             1, deri_x_slice_gath, g_nb_x_up, 44,
void xchange_deri(){#ifdef MPI  int ix,mu, t, y, z;  MPI_Status status;  /* send the data to the neighbour on the left in time direction */  /* recieve the data from the neighbour on the right in time direction */  MPI_Sendrecv(&df0[(T+1)*LX*L*L][0].d1,        1, g_deri_time_slice_cont, g_nb_t_dn, 43,	       &ddummy[(T-1)*LX*L*L][0].d1,     1, g_deri_time_slice_cont, g_nb_t_up, 43,	       g_cart_grid, &status);  /* add ddummy to df0 */  for(ix=(T-1)*LX*L*L;ix < T*LX*L*L; ix++){    for(mu=0;mu<4;mu++){      df0[ix][mu].d1 += ddummy[ix][mu].d1;      df0[ix][mu].d2 += ddummy[ix][mu].d2;      df0[ix][mu].d3 += ddummy[ix][mu].d3;      df0[ix][mu].d4 += ddummy[ix][mu].d4;      df0[ix][mu].d5 += ddummy[ix][mu].d5;      df0[ix][mu].d6 += ddummy[ix][mu].d6;      df0[ix][mu].d7 += ddummy[ix][mu].d7;      df0[ix][mu].d8 += ddummy[ix][mu].d8;    }  }  /* send the data to the neighbour on the right is not needed*/#ifdef PARALLELXT  /* send the data to the neighbour on the left in x direction */  /* recieve the data from the neighbour on the right in x direction */  MPI_Sendrecv(&df0[(T+2)*LX*LY*LZ + T*LY*LZ][0],    1, g_deri_x_slice_cont, g_nb_x_dn, 44,	       &ddummy[(LX-1)*LY*LZ][0],             1, g_deri_x_slice_gath, g_nb_x_up, 44,	       g_cart_grid, &status);  /* add ddummy to df0 */  for(t = 0; t < T; t++) {    for(y = 0; y < LY; y++) {      for(z = 0; z < LZ; z++) {	ix = g_ipt[t][LX-1][y][z];	for(mu=0;mu<4;mu++){	  df0[ix][mu].d1 += ddummy[ix][mu].d1;	  df0[ix][mu].d2 += ddummy[ix][mu].d2;	  df0[ix][mu].d3 += ddummy[ix][mu].d3;	  df0[ix][mu].d4 += ddummy[ix][mu].d4;	  df0[ix][mu].d5 += ddummy[ix][mu].d5;	  df0[ix][mu].d6 += ddummy[ix][mu].d6;	  df0[ix][mu].d7 += ddummy[ix][mu].d7;	  df0[ix][mu].d8 += ddummy[ix][mu].d8;	}      }    }  }  /* send the data to the neighbour on the right is not needed*/  #endif  /* For dclover */  if(g_use_clover_flag == 1) {        /* send the data to the neighbour on the right */    /* recieve the data from the neighbour on the left */    MPI_Sendrecv(&dclover[T*LX*L*L][0].d1, 1, g_deri_time_slice_cont, g_nb_t_up, 53,		 &ddummy[0][0].d1,         1, g_deri_time_slice_cont, g_nb_t_dn, 53,		 g_cart_grid, &status);    /* add ddummy to dclover */        for(ix=0;ix < LX*L*L; ix++){      for(mu=0;mu<4;mu++){	dclover[ix][mu].d1 += ddummy[ix][mu].d1;	dclover[ix][mu].d2 += ddummy[ix][mu].d2;	dclover[ix][mu].d3 += ddummy[ix][mu].d3;	dclover[ix][mu].d4 += ddummy[ix][mu].d4;	dclover[ix][mu].d5 += ddummy[ix][mu].d5;	dclover[ix][mu].d6 += ddummy[ix][mu].d6;	dclover[ix][mu].d7 += ddummy[ix][mu].d7;	dclover[ix][mu].d8 += ddummy[ix][mu].d8;      }    }        /* send the data to the neighbour on the left */    /* recieve the data from the neighbour on the right */    MPI_Sendrecv(&dclover[(T+1)*LX*L*L][0].d1, 1, g_deri_time_slice_cont, g_nb_t_dn, 54,		 &ddummy[(T-1)*LX*L*L][0].d1,  1, g_deri_time_slice_cont, g_nb_t_up, 54,		 g_cart_grid, &status);    /* add ddummy to dclover */        for(ix=(T-1)*LX*L*L; ix < T*LX*L*L; ix++){      for(mu=0;mu<4;mu++){	dclover[ix][mu].d1 += ddummy[ix][mu].d1;	dclover[ix][mu].d2 += ddummy[ix][mu].d2;	dclover[ix][mu].d3 += ddummy[ix][mu].d3;	dclover[ix][mu].d4 += ddummy[ix][mu].d4;	dclover[ix][mu].d5 += ddummy[ix][mu].d5;	dclover[ix][mu].d6 += ddummy[ix][mu].d6;	dclover[ix][mu].d7 += ddummy[ix][mu].d7;	dclover[ix][mu].d8 += ddummy[ix][mu].d8;      }    }  }#endif}