@@ -403,14 +403,10 @@ void CAdjEulerSolver::Set_MPI_ActDisk(CSolver **solver_container, CGeometry *geo
403403 unsigned short iVar, iMarker, jMarker;
404404 long nDomain = 0 , iDomain, jDomain;
405405
406- #ifdef HAVE_MPI
407-
408406 /* --- MPI status and request arrays for non-blocking communications ---*/
409407
410- SU2_MPI::Status status, status_;
411-
412-
413- #endif
408+ SU2_MPI::Status status;
409+ SU2_MPI::Request req;
414410
415411 /* --- Define buffer vector interior domain ---*/
416412
@@ -480,13 +476,10 @@ void CAdjEulerSolver::Set_MPI_ActDisk(CSolver **solver_container, CGeometry *geo
480476
481477 if (rank != iDomain) {
482478
483- #ifdef HAVE_MPI
484-
485479 /* --- Communicate the counts to iDomain with non-blocking sends ---*/
486480
487- SU2_MPI::Bsend (&nPointTotal_s[iDomain], 1 , MPI_UNSIGNED_LONG, iDomain, iDomain, MPI_COMM_WORLD);
488-
489- #endif
481+ SU2_MPI::Isend (&nPointTotal_s[iDomain], 1 , MPI_UNSIGNED_LONG, iDomain, iDomain, MPI_COMM_WORLD, &req);
482+ SU2_MPI::Request_free (&req);
490483
491484 } else {
492485
@@ -508,15 +501,11 @@ void CAdjEulerSolver::Set_MPI_ActDisk(CSolver **solver_container, CGeometry *geo
508501
509502 if (rank != jDomain) {
510503
511- #ifdef HAVE_MPI
512-
513504 /* --- Recv the data by probing for the current sender, jDomain,
514505 first and then receiving the values from it. ---*/
515506
516507 SU2_MPI::Recv (&nPointTotal_r[jDomain], 1 , MPI_UNSIGNED_LONG, jDomain, rank, MPI_COMM_WORLD, &status);
517508
518- #endif
519-
520509 }
521510 }
522511
@@ -525,12 +514,8 @@ void CAdjEulerSolver::Set_MPI_ActDisk(CSolver **solver_container, CGeometry *geo
525514
526515 /* --- Wait for the non-blocking sends to complete. ---*/
527516
528- #ifdef HAVE_MPI
529-
530517 SU2_MPI::Barrier (MPI_COMM_WORLD);
531518
532- #endif
533-
534519 /* --- Initialize the counters for the larger send buffers (by domain) ---*/
535520
536521 PointTotal_Counter = 0 ;
@@ -578,17 +563,13 @@ void CAdjEulerSolver::Set_MPI_ActDisk(CSolver **solver_container, CGeometry *geo
578563
579564 if (iDomain != rank) {
580565
581- #ifdef HAVE_MPI
582-
583566 /* --- Communicate the coordinates, global index, colors, and element
584567 date to iDomain with non-blocking sends. ---*/
585568
586- SU2_MPI::Bsend (&Buffer_Send_AdjVar[PointTotal_Counter*(nVar+3 )],
569+ SU2_MPI::Isend (&Buffer_Send_AdjVar[PointTotal_Counter*(nVar+3 )],
587570 nPointTotal_s[iDomain]*(nVar+3 ), MPI_DOUBLE, iDomain,
588- iDomain, MPI_COMM_WORLD);
589-
590- #endif
591-
571+ iDomain, MPI_COMM_WORLD, &req);
572+ SU2_MPI::Request_free (&req);
592573 }
593574
594575 else {
@@ -631,12 +612,8 @@ void CAdjEulerSolver::Set_MPI_ActDisk(CSolver **solver_container, CGeometry *geo
631612
632613 /* --- Wait for the non-blocking sends to complete. ---*/
633614
634- #ifdef HAVE_MPI
635-
636615 SU2_MPI::Barrier (MPI_COMM_WORLD);
637616
638- #endif
639-
640617 /* --- The next section begins the recv of all data for the interior
641618 points/elements in the mesh. First, create the domain structures for
642619 the points on this rank. First, we recv all of the point data ---*/
@@ -655,7 +632,7 @@ void CAdjEulerSolver::Set_MPI_ActDisk(CSolver **solver_container, CGeometry *geo
655632 /* --- Receive the buffers with the coords, global index, and colors ---*/
656633
657634 SU2_MPI::Recv (Buffer_Receive_AdjVar, nPointTotal_r[iDomain]*(nVar+3 ) , MPI_DOUBLE,
658- iDomain, rank, MPI_COMM_WORLD, &status_ );
635+ iDomain, rank, MPI_COMM_WORLD, &status );
659636
660637 /* --- Loop over all of the points that we have recv'd and store the
661638 coords, global index vertex and markers ---*/
@@ -687,12 +664,8 @@ void CAdjEulerSolver::Set_MPI_ActDisk(CSolver **solver_container, CGeometry *geo
687664
688665 /* --- Wait for the non-blocking sends to complete. ---*/
689666
690- #ifdef HAVE_MPI
691-
692667 SU2_MPI::Barrier (MPI_COMM_WORLD);
693668
694- #endif
695-
696669 /* --- Free all of the memory used for communicating points and elements ---*/
697670
698671 delete[] Buffer_Send_AdjVar;
@@ -712,14 +685,10 @@ void CAdjEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
712685 unsigned short iVar, iMarker, jMarker;
713686 long nDomain = 0 , iDomain, jDomain;
714687
715- #ifdef HAVE_MPI
716-
717688 /* --- MPI status and request arrays for non-blocking communications ---*/
718689
719- SU2_MPI::Status status, status_;
720-
721-
722- #endif
690+ SU2_MPI::Status status;
691+ SU2_MPI::Request req;
723692
724693 /* --- Define buffer vector interior domain ---*/
725694
@@ -742,12 +711,8 @@ void CAdjEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
742711
743712 nDomain = size;
744713
745- #ifdef HAVE_MPI
746-
747714 SU2_MPI::Barrier (MPI_COMM_WORLD);
748715
749- #endif
750-
751716 /* --- This loop gets the array sizes of points for each
752717 rank to send to each other rank. ---*/
753718
@@ -796,13 +761,10 @@ void CAdjEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
796761
797762 if (rank != iDomain) {
798763
799- #ifdef HAVE_MPI
800-
801764 /* --- Communicate the counts to iDomain with non-blocking sends ---*/
802765
803- SU2_MPI::Bsend (&nPointTotal_s[iDomain], 1 , MPI_UNSIGNED_LONG, iDomain, iDomain, MPI_COMM_WORLD);
804-
805- #endif
766+ SU2_MPI::Isend (&nPointTotal_s[iDomain], 1 , MPI_UNSIGNED_LONG, iDomain, iDomain, MPI_COMM_WORLD, &req);
767+ SU2_MPI::Request_free (&req);
806768
807769 } else {
808770
@@ -824,15 +786,11 @@ void CAdjEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
824786
825787 if (rank != jDomain) {
826788
827- #ifdef HAVE_MPI
828-
829789 /* --- Recv the data by probing for the current sender, jDomain,
830790 first and then receiving the values from it. ---*/
831791
832792 SU2_MPI::Recv (&nPointTotal_r[jDomain], 1 , MPI_UNSIGNED_LONG, jDomain, rank, MPI_COMM_WORLD, &status);
833793
834- #endif
835-
836794 }
837795 }
838796
@@ -841,12 +799,8 @@ void CAdjEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
841799
842800 /* --- Wait for the non-blocking sends to complete. ---*/
843801
844- #ifdef HAVE_MPI
845-
846802 SU2_MPI::Barrier (MPI_COMM_WORLD);
847803
848- #endif
849-
850804 /* --- Initialize the counters for the larger send buffers (by domain) ---*/
851805
852806 PointTotal_Counter = 0 ;
@@ -893,17 +847,13 @@ void CAdjEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
893847
894848 if (iDomain != rank) {
895849
896- #ifdef HAVE_MPI
897-
898850 /* --- Communicate the coordinates, global index, colors, and element
899851 date to iDomain with non-blocking sends. ---*/
900852
901- SU2_MPI::Bsend (&Buffer_Send_AdjVar[PointTotal_Counter*(nVar+3 )],
853+ SU2_MPI::Isend (&Buffer_Send_AdjVar[PointTotal_Counter*(nVar+3 )],
902854 nPointTotal_s[iDomain]*(nVar+3 ), MPI_DOUBLE, iDomain,
903- iDomain, MPI_COMM_WORLD);
904-
905- #endif
906-
855+ iDomain, MPI_COMM_WORLD, &req);
856+ SU2_MPI::Request_free (&req);
907857 }
908858
909859 else {
@@ -946,12 +896,8 @@ void CAdjEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
946896
947897 /* --- Wait for the non-blocking sends to complete. ---*/
948898
949- #ifdef HAVE_MPI
950-
951899 SU2_MPI::Barrier (MPI_COMM_WORLD);
952900
953- #endif
954-
955901 /* --- The next section begins the recv of all data for the interior
956902 points/elements in the mesh. First, create the domain structures for
957903 the points on this rank. First, we recv all of the point data ---*/
@@ -970,7 +916,7 @@ void CAdjEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
970916 /* --- Receive the buffers with the coords, global index, and colors ---*/
971917
972918 SU2_MPI::Recv (Buffer_Receive_AdjVar, nPointTotal_r[iDomain]*(nVar+3 ) , MPI_DOUBLE,
973- iDomain, rank, MPI_COMM_WORLD, &status_ );
919+ iDomain, rank, MPI_COMM_WORLD, &status );
974920
975921
976922 /* --- Loop over all of the points that we have recv'd and store the
@@ -1003,12 +949,8 @@ void CAdjEulerSolver::Set_MPI_Nearfield(CGeometry *geometry, CConfig *config) {
1003949
1004950 /* --- Wait for the non-blocking sends to complete. ---*/
1005951
1006- #ifdef HAVE_MPI
1007-
1008952 SU2_MPI::Barrier (MPI_COMM_WORLD);
1009953
1010- #endif
1011-
1012954 /* --- Free all of the memory used for communicating points and elements ---*/
1013955
1014956 delete[] Buffer_Send_AdjVar;
0 commit comments