Communicators
An MPI communicator specifies the communication context for a communication operation. In particular, it specifies the set of processes which share the context, and assigns each each process a unique rank (see MPI.Comm_rank) taking an integer value in 0:n-1, where n is the number of processes in the communicator (see MPI.Comm_size.
Types and enums
MPI.Comm — TypeMPI.CommAn MPI Communicator object.
Constants
MPI.COMM_WORLD — ConstantMPI.COMM_WORLDA communicator containing all processes with which the local rank can communicate at initialization. In a typical "static-process" model, this will be all processes.
MPI.COMM_SELF — ConstantMPI.COMM_SELFA communicator containing only the local process.
Functions
Operations
MPI.Comm_size — FunctionComm_size(comm::Comm)The number of processes involved in communicator.
See also
External links
MPI.Comm_rank — FunctionComm_rank(comm::Comm)The rank of the process in the particular communicator's group.
Returns an integer in the range 0:MPI.Comm_size()-1.
See also
External links
MPI.Comm_compare — FunctionComm_compare(comm1::Comm, comm2::Comm)::MPI.ComparisonCompare two communicators and their underlying groups, returning an element of the Comparison enum.
External links
MPI.Comm_group — FunctionComm_group(comm::Comm)Accesses the group associated with given communicator.
External links
MPI.Comm_remote_group — FunctionComm_remote_group(comm::Comm)Accesses the remote group associated with the given inter-communicator.
External links
Constructors
MPI.Comm_create — FunctionComm_create(comm::Comm, group::Group)Collectively creates a new communicator.
See also
MPI.Comm_create_groupfor the noncollective operation
External links
MPI.Comm_create_group — FunctionComm_create_group(comm::Comm, group::Group, tag::Integer)Noncollectively creates a new communicator.
See also
MPI.Comm_createfor the noncollective operation
External links
MPI.Comm_dup — FunctionMPI.Comm_get_parent — FunctionMPI.Comm_spawn — FunctionComm_spawn(command, argv::Vector{String}, nprocs::Integer, comm::Comm[, errors::Vector{Cint}]; kwargs...)External links
MPI.Comm_split — FunctionComm_split(comm::Comm, color::Union{Integer,Nothing}, key::Integer)Partition the communicator comm, one for each value of color, returning a new communicator. Within each group, the processes are ranked in the order of key, with ties broken by the order of comm.
color should be a non-negative integer, or nothing, in which case a null communicator is returned for that rank.
External links
MPI.Comm_split_type — FunctionComm_split_type(comm::Comm, split_type, key::Integer; kwargs...)Partitions the communicator comm based on split_type, returning a new communicator. Within each group, the processes are ranked in the order of key, with ties broken by the order of comm.
Currently only one split_type is provided:
MPI.COMM_TYPE_SHARED: splits the communicator into subcommunicators, each of which can create a shared memory region.
External links
MPI.Intercomm_merge — FunctionIntercomm_merge(intercomm::Comm, flag::Bool)External links
Miscellaneous
MPI.universe_size — Functionuniverse_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.
MPI.tag_ub — Functiontag_ub()The maximum value tag value for point-to-point operations.