Skip to content

ncmpi_wait_all called in a loop #599

@wkliao

Description

@wkliao

for(int k = 0; k < nreq_blocks; k++)
{
assert(req_block_ends[k] >= req_block_starts[k]);
rcnt = req_block_ends[k] - req_block_starts[k] + 1;
LOG((1, "ncmpi_wait_all(file=%s, ncid=%d, request range = [%d, %d], num pending requests = %d)", pio_get_fname_from_file(file), file->pio_ncid, req_block_starts[k], req_block_ends[k], nreqs));

The above code fragment calls ncmpi_wait_all in a loop of nreq_blocks times,
which may perform less efficiently than just making a single call, for example,

ierr = ncmpi_wait_all(file->fh, NC_REQ_ALL, NULL, NULL);

This flushes all the pending nonblocking requests.
FYI. NC_REQ_ALL was first introduced in PnetCDF 1.7.0.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions