Skip to content

Commit c845ecb

Browse files
committed
use MPI_COMM_SELF to call MPI_Pack and MPI_Unpack
1 parent fc19c89 commit c845ecb

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

src/drivers/ncchunkio/ncchkioi_put_var.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ int ncchkioi_put_var_cb_chunk (NC_chk *ncchkp,
164164
CHK_ERR_TYPE_COMMIT (&ptype);
165165

166166
// Pack data
167-
CHK_ERR_PACK (buf, 1, ptype, sbufs[nsend], packoff + overlapsize, &packoff,
168-
ncchkp->comm);
167+
CHK_ERR_PACK (buf, 1, ptype, sbufs[nsend], packoff + overlapsize, &packoff, MPI_COMM_SELF);
169168

170169
MPI_Type_free (&ptype);
171170

@@ -275,7 +274,7 @@ int ncchkioi_put_var_cb_chunk (NC_chk *ncchkp,
275274

276275
// Pack data into intermediate buffer
277276
packoff = 0;
278-
CHK_ERR_PACK (buf, 1, ptype, tbuf, varp->chunksize, &packoff, ncchkp->comm);
277+
CHK_ERR_PACK (buf, 1, ptype, tbuf, varp->chunksize, &packoff, MPI_COMM_SELF);
279278
overlapsize = packoff;
280279

281280
MPI_Type_free (&ptype);
@@ -291,8 +290,7 @@ int ncchkioi_put_var_cb_chunk (NC_chk *ncchkp,
291290

292291
// Unpack data into chunk buffer
293292
packoff = 0;
294-
CHK_ERR_UNPACK (tbuf, overlapsize, &packoff, varp->chunk_cache[cid]->buf, 1, ptype,
295-
ncchkp->comm);
293+
CHK_ERR_UNPACK (tbuf, overlapsize, &packoff, varp->chunk_cache[cid]->buf, 1, ptype, MPI_COMM_SELF);
296294

297295
MPI_Type_free (&ptype);
298296

@@ -328,8 +326,7 @@ int ncchkioi_put_var_cb_chunk (NC_chk *ncchkp,
328326
CHK_ERR_TYPE_COMMIT (&ptype);
329327

330328
// Data
331-
CHK_ERR_UNPACK (rbufs[j], rsizes[j], &packoff, varp->chunk_cache[cid]->buf, 1, ptype,
332-
ncchkp->comm);
329+
CHK_ERR_UNPACK (rbufs[j], rsizes[j], &packoff, varp->chunk_cache[cid]->buf, 1, ptype, MPI_COMM_SELF);
333330
MPI_Type_free (&ptype);
334331

335332
// Mark chunk as dirty
@@ -543,7 +540,7 @@ int ncchkioi_put_var_cb_proc (NC_chk *ncchkp,
543540

544541
// Data
545542
packoff = 0;
546-
CHK_ERR_PACK (buf, 1, ptype, sbufp[j], ssize[j], &packoff, ncchkp->comm);
543+
CHK_ERR_PACK (buf, 1, ptype, sbufp[j], ssize[j], &packoff, MPI_COMM_SELF);
547544
sbufp[j] += packoff;
548545
MPI_Type_free (&ptype);
549546
}
@@ -626,7 +623,7 @@ int ncchkioi_put_var_cb_proc (NC_chk *ncchkp,
626623

627624
// Pack data into intermediate buffer
628625
packoff = 0;
629-
CHK_ERR_PACK (buf, 1, ptype, tbuf, varp->chunksize, &packoff, ncchkp->comm);
626+
CHK_ERR_PACK (buf, 1, ptype, tbuf, varp->chunksize, &packoff, MPI_COMM_SELF);
630627
MPI_Type_free (&ptype);
631628
overlapsize = packoff;
632629

@@ -641,8 +638,7 @@ int ncchkioi_put_var_cb_proc (NC_chk *ncchkp,
641638

642639
// Unpack data into chunk buffer
643640
packoff = 0;
644-
CHK_ERR_UNPACK (tbuf, overlapsize, &packoff, varp->chunk_cache[cid]->buf, 1, ptype,
645-
ncchkp->comm);
641+
CHK_ERR_UNPACK (tbuf, overlapsize, &packoff, varp->chunk_cache[cid]->buf, 1, ptype, MPI_COMM_SELF);
646642
MPI_Type_free (&ptype);
647643

648644
// Mark chunk as dirty
@@ -679,8 +675,7 @@ int ncchkioi_put_var_cb_proc (NC_chk *ncchkp,
679675

680676
// Data
681677
packoff = 0;
682-
CHK_ERR_UNPACK (rbufp[j], rsize[j], &packoff, varp->chunk_cache[cid]->buf, 1, ptype,
683-
ncchkp->comm);
678+
CHK_ERR_UNPACK (rbufp[j], rsize[j], &packoff, varp->chunk_cache[cid]->buf, 1, ptype, MPI_COMM_SELF);
684679
rbufp[j] += packoff;
685680
MPI_Type_free (&ptype);
686681

0 commit comments

Comments
 (0)