Skip to content

Commit

Permalink
Use blocking put (local completion) for NbPutValue (#25)
Browse files Browse the repository at this point in the history
* Use blocking put (local completion) for NbPutValue

NbPutValue cannot be really nonblocking because the same origin addr
may be used in the next NbPutValue operation before the former locally
completes.

* test fix: free type at every iteration
  • Loading branch information
minsii authored and jeffhammond committed Apr 12, 2019
1 parent fdc3cda commit 643ea1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/value_ops.c
Expand Up @@ -79,7 +79,7 @@ int PARMCI_PutValueDouble(double src, void *dst, int proc) {
/* -- end weak symbols block -- */

int PARMCI_NbPutValueInt(int src, void *dst, int proc, armci_hdl_t *hdl) {
return PARMCI_NbPut(&src, dst, sizeof(int), proc, hdl);
return PARMCI_Put(&src, dst, sizeof(int), proc);
}

/* -- begin weak symbols block -- */
Expand All @@ -93,7 +93,7 @@ int PARMCI_NbPutValueInt(int src, void *dst, int proc, armci_hdl_t *hdl) {
/* -- end weak symbols block -- */

int PARMCI_NbPutValueLong(long src, void *dst, int proc, armci_hdl_t *hdl) {
return PARMCI_NbPut(&src, dst, sizeof(long), proc, hdl);
return PARMCI_Put(&src, dst, sizeof(long), proc);
}

/* -- begin weak symbols block -- */
Expand All @@ -107,7 +107,7 @@ int PARMCI_NbPutValueLong(long src, void *dst, int proc, armci_hdl_t *hdl) {
/* -- end weak symbols block -- */

int PARMCI_NbPutValueFloat(float src, void *dst, int proc, armci_hdl_t *hdl) {
return PARMCI_NbPut(&src, dst, sizeof(float), proc, hdl);
return PARMCI_Put(&src, dst, sizeof(float), proc);
}

/* -- begin weak symbols block -- */
Expand All @@ -121,7 +121,7 @@ int PARMCI_NbPutValueFloat(float src, void *dst, int proc, armci_hdl_t *hdl) {
/* -- end weak symbols block -- */

int PARMCI_NbPutValueDouble(double src, void *dst, int proc, armci_hdl_t *hdl) {
return PARMCI_NbPut(&src, dst, sizeof(double), proc, hdl);
return PARMCI_Put(&src, dst, sizeof(double), proc);
}

/* Get value operations */
Expand Down
5 changes: 3 additions & 2 deletions tests/mpi/test_mpi_dim.c
Expand Up @@ -501,13 +501,14 @@ void test_dim(int ndim)
pidx1 = idx1;
pidx2 = idx2;
pidx3 = idx3;

MPI_Type_free(&typeA);
MPI_Type_free(&typeB);
}

free(c);
destroy_safe_array();
free(a);
MPI_Type_free(&typeA);
MPI_Type_free(&typeB);
}


Expand Down

0 comments on commit 643ea1a

Please sign in to comment.