You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initialize MPI in the current process. The keyword options:
71
59
72
-
- `finalize_atexit`: if true, adds an `atexit` hook to call [`MPI.Finalize`](@ref) if it hasn't already been called.
73
-
- `errors_return`: if true, will set the default error handlers for [`MPI.COMM_SELF`](@ref) and [`MPI.COMM_WORLD`](@ref) to be `MPI.ERRORS_RETURN`. MPI errors will appear as Julia exceptions.
60
+
- `threadlevel`: either `:single`, `:funneled`, `:serialized` (default),
61
+
`:multiple`, or an instance of [`ThreadLevel`](@ref).
62
+
- `finalize_atexit`: if `true` (default), adds an `atexit` hook to call
63
+
[`MPI.Finalize`](@ref) if it hasn't already been called.
64
+
- `errors_return`: if `true` (default), will set the default error handlers for
65
+
[`MPI.COMM_SELF`](@ref) and [`MPI.COMM_WORLD`](@ref) to be
66
+
`MPI.ERRORS_RETURN`. MPI errors will then appear as Julia exceptions.
74
67
75
-
All MPI programs must contain exactly one call to `MPI.Init` or
76
-
[`MPI.Init_thread`](@ref). In particular, note that it is not valid to call `MPI.Init` or
77
-
`MPI.Init_thread` again after calling [`MPI.Finalize`](@ref).
68
+
It will return the [`ThreadLevel`](@ref) value which MPI is initialized at.
78
69
79
-
The only MPI functions that may be called before `MPI.Init`/`MPI.Init_thread` are
70
+
All MPI programs must call this function at least once before calling any other
71
+
MPI operations: the only MPI functions that may be called before `MPI.Init` are
80
72
[`MPI.Initialized`](@ref) and [`MPI.Finalized`](@ref).
81
73
74
+
It is safe to call `MPI.Init` multiple times, however it is not valid to call
Initialize MPI and the MPI thread environment in the current process. The argument specifies the required level of threading
130
-
support, see [`ThreadLevel`](@ref).
131
-
132
-
The keyword options are:
133
-
134
-
- `finalize_atexit`: if true, adds an `atexit` hook to call [`MPI.Finalize`](@ref) if it hasn't already been called.
135
-
- `errors_return`: if true, will set the default error handlers for [`MPI.COMM_SELF`](@ref) and [`MPI.COMM_WORLD`](@ref) to be `MPI.ERRORS_RETURN`. MPI errors will appear as Julia exceptions.
136
-
137
-
138
-
The function will return the provided `ThreadLevel`, and values may be compared via
139
-
inequalities, i.e.
140
-
141
-
```julia
142
-
provided = Init_thread(required)
143
-
@assert provided >= required
144
-
```
145
-
146
-
All MPI programs must contain exactly one call to [`MPI.Init`](@ref) or
147
-
`MPI.Init_thread`. In particular, note that it is not valid to call `MPI.Init` or
148
-
`MPI.Init_thread` again after calling [`MPI.Finalize`](@ref).
149
-
150
-
The only MPI functions that may be called before `MPI.Init`/`MPI.Init_thread` are
151
-
[`MPI.Initialized`](@ref) and [`MPI.Finalized`](@ref).
0 commit comments