File: MPI_Init.3

package info (click to toggle)
mpich 1.1.0-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 22,116 kB
  • ctags: 27,349
  • sloc: ansic: 193,435; sh: 11,172; fortran: 6,545; makefile: 5,801; cpp: 5,020; tcl: 3,548; asm: 3,536; csh: 1,079; java: 614; perl: 183; awk: 168; sed: 70; f90: 62
file content (274 lines) | stat: -rw-r--r-- 6,466 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
.TH MPI_Init 3 "1/6/1997" " " "MPI"
.SH NAME
MPI_Init \-  Initialize the MPI execution environment 
.SH SYNOPSIS
.nf
#include "mpi.h"
int MPI_Init(argc,argv)
int  *argc;
char ***argv;
.fi
.SH INPUT PARAMETERS
.PD 0
.TP
.B argc 
- Pointer to the number of arguments 
.PD 1
.PD 0
.TP
.B argv 
- Pointer to the argument vector
.PD 1

.SH COMMAND LINE ARGUMENTS
MPI specifies no command-line arguments but does allow an MPI
implementation to make use of them.

.PD 0
.TP
.B -mpiqueue 
- print out the state of the message queues when 
.I MPI_FINALIZE
is called.  All processors print; the output may be hard to decipher.  This
is intended as a debugging aid.
.PD 1

.PD 0
.TP
.B -mpiversion 
- print out the version of the implementation (
.B not
of MPI),
including the arguments that were used with configure.
.PD 1

.PD 0
.TP
.B -mpinice nn 
- Increments the nice value by 
.I nn
(lowering the priority 
of the program by 
.I nn
).  
.I nn
must be positive (except for root).  Not
all systems support this argument; those that do not will ignore it.
.PD 1

.PD 0
.TP
.B -mpedbg 
- Start a debugger in an xterm window if there is an error (either
detected by MPI or a normally fatal signal).  This works only if MPICH
was configured with 
.I -mpedbg
.
.PD 1

.PD 0
.TP
.B -mpipktsize nn 
- Set the message length where the ADI changed to 
the long message protocol to 
.I nn
.  This only works if MPICH was 
configured with 
.I -var_pkt
.
.PD 1

The following options are available only on the Chameleon device and
devices built with debugging code.  Normally, these should only be used
by MPICH implementors when debugging new ports.

.PD 0
.TP
.B -mpichdebug 
- Print out the Chameleon device operations
.PD 1

.PD 0
.TP
.B -mpidbfile filename 
- Like mpichdebug, but sends the output to the
specified file.  If the filename contains a 
.I %d
, then that part of
the filename is replaced with the rank in 
.I MPI_COMM_WORLD
.  For example,
.PD 1
.nf
-mpidbfile log.%d 
.fi
writes to 
.I log.0
, 
.I log.1
, etc.

.PD 0
.TP
.B -mpichmemdebug 
- (Chameleon device only) Print out a list of unreclaimed
memory.  This requires that MPI be built with the 
.I -DMPIR_DEBUG_MEM
switch.  This is intended for debugging the MPI implementation itself.
.PD 1

.PD 0
.TP
.B -mpimem 
- If MPICH was built with 
.I -DMPIR_DEBUG_MEM
, this checks all
malloc and free operations (internal to MPICH) for signs of injury 
to the memory allocation areas.
.PD 1

.PD 0
.TP
.B -mpichmsg 
- Print out the number of messages 
received, by category, when the program exits.
.PD 1

.PD 0
.TP
.B -mpidb options 
- Activate various debugging options.  Some require
that MPICH have been built with special options.  These are intended 
for debugging MPICH, not for debugging user programs.  The available 
options include:
.PD 1
.nf
mem     - Enable dynamic memory tracing of internal MPI objects
memall  - Generate output of all memory allocation/deallocation
ptr     - Enable tracing of internal MPI pointer conversions
rank n  - Limit subsequent -mpidb options to on the process with
the specified rank in MPI_COMM_WORLD.  A rank of -1
selects all of MPI_COMM_WORLD.
ref     - Trace use of internal MPI objects
reffile filename - Trace use of internal MPI objects with output
to the indicated file
trace   - Trace routine calls
.fi

.SH NOTES
Note that the Fortran binding for this routine has only the error return
argument (
.I MPI_INIT(ierror)
)

Because the Fortran and C versions of 
.I MPI_Init
are different, there is
a restriction on who can call 
.I MPI_Init
.  The version (Fortran or C) must
match the main program.  That is, if the main program is in C, then
the C version of 
.I MPI_Init
must be called.  If the main program is in
Fortran, the Fortran version must be called.

On exit from this routine, all processes will have a copy of the argument
list.  This is 
.B not required
by the MPI standard, and truely portable codes
should not rely on it.  This is provided as a service by this
implementation (an MPI implementation is allowed to distribute the
command line arguments but is not required to).

Command line arguments are not provided to Fortran programs.  More
precisely, non-standard Fortran routines such as getarg and iargc
have undefined behavior in MPI and in this implementation.

The MPI standard does not say what a program can do before an 
.I MPI_INIT
or
after an 
.I MPI_FINALIZE
.  In the MPICH implementation, you should do
as little as possible.  In particular, avoid anything that changes the
external state of the program, such as opening files, reading standard
input or writing to standard output.

.SH SIGNALS USED
The MPI standard requires that all signals used be documented.  The MPICH
implementation itself uses no signals, but some of the software that MPICH
relies on may use some signals.  The list below is partial and should
be independantly checked if you (and any package that you use) depend
on particular signals.

.SH IBM POE/MPL FOR SP2
SIGHUP, SIGINT, SIGQUIT, SIGFPE, SIGSEGV, SIGPIPE, SIGALRM, SIGTERM,
SIGIO

.SH -MPEDBG SWITCH
SIGQUIT, SIGILL, SIGFPE, SIGBUS, SIGSEGV, SIGSYS

.SH MEIKO CS2
SIGUSR2

.SH CH_P4 DEVICE
SIGUSR1

.SH INTEL PARAGON (CH_NX AND NX DEVICE)
SIGUSR2

.SH SHARED MEMORY (CH_SHMEM DEVICE)
SIGCHLD

Note that if you are using software that needs the same signals, you may
find that there is no way to use that software with the MPI implementation.
The signals that cause the most trouble for applications include
.I SIGIO
, 
.I SIGALRM
, and 
.I SIGPIPE
.  For example, using 
.I SIGIO
and
.I SIGPIPE
may prevent X11 routines from working.

.SH ERRORS

All MPI routines (except 
.I MPI_Wtime
and 
.I MPI_Wtick
) return an error value;
C routines as the value of the function and Fortran routines in the last
argument.  Before the value is returned, the current MPI error handler is
called.  By default, this error handler aborts the MPI job.  The error handler
may be changed with 
.I MPI_Errhandler_set
; the predefined error handler
.I MPI_ERRORS_RETURN
may be used to cause error values to be returned.
Note that MPI does 
.B not
guarentee that an MPI program can continue past
an error.

.PD 0
.TP
.B MPI_SUCCESS 
- No error; MPI routine completed successfully.
.PD 1
.PD 0
.TP
.B MPI_ERR_OTHER 
- This error class is associated with an error code that 
indicates that an attempt was made to call 
.I MPI_INIT
a second time.
.I MPI_INIT
may only be called once in a program.
.PD 1
.SH LOCATION
init.c