📄 mpid_abort.tex
字号:
\startmanpage\mantitle{MPID{\tt \char`\_}Abort}{tex}{10/7/2002}\manname{MPID{\tt \char`\_}Abort}--- Abort at least the processes in the specified communicator. \subhead{Synopsis}\startvb\begin{verbatim}int MPID_Abort( MPID_Comm *comm, int return_code )\end{verbatim}\endvb\subhead{Input Parameters}\startarg{comm }{Communicator of processes to abort}\startarg{return{\tt \char`\_}code }{Return code to return to the calling environment. See notes.}\par\subhead{Return value}{\tt MPI{\tt \char`\_}SUCCESS} or an MPI error code. Normally, this routine should notreturn, since the calling process must be a member of the communicator.However, under some circumstances, the {\tt MPID{\tt \char`\_}Abort} might fail; in thiscase, returning an error indication is appropriate.\par\subhead{Notes}\parIn a fault-tolerant MPI implementation, this operation should abort {\em only}the processes in the specified communicator. Any communicator that sharesprocesses with the aborted communicator becomes invalid. For moredetails, see (paper not yet written on fault-tolerant MPI).\parIn particular, if the communicator is {\tt MPI{\tt \char`\_}COMM{\tt \char`\_}SELF}, only the callingprocess should be aborted.\parThe {\tt return{\tt \char`\_}code} is the return code that this particular process willattempt to provide to the {\tt mpiexec} or other program invocationenvironment. See {\tt mpiexec} for a discussion of how return codes frommany processes may be combined.\parAn external agent that is aborting processes can invoke this with either{\tt MPI{\tt \char`\_}COMM{\tt \char`\_}WORLD} or {\tt MPI{\tt \char`\_}COMM{\tt \char`\_}SELF}. For example, if the process managerwishes to abort a group of processes, it should cause {\tt MPID{\tt \char`\_}Abort} tobe invoked with {\tt MPI{\tt \char`\_}COMM{\tt \char`\_}SELF} on each process in the group.\par\subhead{Question}An alternative design is to provide an {\tt MPID{\tt \char`\_}Group} instead of acommunicator. This would allow a process manager to ask the ADIto kill an entire group of processes without needing a communicator.However, the implementation of {\tt MPID{\tt \char`\_}Abort} will either do this bycommunicating with other processes or by requesting the process managerto kill the processes. That brings up this question: should{\tt MPID{\tt \char`\_}Abort} use {\tt BNR} to kill processes? Should it be required tonotify the process manager? What about persistent resources (suchas SYSV segments or forked processes)?\parThis suggests that for any persistent resource, an exit handler bedefined. These would be executed by {\tt MPID{\tt \char`\_}Abort} or {\tt MPID{\tt \char`\_}Finalize}.See the implementation of {\tt MPI{\tt \char`\_}Finalize} for an example of exit callbacks.In addition, code that registered persistent resources could use persistentstorage (i.e., a file) to record that information, allowing cleanuputilities (such as {\tt mpiexec}) to remove any resources left after theprocess exits.\par{\tt MPI{\tt \char`\_}Finalize} requires that attributes on {\tt MPI{\tt \char`\_}COMM{\tt \char`\_}SELF} be deletedbefore anything else happens; this allows libraries to attach end-of-jobactions to {\tt MPI{\tt \char`\_}Finalize}. It is valuable to have a similarcapability on {\tt MPI{\tt \char`\_}Abort}, with the caveat that {\tt MPI{\tt \char`\_}Abort} may notguarantee that the run-on-abort routines were called. This provides aconsistent way for the MPICH implementation to handle freeing anypersistent resources. However, such callbacks must be limited sincecommunication may not be possible once {\tt MPI{\tt \char`\_}Abort} is called. Further,any callbacks must guarantee that they have finite termination.\parOne possible extension would be to allow {\em users} to add actions to berun when {\tt MPI{\tt \char`\_}Abort} is called, perhaps through a special attribute valueapplied to {\tt MPI{\tt \char`\_}COMM{\tt \char`\_}SELF}. Note that is is incorrect to call the deletefunctions for the normal attributes on {\tt MPI{\tt \char`\_}COMM{\tt \char`\_}SELF} because MPIonly specifies that those are run on {\tt MPI{\tt \char`\_}Finalize} (i.e., normaltermination).\par\subhead{Module}MPID{\tt \char`\_}CORE\endmanpage
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -