From 996dda2e7f60baacb1b9c8d3ca4f4135cb0cd767 Mon Sep 17 00:00:00 2001 From: PioDer Date: Mon, 12 Dec 2016 23:25:18 +0100 Subject: [PATCH] poprawka MPI_Gather -> MPI_Gatherv --- DergunPiotr-WaskoDominik/zad5/gauss_mpi.cpp | 25 ++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/DergunPiotr-WaskoDominik/zad5/gauss_mpi.cpp b/DergunPiotr-WaskoDominik/zad5/gauss_mpi.cpp index 379104f..679c309 100644 --- a/DergunPiotr-WaskoDominik/zad5/gauss_mpi.cpp +++ b/DergunPiotr-WaskoDominik/zad5/gauss_mpi.cpp @@ -67,7 +67,23 @@ int main(int argc, char *argv[]) buff_max = porcja; // na wypadek, jeżeli jednak ostatni kawałek będzie mniejszy if (taskid == 0) - img_out.create(/*buff_max*ntasks*/img.rows, img.cols, img.type()); + img_out.create(img.rows, img.cols, img.type()); + + int *chunk_sizes = new int[ntasks]; + int *chunk_order = new int[ntasks]; + + for (i=0; i