memory free vergessen
This commit is contained in:
parent
265bb2ac36
commit
7be8b179ba
1 changed files with 5 additions and 2 deletions
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
============================================================================
|
============================================================================
|
||||||
Name : hpc_mpi.c
|
Name : hpc_mpi.c
|
||||||
Author :
|
Author :
|
||||||
Version :
|
Version :
|
||||||
Copyright : Your copyright notice
|
Copyright : Your copyright notice
|
||||||
Description : Hello MPI World in C
|
Description : Hello MPI World in C
|
||||||
============================================================================
|
============================================================================
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -72,7 +72,10 @@ int Binom_Reduce(const void *sendbuf, void *recvbuf, int count,
|
||||||
|
|
||||||
if (r != root) {
|
if (r != root) {
|
||||||
MPI_Send(reduced, count, datatype, r - i, i, comm);
|
MPI_Send(reduced, count, datatype, r - i, i, comm);
|
||||||
|
MPI_Free_mem(reduced);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MPI_Free_mem(recv);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue