diff options
author | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-09-15 10:00:53 +0000 |
---|---|---|
committer | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2000-09-15 10:00:53 +0000 |
commit | 8ca925b4392d5de5781eb90196e2f66668348e12 (patch) | |
tree | 1b9db4f6330e7103617c221e9f75cede1a0cddfb /src/SetupPGV.c | |
parent | 7c0d34691d7cb0b347ee7128908d5c9e5d22c10a (diff) |
Allocate/free array of stati for outstanding send requests.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@267 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/SetupPGV.c')
-rw-r--r-- | src/SetupPGV.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/SetupPGV.c b/src/SetupPGV.c index aae0308..b1efb2f 100644 --- a/src/SetupPGV.c +++ b/src/SetupPGV.c @@ -1249,8 +1249,9 @@ pComm *PUGH_SetupGArrayGroupComm(pGH *pughGH, this->send_buffer = (void **) malloc (2 * dim * sizeof (void *)); this->recv_buffer = (void **) malloc (2 * dim * sizeof (void *)); #ifdef CCTK_MPI - this->sreq = (MPI_Request *) malloc (2 * dim * sizeof (MPI_Request)); - this->rreq = (MPI_Request *) malloc (2 * dim * sizeof (MPI_Request)); + this->sreq = (MPI_Request *) malloc (2 * dim * sizeof (MPI_Request)); + this->rreq = (MPI_Request *) malloc (2 * dim * sizeof (MPI_Request)); + this->sstatus = (MPI_Status *) malloc (2 * dim * sizeof (MPI_Status)); #endif this->docomm = (int *) malloc (2 * dim * sizeof (int)); @@ -1260,6 +1261,7 @@ pComm *PUGH_SetupGArrayGroupComm(pGH *pughGH, #ifdef CCTK_MPI this->sreq && this->rreq && + this->sstatus && #endif this->docomm) { @@ -1326,6 +1328,10 @@ pComm *PUGH_SetupGArrayGroupComm(pGH *pughGH, { free (this->rreq); } + if (this->sstatus) + { + free (this->sstatus); + } #endif if (this->docomm) { @@ -1405,6 +1411,7 @@ void PUGH_DestroyComm(pComm **comm) #ifdef CCTK_MPI free ((*comm)->sreq); free ((*comm)->rreq); + free ((*comm)->sstatus); #endif free ((*comm)->docomm); free (*comm); |