From 7be8b179ba0392122bf0815a770ecc78fd434f4c Mon Sep 17 00:00:00 2001 From: Johannes Winklehner Date: Wed, 11 May 2016 22:03:45 +0200 Subject: [PATCH] memory free vergessen --- hpc_mpi/src/hpc_mpi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hpc_mpi/src/hpc_mpi.c b/hpc_mpi/src/hpc_mpi.c index 6c89719..7776d2e 100644 --- a/hpc_mpi/src/hpc_mpi.c +++ b/hpc_mpi/src/hpc_mpi.c @@ -1,10 +1,10 @@ /* ============================================================================ Name : hpc_mpi.c - Author : + Author : Version : Copyright : Your copyright notice - Description : Hello MPI World in C + Description : Hello MPI World in C ============================================================================ */ #include @@ -72,7 +72,10 @@ int Binom_Reduce(const void *sendbuf, void *recvbuf, int count, if (r != root) { MPI_Send(reduced, count, datatype, r - i, i, comm); + MPI_Free_mem(reduced); } + MPI_Free_mem(recv); + return 0; }