1MPI_Abort(3) LAM/MPI MPI_Abort(3)
2
3
4
6 MPI_Abort - Terminates MPI execution environment
7
9 #include <mpi.h>
10 int MPI_Abort(MPI_Comm comm, int errcode)
11
13 comm - communicator of tasks to abort
14 errcode
15 - error code to return to invoking environment
16
17
19 Makes a "best attempt" to terminate all MPI processes associated with
20 the communicator comm ; for non-IMPI jobs, this will terminate all pro‐
21 cesses. MPI_Abort will hang, however, if the LAM daemon on the node on
22 which a rank was running has died. For example, if a node gets powered
23 off in the middle of an MPI run and MPI_Abort is invoked, it may hang
24 trying to contact the LAM daemon on the downed node.
25
26 In the case of an IMPI job, in addition to terminating all local IMPI
27 procs, this function will also send an abort message to the local IMPI
28 host, which will, in turn send "closing" messages to all the other IMPI
29 hosts. Their behavior upon receipt of these "closing" messages is
30 implementation dependant.
31
32 If the LAM IMPI host receives a premature "closing" message from a
33 remote IMPI host, it will attempt to continue processing. Any new mes‐
34 sages to that host will likely hang, however.
35
36
38 lower 8 bits: error class
39 - . next 9 bits: function enumeration (there are over 300 MPI
40 functions; it takes 9 bits to represent all possibilities)
41 upper 15 bits: error code
42 - If the error class is nonzero, the error code is the POSIX
43 return value for the program (i.e., exit(error_code) is eventu‐
44 ally called to terminate the program). If the error class is
45 zero, errcode is returned as the POSIX return value for the pro‐
46 gram.
47
48 This is mainly because MPI_Abort is used internally in LAM/MPI
49 to abort MPI upon error; LAM packs all three pieces of data into
50 the errcode. Users who wish to return a specific value from the
51 program
52
54 return ((return_code << 17) + 1);
55
56
57
59 All MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK ) have
60 an additional argument ierr at the end of the argument list. ierr is
61 an integer and has the same meaning as the return value of the routine
62 in C. In Fortran, MPI routines are subroutines, and are invoked with
63 the call statement.
64
65 All MPI objects (e.g., MPI_Datatype , MPI_Comm ) are of type INTEGER in
66 Fortran.
67
68
70 For more information, please see the official MPI Forum web site, which
71 contains the text of both the MPI-1 and MPI-2 standards. These docu‐
72 ments contain detailed information about each MPI function (most of
73 which is not duplicated in these man pages).
74
75 http://www.mpi-forum.org/
76
77
78
80 The LAM Team would like the thank the MPICH Team for the handy program
81 to generate man pages ("doctext" from ftp://ftp.mcs.anl.gov/pub/sow‐
82 ing/sowing.tar.gz ), the initial formatting, and some initial text for
83 most of the MPI-1 man pages.
84
86 abort.c
87
88
89
90LAM/MPI 7.1.2 2/23/2006 MPI_Abort(3)