A wrapper function for the MPI launcher executable. Calls
cmd is a
Cmd object of the MPI launcher.
julia> mpiexec(cmd -> run(`$cmd -n 3 echo hello world`)); hello world hello world hello world
MPI.install_mpiexecjl(; command::String = "mpiexecjl", destdir::String = joinpath(DEPOT_PATH, "bin"), force::Bool = false, verbose::Bool = true)
mpiexec wrapper to
destdir directory, with filename
true to overwrite an existing destination file with the same path. If
true, the installation prints information about the progress of the process.
An Enum denoting the level of threading support in the current process:
MPI.THREAD_SINGLE: Only one thread will execute.
MPI.THREAD_FUNNELED: The process may be multi-threaded, but the application must ensure that only the main thread makes MPI calls. See
MPI.THREAD_SERIALIZED: The process may be multi-threaded, and multiple threads may make MPI calls, but only one at a time (i.e. all MPI calls are serialized).
MPI.THREAD_MULTIPLE: Multiple threads may call MPI, with no restrictions.
Make a “best attempt” to abort all tasks in the group of
comm. This function does not require that the invoking environment take any action with the error code. However, a Unix or POSIX environment should handle this as a return errorcode from the main program.
Init(;threadlevel=:serialized, finalize_atexit=true, errors_return=true)
Initialize MPI in the current process. The keyword options:
:multiple, or an instance of
true(default), adds an
atexithook to call
MPI.Finalizeif it hasn't already been called.
true(default), will set the default error handlers for
MPI.ERRORS_RETURN. MPI errors will then appear as Julia exceptions.
It will return the
ThreadLevel value which MPI is initialized at.
It is safe to call
MPI.Init multiple times, however it is not valid to call it after calling
Query the level of threading support in the current process. Returns a
ThreadLevel value denoting
Queries whether the current thread is the main thread according to MPI. This can be called by any thread, and is useful for the
MPI.Init has been called,
MPI.Init will automatically insert a hook to call this function when Julia exits, if it hasn't already been called.
MPI.Finalize has completed,
Error thrown when an MPI function returns an error code. The
code field contains the MPI error code.
Error thrown if a feature is not implemented in the current MPI backend.