# Environment

## Functions

MPI.AbortFunction
Abort(comm::Comm, errcode::Integer)

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.

source
MPI.InitFunction
Init()

Initialize MPI in the current process.

All MPI programs must contain exactly one call to MPI.Init(). In particular, note that it is not valid to call MPI.Init again after calling MPI.Finalize.

The only MPI functions that may be called before MPI.Init() are MPI.Initialized and MPI.Finalized.

source
MPI.FinalizeFunction
Finalize()

Marks MPI state for cleanup. This should be called after Init, at most once, and no further MPI calls (other than Initialized or Finalized) should be made after it is called.

Note that this does not correspond exactly to MPI_FINALIZE in the MPI specification. In particular:

• It may not finalize MPI immediately. Julia will wait until all MPI-related objects are garbage collected before finalizing MPI. As a result, Finalized() may return false after Finalize() has been called. See Finalizers for more details.

• It is optional: Init will automatically insert a hook to finalize MPI when Julia exits.

MPI.universe_sizeFunction
universe_size()
The total number of available slots, or nothing if it is not defined. This is determined by the MPI_UNIVERSE_SIZE attribute of COMM_WORLD.
This is typically dependent on the MPI implementation: for MPICH-based implementations, this is specified by the -usize argument. OpenMPI defines a default value based on the number of processes available.