From 50542c717ec229ef89856418c185093e3c0c6dac Mon Sep 17 00:00:00 2001
From: 13518104 Kevin Austin Stefano <13518104@std.stei.itb.ac.id>
Date: Fri, 5 Mar 2021 23:18:54 +0700
Subject: [PATCH] add in sort

---
 src/QuickSort.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/QuickSort.c b/src/QuickSort.c
index 630d913..b12b960 100644
--- a/src/QuickSort.c
+++ b/src/QuickSort.c
@@ -56,11 +56,13 @@ void QuickSort(int T[], int i, int j, int size, int rank)
 
         if (rank==0) {
             QuickSort(T, i, k, size, rank);
-            MPI_Recv(T,5000, MPI_INT, 1, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE );
+            MPI_Bcast(T,5000, MPI_INT, 1, MPI_COMM_WORD )
+            // MPI_Recv(T,5000, MPI_INT, 1, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE );
             PrintArray(T, 1, j);
         } else if (rank==1) {
             QuickSort(T, k + 1, j, size, rank);
-            MPI_Send(T,5000, MPI_INT,0,  0, MPI_COMM_WORLD );
+            MPI_Bcast(T,5000, MPI_INT, 0, MPI_COMM_WORLD );
+            // MPI_Send(T,5000, MPI_INT,0,  0, MPI_COMM_WORLD );
         }
     }
 }
-- 
GitLab