Skip to content
16 changes: 15 additions & 1 deletion common/ScaLBL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2544,6 +2544,8 @@ void ScaLBL_Communicator::SendD3Q7AA(double *Aq, int Component) {
//...Packing for x face(2,8,10,12,14)................................
ScaLBL_D3Q19_Pack(2, dvcSendList_x, 0, sendCount_x, sendbuf_x,
&Aq[Component * 7 * N], N);

ScaLBL_DeviceBarrier();
req1[0] =
MPI_COMM_SCALBL.Isend(sendbuf_x, sendCount_x, rank_x, sendtag + 0);
req2[0] =
Expand All @@ -2552,6 +2554,8 @@ void ScaLBL_Communicator::SendD3Q7AA(double *Aq, int Component) {
//...Packing for X face(1,7,9,11,13)................................
ScaLBL_D3Q19_Pack(1, dvcSendList_X, 0, sendCount_X, sendbuf_X,
&Aq[Component * 7 * N], N);

ScaLBL_DeviceBarrier();
req1[1] =
MPI_COMM_SCALBL.Isend(sendbuf_X, sendCount_X, rank_X, sendtag + 1);
req2[1] =
Expand All @@ -2560,6 +2564,8 @@ void ScaLBL_Communicator::SendD3Q7AA(double *Aq, int Component) {
//...Packing for y face(4,8,9,16,18).................................
ScaLBL_D3Q19_Pack(4, dvcSendList_y, 0, sendCount_y, sendbuf_y,
&Aq[Component * 7 * N], N);

ScaLBL_DeviceBarrier();
req1[2] =
MPI_COMM_SCALBL.Isend(sendbuf_y, sendCount_y, rank_y, sendtag + 2);
req2[2] =
Expand All @@ -2568,6 +2574,8 @@ void ScaLBL_Communicator::SendD3Q7AA(double *Aq, int Component) {
//...Packing for Y face(3,7,10,15,17).................................
ScaLBL_D3Q19_Pack(3, dvcSendList_Y, 0, sendCount_Y, sendbuf_Y,
&Aq[Component * 7 * N], N);

ScaLBL_DeviceBarrier();
req1[3] =
MPI_COMM_SCALBL.Isend(sendbuf_Y, sendCount_Y, rank_Y, sendtag + 3);
req2[3] =
Expand All @@ -2576,6 +2584,8 @@ void ScaLBL_Communicator::SendD3Q7AA(double *Aq, int Component) {
//...Packing for z face(6,12,13,16,17)................................
ScaLBL_D3Q19_Pack(6, dvcSendList_z, 0, sendCount_z, sendbuf_z,
&Aq[Component * 7 * N], N);

ScaLBL_DeviceBarrier();
req1[4] =
MPI_COMM_SCALBL.Isend(sendbuf_z, sendCount_z, rank_z, sendtag + 4);
req2[4] =
Expand All @@ -2584,6 +2594,8 @@ void ScaLBL_Communicator::SendD3Q7AA(double *Aq, int Component) {
//...Packing for Z face(5,11,14,15,18)................................
ScaLBL_D3Q19_Pack(5, dvcSendList_Z, 0, sendCount_Z, sendbuf_Z,
&Aq[Component * 7 * N], N);

ScaLBL_DeviceBarrier();
req1[5] =
MPI_COMM_SCALBL.Isend(sendbuf_Z, sendCount_Z, rank_Z, sendtag + 5);
req2[5] =
Expand Down Expand Up @@ -2697,6 +2709,7 @@ void ScaLBL_Communicator::TriSendD3Q7AA(double *Aq, double *Bq, double *Cq) {

//...................................................................................
// Send all the distributions
ScaLBL_DeviceBarrier();
req1[0] =
MPI_COMM_SCALBL.Isend(sendbuf_x, 3 * sendCount_x, rank_x, sendtag + 0);
req2[0] =
Expand Down Expand Up @@ -2831,10 +2844,11 @@ void ScaLBL_Communicator::SendHalo(double *data) {
ScaLBL_Scalar_Pack(dvcSendList_yZ, sendCount_yZ, sendbuf_yZ, data, N);
ScaLBL_Scalar_Pack(dvcSendList_Yz, sendCount_Yz, sendbuf_Yz, data, N);
ScaLBL_Scalar_Pack(dvcSendList_YZ, sendCount_YZ, sendbuf_YZ, data, N);

//...................................................................................
// Send / Recv all the phase indcator field values
//...................................................................................

ScaLBL_DeviceBarrier();
req1[0] =
MPI_COMM_SCALBL.Isend(sendbuf_x, sendCount_x, rank_x, sendtag + 0);
req2[0] =
Expand Down
Loading