📄 mpid_dev_comm_attr_set_hook.tex
字号:
\startmanpage\mantitle{MPID{\tt \char`\_}Dev{\tt \char`\_}comm{\tt \char`\_}attr{\tt \char`\_}set{\tt \char`\_}hook}{tex}{10/7/2002}\manname{MPID{\tt \char`\_}Dev{\tt \char`\_}comm{\tt \char`\_}attr{\tt \char`\_}set{\tt \char`\_}hook}--- Inform the device about a change to an attribute value for a particular communicator. \subhead{Synopsis}\startvb\begin{verbatim}void MPID_Dev_comm_attr_set_hook( MPID_Comm *comm, int keyval, void *attr_val, MPID_Lang_t lang, int was_set )\end{verbatim}\endvb\subhead{Input Parameters}\startarg{comm }{Communicator with attribute}\startarg{keyval }{Key value for attribute}\startarg{attr{\tt \char`\_}val }{Value of attribute}\startarg{lang }{Language that attribute was set from (see notes).}\startarg{was{\tt \char`\_}set }{Indicates whether the attribute was set (1) or deleted (0)}\par\subhead{Notes}This routine allows the device to find out when an attribute value changes.This can be used by a device that defines its own keyvals (see{\tt MPID{\tt \char`\_}Init}) to allow the MPI user to communicate preferences tothe device. This has already been used in MPICH-G2 to passquality-of-service information to the device.\parThe language value is necessary because Fortran 77 attributes are integers,while C, C++, and Fortran 90 attributes are pointers (addresses). Thesemay not be the same length, so the address {\tt attr{\tt \char`\_}val} must be interpreteddifferently. Note that MPI uses 4 separate routines since each languagehas its own binding (the Fortran 90 one is {\tt MPI{\tt \char`\_}Comm{\tt \char`\_}attr{\tt \char`\_}set}; theFortran 77 one is {\tt MPI{\tt \char`\_}Attr{\tt \char`\_}set}).\parBy default, this is {\tt {\tt \char`\#}define}d as empty in {\tt mpiimpl.h}. A device thatwishes to usethis function should {\tt {\tt \char`\#}undef} it in the device include file ({\tt mpidevpost.h}).\par\subhead{Module}Attribute\par\subhead{Question}We may want to register keyvals with the device so that only attributesassociated with the device call into it. (e.g.,{\tt MPID{\tt \char`\_}Create{\tt \char`\_}keyval( ... )}).That also allows us to define"enhanced" keyvals that contain functions that validate any changes to theattribute values (e.g. an\begin{verbatim} MPID_Attr_validate_function( int keyval, void *attr_val, MPID_Lang_t lang )\end{verbatim}). This also argues that {\tt MPID{\tt \char`\_}Dev{\tt \char`\_}comm{\tt \char`\_}attr{\tt \char`\_}set{\tt \char`\_}hook} routine shouldreturn an MPI error code, allowing the device to cleanly signal an errorto the user.\endmanpage
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -