diff --git a/bucket b/bucket new file mode 100755 index 0000000000000000000000000000000000000000..1d8380a78c46d92a12372eee7333ec7643aa54e0 Binary files /dev/null and b/bucket differ diff --git a/bucket-sort b/bucket-sort new file mode 100755 index 0000000000000000000000000000000000000000..1d8380a78c46d92a12372eee7333ec7643aa54e0 Binary files /dev/null and b/bucket-sort differ diff --git a/bucket.c b/bucket.c index 6182baa96270c4bfea17dcf5f68b78e7ecfa6e6e..bdfcbd8925b6a770344d26c4cc055d6536efdb29 100644 --- a/bucket.c +++ b/bucket.c @@ -63,6 +63,8 @@ int main(int argc, char** argv) { } int NbElmts = atoi(argv[1]); //ukuran array utama + double total_times = 0.0; + MPI_Init(NULL, NULL); int world_rank; @@ -135,6 +137,7 @@ int main(int argc, char** argv) { } total_time += MPI_Wtime(); + total_times += total_time; /* End timer */ int *all_new = NULL; @@ -157,7 +160,6 @@ int main(int argc, char** argv) { printf("%d, ",all_new[i]); } printf("\n\n"); - printf("---PERFORMANCE---\n"); } MPI_Barrier(MPI_COMM_WORLD); @@ -169,9 +171,7 @@ int main(int argc, char** argv) { free(sub_rand_nums); - MPI_Finalize(); - - printf("Process-%d = %f \n",world_rank ,total_time * 1000); + MPI_Finalize(); return 0; }