Skip to content

Commit 2e5650e

Browse files
committed
add a list of nonblocking APIs
1 parent b48621c commit 2e5650e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/nc4_vs_pnetcdf.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,17 @@
7474
nonblocking version of the APIs. A nonblocking API means the call to the API
7575
will return as soon as the `put/get` request has been registered in the
7676
PnetCDF library. The commitment of the request may happen later, when a call
77-
to `ncmpi_wait_all/ncmpi_wait` is made.
77+
to `ncmpi_wait_all/ncmpi_wait` is made. The nonblocking APIs are listed below.
78+
+ Variable.iput_var() - posts a nonblocking request to write to a variable.
79+
+ Variable.iget_var() - posts a nonblocking request to from from a variable.
80+
+ Variable.bput_var() - posts a nonblocking, buffered request to write to a variable.
81+
+ Variable.iput_varn() - posts a nonblocking request to write multiple subarrays to a variable.
82+
+ Variable.iget_varn() - posts a nonblocking request to read multiple subarrays from a variable.
83+
+ Variable.bput_varn() - posts a nonblocking, buffered request to write multiple subarrays to a variable.
84+
+ File.wait_all() - waits for nonblocking requests to complete, using collective MPI-IO.
85+
+ File.wait() - waits for nonblocking requests to complete, using independent MPI-IO.
86+
+ File.attach_buff() - Let PnetCDF to allocate an internal buffer to cache bput write requests.
87+
+ File.detach_buff() - Free the attached buffer.
7888
* The advantage of using nonblocking APIs is when there are many small
7989
`put/get` requests and each of them has a small amount. PnetCDF tries to
8090
aggregate and coalesce multiple registered nonblocking requests into a large
@@ -91,7 +101,7 @@
91101
| ... ||
92102
| # exit define mode and enter data mode<br>f.enddef() | ditto |
93103
| ...<br># Call blocking APIs to write 3 variables to the file | <br># Call nonblocking APIs to post 3 write requests |
94-
| psfc.put_var_al(psfc_buf, start, count)<br>prcp.put_var_al(prcp_buf, start, count)<br>snow.put_var_al(snow_buf, start, count)<br>| reqs = [0]*3<br>reqs[0] = psfc.iput_var(psfc_buf, start, count)<br>reqs[1] = prcp.iput_var(prcp_buf, start, count)<br>reqs[2] = snow.iput_var(snow_buf, start, count)|
104+
| psfc.put_var_all(psfc_buf, start, count)<br>prcp.put_var_all(prcp_buf, start, count)<br>snow.put_var_all(snow_buf, start, count)<br>| reqs = [0]*3<br>reqs[0] = psfc.iput_var(psfc_buf, start, count)<br>reqs[1] = prcp.iput_var(prcp_buf, start, count)<br>reqs[2] = snow.iput_var(snow_buf, start, count)|
95105
| | # Wait for nonblocking APIs to complete<br>errs = [0]*3<br>f.wait_all(3, reqs, errs)|
96106

97107

0 commit comments

Comments
 (0)