[ofiwg] Man pages question

Hefty, Sean sean.hefty at intel.com
Thu Aug 13 09:27:14 PDT 2015

> 1.       In the atomics section there is a description of “count” as
> “Count of vectored data entries”. It is little bit vague for me whether
> the value is the “byte len” or “number of fi_datatype elements stored in
> buf. Having looked into the PSM provider code I understood that it is  the
> number of elements. Should be stated more clear?

The PSM provider is correct.  We can clarify the man page.

> 2.       What is the successful return code for fi_cancel and what should
> be returned in the case the cancel fails. I assume for the successful
> cancel it is 0 (all the codes use it) but it is not stated in man pages
> while there is a special errcode FI_ECANCELED in the fi_errno.

Cancel is an asynchronous operation, which keeps it consistent with the rest of the API.  A return value of 0 indicates that the cancel request was started.  A non-zero return value indicates an immediate failure.  The error code FI_ECANCELED is associated with the original request and used to indicate that it was canceled before it could successfully complete.

Basically, after calling fi_cancel(), you must check the completion data of the canceled request to see if it was canceled, or if it completed successfully or had some other error before the cancel occurred.  A cancel operation is a racy mess.

- Sean

More information about the ofiwg mailing list