MPI
A communicator with extra topological information that describes the typical
communication patterns among the processes.
This class is abstract, as topological information in MPI is provided either via
a Cartesian topology () or an arbitrary Graph
topology ().
Intracommunicators provide communication among a set of MPI processes.
Intracommunicators are the most commonly used form of communicator in MPI.
Each intracommunicator contains a set of processes, each of which is identified by its
"rank" within the communicator. The ranks are numbered 0 through Size-1.
Any process in the communicator can send a message to another process
within the communicator or receive a message from any other process in
the communicator. Intracommunicators also support a variety of collective operations
that involve all of the processes in the communicator. Most MPI communication occurs
within intracommunicators, with very few MPI programs requiring intercommunicators.
Provides communication among a set of MPI processes.
The communicator class abstracts a set of communicating processes in MPI.
Communicators are the most fundamental types in MPI, because they are the basis
of all inter-process communication. Each communicator provides a separate communication
space for a set of processes, so that the messages transmitted with one communicator
will not collide with messages transmitted with another communicator. As such, different
libraries and different tasks can all use MPI without colliding, so long as they are using
different communicators. There are two important kinds of communicators: intracommunicators
and intercommunicators.
s are the most commonly used form of communicator.
Each intracommunicator contains a set of processes, each of which is identified by its
"rank" within the communicator. The ranks are numbered 0 through -1.
Any process in the communicator can a message
to another process
within the communicator or a message from any other process in
the communicator. Intracommunicators also support a variety of collective operations
that involve all of the processes in the communicator. Most MPI communication occurs
within intracommunicators, with very few MPI programs requiring intercommunicators.
s differ from intracommunicators in that intercommunicators
contain two disjoint groups of processes, call them A and B. Any process in group A can send
a message to or receive a message from any process in group B, and vice-versa. However, there
is no way to use an intercommunicator to send messages among the processes within a group.
Intercommunicators are often useful in large MPI applications that tie together many, smaller
modules. Typically, each module will have its own intracommunicators and the modules will
interact with each other via intercommunicators.
Communicators can only be constructed from other communicators or adopted
from low-level communicators.
Adopts a low-level MPI communicator that was created with any of the low-level MPI facilities.
The resulting Communicator object will manage the lifetime of the low-level MPI communicator,
and will free the communicator when it is disposed or finalized.
This constructor should only be used in rare cases where the program
is creating MPI communicators through the low-level MPI interface.
Attaches this communicator to the low-level MPI communicator in comm,
setting up the shadow communicator and error handlers as appopriate.
Finalizer that frees the MPI communicator.
Free the MPI communicator.
Creates a new communicator containing all of the processes in the given group.
The resulting communicator may be null, if the calling process is not in this group.
The group of processes that will be contained in the resulting communicator.
This must be a subgroup of .
Clones the communicator, creating a new (but distinct) communicator with the
same processes. The attributes associated with the communicator are copied
to the new communicator; which attributes are copied (and how) is dependent
on how the s were created.
Splits a communicator into several different communicators, each of which is identified
by a particular color value.
This is a collective operation, where each process may provide a different
and . Each distinct color value will
correspond to a new communicator, which contains all processes that provided that
specific color. The ranks of the processes in the resulting communicators will be
determined by the key value, with the lower ranks in the communicator assigned to
the processes providing the smaller key values; ties are broken based on the ranks of
the processes in the original communicator.
A non-negative color value, designating which new communicator the calling process
will belong two. All processes that provide the same color will be a part of the
same resulting communicator.
A value that determines how processes with the same color are ranked in the resulting
communicator. Smaller keys correspond to lower ranks, with ties broken by the ranks of
the processes in the original communicator.
The communicator that the calling process is in, corresponding to its color value.
Terminates all processes in this communicator. In most systems, this terminates all processes.
An error code that will be returned to the invoking environment.
The "world" communicator contains all of the processes that were
originally created by MPI.
Use the "world" communicator to determine
how many processes the user started for your MPI job, and as the
basis for creating the other communicators in your program. Many
simple programs will use only the "world" communicator.
The "self" communicator is a simple communicator that contains only
the currently-executing process.
Each process will have a different "self" communicator, which only
permits communication with itself.
Compare two MPI communicators.
Value
Description
-
The two Communicator objects represent the same communicator.
-
The two Communicator objects contain the same processes with the same ranks,
but represent different communicators.
-
The two Communicator objects contain the same processes, but with different ranks.
-
The two Communicator objects are different.
Send a message to a particular processor.
The basic Send operation will block until this message data has been transferred from value.
This might mean that the Send operation will return immediately, before the receiver has actually received
the data. However, it is also possible that Send won't return until it matches a
operation. Thus, the parameter should not be equal to , because a send-to-self
operation might never complete.
The type of the value to be sent. This type must be serializable.
The value that will be transmitted with the message.
The rank of the process that will receive this message. This must be a value in
[0, Size-1), but it should not be equal to .
A message "tag" that identifies this particular kind of message. The receive must use the same message tag to receive this message.
Simultaneously send and receive a value from another process.
Any serializable type.
The value to be sent.
The rank of the process the data will be sent to and received from.
A message "tag" that identifies this particular kind of message.
The value to be received.
Simultaneously send and receive a value from another process.
Any serializable type.
The value to be sent.
The rank of the process the data will be sent to.
A message "tag" that identifies the particular kind of message being sent.
The rank of the process the data will received from.
A message "tag" that identifies the particular kind of message being received.
The value to be received.
Simultaneously send and receive a value from another process (which need not be the same).
Any serializable type.
The value to be sent.
The rank of the process the data will be sent to.
A message "tag" that identifies the particular kind of message being sent.
The rank of the process the data will received from.
A message "tag" that identifies the particular kind of message being received.
The value to be received.
Receives information about the completed receive operation.
Simultaneously send and receive an array of values from another process.
Any serializable type.
The values to be sent.
The rank of the process the data will be sent to and received from.
A message "tag" that identifies the particular kind of message being sent and received.
An array in which to store the values to be received. The array must be large enough to contain the received data.
Simultaneously send and receive an array of values from another process.
Any serializable type.
The values to be sent.
The rank of the process the data will be sent to.
A message "tag" that identifies the particular kind of message being sent.
The rank of the process the data will received from.
A message "tag" that identifies the particular kind of message being received.
An array in which to store the values to be received. The array must be large enough to contain the received data.
Simultaneously send and receive an array of values from another process.
Any serializable type.
The values to be sent.
The rank of the process the data will be sent to.
A message "tag" that identifies the particular kind of message being sent.
The rank of the process the data will received from.
A message "tag" that identifies the particular kind of message being received.
An array in which to store the values to be received. The array must be large enough to contain the received data.
Receives information about the completed receive operation.
Receive a message from another process. The Receive operation is a blocking operation that will
not complete until it has completely received a message.
The type of the value that will be received. This type must be serializable.
The process that sent (or that will send) the message. This must be a value in
[0, Size-1), but it should not be equal to .
Alternatively, this might have the special value , if the message can be
received from any other process in this communicator.
A message "tag" that identifies this particular kind of message. Only messages sent with this tag
will be received by this call. The special value permits messages sent with
any tag value to be received.
The value received.
Receive a message from another process. The Receive operation is a blocking operation that will
not complete until it has completely received a message.
The type of the value that will be received. This type must be serializable.
The process that sent (or that will send) the message. This must be a value in
[0, Size-1), but it should not be equal to .
Alternatively, this might have the special value , if the message can be
received from any other process in this communicator.
A message "tag" that identifies this particular kind of message. Only messages sent with this tag
will be received by this call. The special value permits messages sent with
any tag value to be received.
When Receive completes, this parameter will contain the value
transmitted as part of the message.
Receive a message from another process. The Receive operation is a blocking operation that will
not complete until it has completely received a message.
The type of the value that will be received. This type must be serializable.
The process that sent (or that will send) the message. This must be a value in
[0, Size-1), but it should not be equal to .
Alternatively, this might have the special value , if the message can be
received from any other process in this communicator.
A message "tag" that identifies this particular kind of message. Only messages sent with this tag
will be received by this call. The special value permits messages sent with
any tag value to be received.
When Receive completes, this parameter will contain the value
transmitted as part of the message.
Receives information about the completed receive operation.
Send a message to a particular processor.
The basic Send operation will block until this message data has been transferred from values.
This might mean that the Send operation will return immediately, before the receiver has actually received
the data. However, it is also possible that Send won't return until it matches a
operation. Thus, the parameter should not be equal to , because a send-to-self
operation might never complete.
The type of the value to be sent. This type must be serializable.
The values that will be transmitted with the message.
The rank of the process that will receive this message. This must be a value in
[0, Size-1), but it should not be equal to .
A message "tag" that identifies this particular kind of message. The receive must use the same message tag to receive this message.
Receive a message containing an array of values from another process.
Important: if the type T is a value type (e.g., a primitive type or a struct of primitive types), then
the array must be pre-allocated with enough storage to store all of the
values that will be received. If the message contains more data than can be received into the
array, this method will throw a or, in some cases, crash.
Providing an array that is longer than the received message is allowable; to determine the actual
amount of data received, use .
Note that this restriction does not apply when T is a reference type that is serialized.
The Receive operation is a blocking operation, that will not complete until it has
completely received a message.
The type of the value that will be received. This type must be serializable.
The process that sent (or that will send) the message. This must be a value in
[0, Size-1), but it should not be equal to .
Alternatively, this might have the special value , if the message can be
received from any other process in this communicator.
A message "tag" that identifies this particular kind of message. Only messages sent with this tag
will be received by this call. The special value permits messages sent with
any tag value to be received.
When Receive completes, this parameter will contain the values
transmitted as part of the message. The array
must be large enough to contain all of the values that will be received.
Receive an array from another process.
Important: if the type T is a value type (e.g., a primitive type or a struct of primitive types), then
the array must be pre-allocated with enough storage to store all of the
values that will be received. If the message contains more data than can be received into the
array, this method will throw a or, in some cases, crash.
Providing an array that is longer than the received message is allowable; to determine the actual
amount of data received, retrieve the message length from the result.
Note that this restriction does not apply when T is a reference type that is serialized.
The Receive operation is a blocking operation, that will not complete until it has
completely received a message.
The type of the value that will be received. This type must be serializable.
The process that sent (or that will send) the message. This must be a value in
[0, Size-1), but it should not be equal to .
Alternatively, this might have the special value , if the message can be
received from any other process in this communicator.
A message "tag" that identifies this particular kind of message. Only messages sent with this tag
will be received by this call. The special value permits messages sent with
any tag value to be received.
When Receive completes, this parameter will contain the values
transmitted as part of the message. The array
must be large enough to contain all of the values that will be received.
Contains information about the received message.
Non-blocking send of a single value. This routine will initiate communication and
then return immediately with a object that can be used to
query the status of the communication.
Any serializable type.
The value that will be transmitted.
The rank of the destination process.
The tag used to identify this message.
A new request object that can be used to manipulate this non-blocking
communication.
Non-blocking send of an array of data. This routine will initiate communication and
then return immediately with a object that can be used to
query the status of the communication.
Any serializable type.
The array of values that will be transmitted. If T is a value type,
do not change the values in this array before the resulting request has been
completed, because the implementation may send these values at any time.
The rank of the destination process.
The tag used to identify this message.
A new request object that can be used to manipulate this non-blocking
communication.
Non-blocking receive of a single value. This routine will initiate a request to receive
data and then return immediately. The data may be received in the background. To test for
or force the completion of the communication, then access the received data, use the
returned object.
Any serializable type.
Rank of the source process to receive data from. Alternatively, use to
receive a message from any other process.
The tag that identifies the message to be received. Alternatively, use
to receive a message with any tag.
A request object that allows one to test or force the completion of this receive request,
and retrieve the resulting value.
Non-blocking receive of an array of values. This routine will initiate a request to receive
data and then return immediately. The data may be received in the background. To test for
or force the completion of the communication, then access the received data, use the
returned object.
Important: if the type T is a value type (e.g., a primitive type or a struct of primitive types), then
the array must be pre-allocated with enough storage to store all of the
values that will be received. If the message contains more data than can be received into the
array, this method will throw a or, in some cases, crash.
Providing an array that is longer than the received message is allowable; to determine the actual
amount of data received, retrieve the message length from the
structure provided when the request is completed.
Any serializable type.
Rank of the source process to receive data from. Alternatively, use to
receive a message from any other process.
The tag that identifies the message to be received. Alternatively, use
to receive a message with any tag.
An array into which the values will be received. This array must be large enough to
accommodate all of the data sent by the source process.
A request object that allows one to test or force the completion of this receive request,
and retrieve the resulting value. The object retrieved from the request object will be
.
Wait for a message from the given source and with the specified tag to become
available, but don't try to receive the message. This routine will wait indefinitely
for a message meeting the given criteria to arrive, so it should only be invoked
when you know a message is coming. If you just want to check whether a message is
available use .
The process that sent (or that will send) the message. This must be a value in
[0, Size-1), or the special value . If it is
, then we can match a message sent by any other process in
this communicator.
A message "tag" that identifies this particular kind of message. Only messages sent with this tag
will be matched by this call. The special value permits messages sent with
any tag value to be received.
A object containing information about the message.
Determine whether a message from the given source and with the specified tag is
available, but don't try to receive the message. This routine will return
immediately, regardless of whether a message is available, so it is useful for
polling to determine whether any messages need to be handled at this time. If
your program can't do any work until a message arrives (and the message is
guaranteed to arrive, eventually), use instead.
The process that sent (or that will send) the message. This must be a value in
[0, Size-1), or the special value . If it is
, then we can match a message sent by any other process in
this communicator.
A message "tag" that identifies this particular kind of message. Only messages sent with this tag
will be matched by this call. The special value permits messages sent with
any tag value to be received.
If a message is available, a object containing information about that message.
Otherwise, returns null.
Wait until all processes in the communicator have reached the same barrier.
This collective operation should be called by all processes within the communicator.
Each process will wait within the barrier until all processes have entered the barrier,
at which point all of the processes will be released. Use barriers when all of the
processes need to synchronize at some particular point in your program flow.
Barriers are often used after each process has completed some large, independent
chunk of work:
public void Superstep(Communicator comm)
{
// Perform a large chunk of work locally
DoLocalWork();
// Synchronize with everyone else
comm.Barrier();
// Okay, move on to the next piece of work.
}
Broadcast a value from the process to all other processes.
Any serializable type.
Whether this is the root process or not.
The value to be broadcast. At the process, this value is
read (but not written); at all other processes, this value will be replaced with
the value at the root.
The rank of the process that is broadcasting the value out to
all of the non- processes.
Broadcast an array from the process to all other processes.
Any serializable type.
Whether this is the root process.
The array of values to be broadcast. At the process, this value is
read (but not written); at all other processes, this value will be replaced with
the value at the root. Note that the receiving processes must already have allocated
enough space in the array to receive data from the root, prior to calling Broadcast.
The rank of the process that is broadcasting the values out to
all of the non- processes.
Gather the values from each process into an array of values at the
process. This version of Gather does not distinguish
between Intra- and Intercommunicators, and should be used as a base for Gather
in derived communicators.
Any serializable type.
Whether this process is root (== root for Intracommunicators, or
==Intercommunicator.Root for Intercommunicators).
The number of processes from which the root will collect information.
The value contributed by this process.
The rank of the process that will receive values for all of the
processes in the communicator.
An array that will store the values contributed by each process.
This value is only significant at the , and
can be omitted by non-root processes.
Supply this argument when you have pre-allocated space for the resulting array.
This is an internal implementation of the GatherFlattened methods, designed to be called by derived classes.
Any serializable type.
Whether this process is the root process.
The number of processes to gather from.
The values contributed by this process, if any.
The number of elements to be gathered from each process. This parameter is only significant at the root process.
The rank of the root process.
An array to store the gathered values in. Can be, but does not have to be, preallocated.
Reduce is a collective algorithm that combines the values stored by each process into a
single value available at the designated process. The values are combined
in a user-defined way, specified via a delegate. If value1, value2, ..., valueN
are the values provided by the N processes in the communicator, the result will be the value
value1 op value2 op ... op valueN. This result is only
available to the process. If all processes need the result of the reduction,
use .
This example computes the sum of the ranks of all of the processes using
.
using System;
using MPI;
class Reduce
{
static void Main(string[] args)
{
using (MPI.Environment env = new MPI.Environment(ref args))
{
Communicator world = Communicator.world;
int root = 0;
if (world.Rank == root)
{
int sum;
world.Reduce(world.Rank, out sum, Operation<int>.Add, root);
System.Console.WriteLine("Sum of ranks = " + sum);
}
else
{
world.Reduce(world.Rank, Operation<int>.Add, root);
}
}
}
};
Any serializable type.
Whether this process is the root process.
The number of items that will be collected.
The local value that will be combined with the values provided by other processes.
The operation used to combine two values. This operation must be associative.
The rank of the process that is the root of the reduction operation, which will receive the result
of the reduction operation in its argument.
On the root, returns the result of the reduction operation. The other processes receive a default value.
The set of attributes attached to this communicator.
The low-level MPI communicator handle.
Secondary low-level MPI communicator that will be used for communication of
data within MPI.NET, such as collectives implemented over point-to-point or
the data message associated with a Send of serialized data.
Tag allocator used to allocate tags for collective operations and serialized
send operations.
Special value for the source argument to Receive that
indicates that the message can be received from any process in the communicator.
Special value for the tag argument to Receive that
indices that the message with any tag can be received by the receive operation.
Convert an array of integers to an array of booleans. Used for some low-level calls
that return an array of logical ints to express boolean values.
An array to convert.
An array of bools corresponding to the logical values in the input array.
Convert an array of booleans to an array of integers. Used for some low-level calls
that require an array of logical ints to express boolean values.
An array to convert.
An array of ints with values of 0 and/or 1 corresponding to the values in the input array.
Returns the number of processes within this communicator.
All of the processes within this communicator will have the same
value for Size.
Returns the rank of the currently executing process within this
communicator.
The rank is a number between 0 and Size-1 that is used
to identify this process, e.g., to send messages to it. The value of
Rank will differ from one process to the next.
Retrieve the group containing all of the processes in this communicator.
Intracommunicators can only be constructed from other communicators or adopted
from low-level intracommunicators.
Adopts a low-level MPI intercommunicator that was created with any of the low-level MPI facilities.
The resulting Intercommunicator object will manage the lifetime of the low-level MPI intercommunicator,
and will call when it is disposed or finalized.
This constructor should only be used in rare cases where the program
is manipulating MPI intercommunicators through the low-level MPI interface.
Gathers invididual values provided by each processor into an array of values in which the
ith element of the array corresponds to the value provided by the processor with rank i.
The resulting array of values is available to all of the processors.
Any serializable type.
The value supplied by this processor, which will be placed into the element with index
in the returned array.
An array of values, where the ith value in the array is a copy of the
argument provided by the processor with rank i.
Gathers invididual values provided by each processor into an array of values in which the
ith element of the array corresponds to the value provided by the processor with rank i.
The resulting array of values is available
Any serializable type.
The value supplied by this processor, which will be placed into the element with index
in the returned array.
An array of values, where the ith value in the array is a copy of the
argument provided by the processor with rank i.
Supply this argument when you have pre-allocated space for the resulting array.
Gathers invididual values provided by each processor into an array of values.
Any serializable type.
The values supplied by this processor.
The number of items to be received by each process.
Gathers invididual values provided by each processor into an array of values.
Any serializable type.
The values supplied by this processor.
The numbers of items to be received by each process.
Gathers invididual values provided by each processor into an array of values.
Any serializable type.
The values supplied by this processor.
The number of items to be received by each process.
An array of values supplied by all processes. Supply this argument when
you have pre-allocated space for the resulting array.
Gathers invididual values provided by each processor into an array of values.
Any serializable type.
The values supplied by this processor.
The numbers of items to be received by each process.
An array of values supplied by all processes. Supply this argument when
you have pre-allocated space for the resulting array.
Allreduce is a collective algorithm that combines the values stored by each process into a
single value available to all processes. The values are combined in a user-defined way, specified via
a delegate. If value1, value2, ..., valueN are the values provided by the
N processes in the communicator, the result will be the value value1 op value2 op ... op valueN.
An Allreduce is equivalent to a
followed by a .
This example computes the sum of the ranks of all of the processes using
.
using System;
using MPI;
class Allreduce
{
static void Main(string[] args)
{
using (MPI.Environment env = new MPI.Environment(ref args))
{
Communicator world = Communicator.world;
int sum = world.Allreduce(world.Rank, Operation<int>.Add);
System.Console.WriteLine("Sum of ranks = " + sum);
}
}
};
Any serializable type.
The local value that will be combined with the values provided by other processes.
The operation used to combine two values. This operation must be associative.
The result of the reduction. The same value will be returned to all processes.
Allreduce is a collective algorithm that combines the values stored by each process into a
single value available to all processes. The values are combined in a user-defined way, specified via
a delegate. When provided with arrays, Allreduce combines the ith value of each of the arrays
passed to each process. Thus, Allreduce on arrays is the same as calling
for each inValues[i].
An Allreduce is equivalent to a
followed by a .
Any serializable type.
The local values that will be combined with the values provided by other processes.
The operation used to combine two values. This operation must be associative.
The values that result from combining all of the values in
element-by-element. If needed, this array will be resized to the same size as .
Allreduce is a collective algorithm that combines the values stored by each process into a
single value available to all processes. The values are combined in a user-defined way, specified via
a delegate. When provided with arrays, Allreduce combines the ith value of each of the arrays
passed to each process. Thus, Allreduce on arrays is the same as calling
for each inValues[i].
An Allreduce is equivalent to a
followed by a .
Any serializable type.
The local values that will be combined with the values provided by other processes.
The operation used to combine two values. This operation must be associative.
The values that result from combining all of the values in
element-by-element. If needed, this array will be resized to the same size as .
Supply this argument when you have pre-allocated space for the resulting array.
Collective operation in which every process sends data to every other process. Alltoall
differs from in that a given process can send different
data to all of the other processes, rather than contributing the same piece of data to all
processes.
Any serializable type.
The array of values that will be sent to each process. The ith value in this array
will be sent to the process with rank i.
An array of values received from all of the other processes. The jth value in this
array will be the value sent to the calling process from the process with rank j.
Collective operation in which every process sends data to every other process. Alltoall
differs from in that a given process can send different
data to all of the other processes, rather than contributing the same piece of data to all
processes.
Any serializable type.
The array of values that will be sent to each process. The ith value in this array
will be sent to the process with rank i.
The array of values received from all of the other processes. The jth value in this
array will be the value sent to the calling process from the process with rank j.
Supply this argument when you have pre-allocated space for the resulting array.
Collective operation in which every process sends data to every other process. Alltoall
differs from in that a given process can send different
data to all of the other processes, rather than contributing the same piece of data to all
processes.
Any serializable type.
The array of values that will be sent to each process. sendCounts[i] worth of data will
be sent to process i.
The number of items to be sent and received by each process.
Collective operation in which every process sends data to every other process. Alltoall
differs from in that a given process can send different
data to all of the other processes, rather than contributing the same piece of data to all
processes.
Any serializable type.
The array of values that will be sent to each process. sendCounts[i] worth of data will
be sent to process i.
The number of items to be sent and received by each process.
The array of values received from all of the other processes.
Collective operation in which every process sends data to every other process. Alltoall
differs from in that a given process can send different
data to all of the other processes, rather than contributing the same piece of data to all
processes.
Any serializable type.
The array of values that will be sent to each process. sendCounts[i] worth of data will
be sent to process i.
The numbers of items to be sent to each process.
The numbers of items to be received by each process.
Collective operation in which every process sends data to every other process. Alltoall
differs from in that a given process can send different
data to all of the other processes, rather than contributing the same piece of data to all
processes.
Any serializable type.
The array of values that will be sent to each process. sendCounts[i] worth of data will
be sent to process i.
The numbers of items to be sent to each process.
The numbers of items to be received by each process.
The array of values received from all of the other processes.
Broadcast a value from the process to all other processes.
Any serializable type.
The value to be broadcast. At the process, this value is
read (but not written); at all other processes, this value will be replaced with
the value at the root.
The rank of the process that is broadcasting the value out to
all of the non- processes.
Broadcast an array from the process to all other processes.
Any serializable type.
The array of values to be broadcast. At the process, this value is
read (but not written); at all other processes, this value will be replaced with
the value at the root. Note that the receiving processes must already have allocated
enough space in the array to receive data from the root, prior to calling Broadcast.
The rank of the process that is broadcasting the values out to
all of the non- processes.
ExclusiveScan is a collective algorithm that performs partial reductions on data provided by
each process in the communicator. ExclusiveScan combines the values stored by each process into
partial results delivered to each process. The values are combined
in a user-defined way, specified via a delegate. If value1, value2, ..., valueN
are the values provided by the N processes in the communicator, the resulting value for the process with
rank P > 0 will be value1 op value2 op ... op valueP. The rank 0 process receives a default value.
ExclusiveScan is sometimes called an "exclusive" scan, because the result returned to each process
does not include the contribution of that process. For an "inclusive" scan (that does include the contribution
of the calling process in its result), use .
Note that the results provided by ExclusiveScan are the same as those provided by Scan, except that
with ExclusiveScan, the process with rank i will receive the result that rank i-1 would have received from
Scan, i.e., ExclusiveScan gives the same results but shifted to the right.
Any serializable type.
The value contributed by the calling process.
Operation used to combine two values from different processes.
This operation must be associative.
If the rank of the calling process is not zero, the value value1 op value2 op ... op valueP, where P
is the rank of the calling process. Otherwise, returns a default value.
ExclusiveScan is a collective algorithm that performs partial reductions on data provided by
each process in the communicator. ExclusiveScan combines the arrays stored by each process into
partial results delivered to each process. The values are combined in a user-defined way, specified via
a delegate that will be applied elementwise to the values in the arrays. If array1, array2, ..., arrayN
are the values provided by the N processes in the communicator, the resulting value for the process with
rank P > 0 will be array1 op array2 op ... op arrayP. The rank 0 process receives a null array.
ExclusiveScan is sometimes called an "exclusive" scan, because the result returned to each process
does not include the contribution of that process. For an "inclusive" scan (that does include the contribution
of the calling process in its result), use .
Note that the results provided by ExclusiveScan are the same as those provided by Scan, except that
with ExclusiveScan, the process with rank i will receive the result that rank i-1 would have received from
Scan, i.e., ExclusiveScan gives the same results but shifted to the right.
Any serializable type.
The values contributed by the calling process. The lengths of the arrays provided by all of the
processes must be the same.
Operation used to combine two values from different processes.
This operation must be associative.
If the rank of the calling process is not zero, the value array1 op array2 op ... op arrayP, where P
is the rank of the calling process. Otherwise, returns a null array.
ExclusiveScan is a collective algorithm that performs partial reductions on data provided by
each process in the communicator. ExclusiveScan combines the arrays stored by each process into
partial results delivered to each process. The values are combined in a user-defined way, specified via
a delegate that will be applied elementwise to the values in the arrays. If array1, array2, ..., arrayN
are the values provided by the N processes in the communicator, the resulting value for the process with
rank P > 0 will be array1 op array2 op ... op arrayP. The rank 0 process receives a null array.
ExclusiveScan is sometimes called an "exclusive" scan, because the result returned to each process
does not include the contribution of that process. For an "inclusive" scan (that does include the contribution
of the calling process in its result), use .
Note that the results provided by ExclusiveScan are the same as those provided by Scan, except that
with ExclusiveScan, the process with rank i will receive the result that rank i-1 would have received from
Scan, i.e., ExclusiveScan gives the same results but shifted to the right.
Any serializable type.
The values contributed by the calling process. The lengths of the arrays provided by all of the
processes must be the same.
Operation used to combine two values from different processes.
This operation must be associative.
If the rank of the calling process is not zero, this will receive the value array1 op array2 op ... op arrayP, where P
is the rank of the calling process. Otherwise, this value will be replaced with null.
Gather the values from each process into an array of values at the
process. On the root process, the pth element of the result
will be equal to the parameter of the process
with rank p when this routine returns.
This example demonstrates the use of Gather to gather the ranks of
all processes together at root 0.
using System;
using MPI;
class Gather
{
static void Main(string[] args)
{
using (MPI.Environment env = new MPI.Environment(ref args))
{
Intracommunicator world = Communicator.world;
if (world.Rank == 0)
{
int[] ranks = world.Gather(world.Rank, 0);
System.Console.Write("Ranks of all of the processes:");
for (int i = 0; i < ranks.Length; ++i)
System.Console.Write(" " + i);
System.Console.WriteLine();
}
else
{
world.Gather(world.Rank, 0);
}
}
}
}
Any serializable type.
The value contributed by this process.
The rank of the process that will receive values for all of the
processes in the communicator.
At the root, an array containing the s supplied by each of the processes
in the communicator. All other processes receive null.
Gather the values from each process into an array of values at the
process. On the root process, outValues[p]
will be equal to the parameter of the process
with rank p when this routine returns. Use this variant of the routine
when you want to pre-allocate storage for the array.
This example demonstrates the use of Gather to gather the ranks of
all processes together at root 0.
using System;
using MPI;
class Gather
{
static void Main(string[] args)
{
using (MPI.Environment env = new MPI.Environment(ref args))
{
Intracommunicator world = Communicator.world;
if (world.Rank == 0)
{
int[] ranks = new int[world.Size];
world.Gather(world.Rank, 0, ref ranks);
System.Console.Write("Ranks of all of the processes:");
for (int i = 0; i < ranks.Length; ++i)
System.Console.Write(" " + i);
System.Console.WriteLine();
}
else
{
world.Gather(world.Rank, 0);
}
}
}
}
Any serializable type.
The value contributed by this process.
The rank of the process that will receive values for all of the
processes in the communicator.
An array that will store the values contributed by each process.
This value is only significant at the , and
can be omitted by non-root processes.
Supply this argument when you have pre-allocated space for the resulting array.
Similar to but here all values are aggregated into one large array.
Any serializable type.
The values to be contributed by this process.
The rank of the root node.
The aggregated gathered values.
Similar to but here all values are aggregated into one large array.
In this variant, the number of elements contributed need not be identical for each process.
Any serializable type.
The values to be contributed by this process.
The number of elements contributed by each process.
The rank of the root node.
The aggregated gathered values.
Similar to but here all values are aggregated into one large array.
Any serializable type.
The values to be contributed by this process.
The rank of the root node.
The array to write the gathered values to; use this parameter when you have preallocated
space for the array.
The aggregated gathered values.
Similar to but here all values are aggregated into one large array.
Any serializable type.
The values to be contributed by this process.
The number of elements contributed by each process.
The rank of the root node.
The array to write the gathered values to; use this parameter when you have preallocated
space for the array.
The aggregated gathered values.
Reduce is a collective algorithm that combines the values stored by each process into a
single value available at the designated process. The values are combined
in a user-defined way, specified via a delegate. If value1, value2, ..., valueN
are the values provided by the N processes in the communicator, the result will be the value
value1 op value2 op ... op valueN. This result is only
available to the process. If all processes need the result of the reduction,
use .
This example computes the sum of the ranks of all of the processes using
.
using System;
using MPI;
class Reduce
{
static void Main(string[] args)
{
using (MPI.Environment env = new MPI.Environment(ref args))
{
Intracommunicator world = Communicator.world;
int root = 0;
if (world.Rank == root)
{
int sum;
world.Reduce(world.Rank, out sum, Operation<int>.Add, root);
System.Console.WriteLine("Sum of ranks = " + sum);
}
else
{
world.Reduce(world.Rank, Operation<int>.Add, root);
}
}
}
};
Any serializable type.
The local value that will be combined with the values provided by other processes.
The operation used to combine two values. This operation must be associative.
The rank of the process that is the root of the reduction operation, which will receive the result
of the reduction operation in its argument.
On the root, returns the result of the reduction operation. The other processes receive a default value.
Reduce is a collective algorithm that combines the values stored by each process into a
single value available at the designated process. This particular variant of
applies to each of the elements
of the provided arrays. Each process must provide arrays of the same length, and the values at each
array index are combined
in a user-defined way, specified via a delegate. If value1, value2, ..., valueN
are the ith values provided by the N processes in the communicator, the ith result will be the value
value1 op value2 op ... op valueN. The resulting array is only
available to the process. If all processes need the result of the reduction,
use .
Any serializable type.
The local values that will be combined with the values provided by other processes.
The operation used to combine two values. This operation must be associative.
The rank of the process that is the root of the reduction operation, which will receive the result
of the reduction operation in its argument.
The variable that will receive the results of the reduction operation. Only the
process will receive the actual result; all other processes will receive a default-initialized value.
When this collective operation returns, will be of the same length as
.
Reduce is a collective algorithm that combines the values stored by each process into a
single value available at the designated process. This particular variant of
applies to each of the elements
of the provided arrays. Each process must provide arrays of the same length, and the values at each
array index are combined
in a user-defined way, specified via a delegate. If value1, value2, ..., valueN
are the ith values provided by the N processes in the communicator, the ith result will be the value
value1 op value2 op ... op valueN. The resulting array is only
available to the process. If all processes need the result of the reduction,
use .
Any serializable type.
The local values that will be combined with the values provided by other processes.
The operation used to combine two values. This operation must be associative.
The rank of the process that is the root of the reduction operation, to which this routine will
return the result of the reduction operation.
On the root, an array that contains the result of elementwise reduction on the
arrays provided by each process. On all other processes, null.
A collective operation that first performs a reduction on the given
(see and then scatters
the results by sending some elements to each process. The reduction will be performed on
the entire array of (like the array form of
). Then, the array will
be scattered, with process i receiving [i] elements. The process
with rank 0 will receive the first counts[0] elements, the process with rank 1 will
receive the next counts[1] elements, and so on.
Any serializable type.
An array of values that will be reduced. The length of this array must equal to
sum of the counts in .
The operation used to combine the elements in .
This operation must be associative.
An array whose ith element states the number of elements from the reduced result
that will be returned to the process with rank i.
An array of length counts[Rank] containing the reduced results destined for
the calling process.
A collective operation that first performs a reduction on the given
(see and then scatters
the results by sending some elements to each process. The reduction will be performed on
the entire array of (like the array form of
). Then, the array will
be scattered, with process i receiving [i] elements. The process
with rank 0 will receive the first counts[0] elements, the process with rank 1 will
receive the next counts[1] elements, and so on.
Any serializable type.
An array of values that will be reduced. The length of this array must equal to
sum of the counts in .
The operation used to combine the elements in .
This operation must be associative.
An array whose ith element states the number of elements from the reduced result
that will be returned to the process with rank i.
An array of length counts[Rank] containing the reduced results destined for
the calling process.
Scan is a collective algorithm that performs partial reductions on data provided by
each process in the communicator. Scan combines the values stored by each process into
partial results delivered to each process. The values are combined
in a user-defined way, specified via a delegate. If value(0), value(1), ..., value(N-1)
are the values provided by the N processes in the communicator, the resulting value for the process with
rank P will be value(0) op value(1) op ... op value(P). The processor with rank N-1 will
receive the same result as if one had performed a
operation with root N-1.
Scan is sometimes called an "inclusive" scan, because the result returned to each process
includes the contribution of that process. For an "exclusive" scan (that does not include the contribution
of the calling process in its result), use .
Any serializable type.
The value contributed by the calling process.
Operation used to combine two values from different processes.
The value value(0) op value(1) op ... op value(Rank)
Scan is a collective algorithm that performs partial reductions on data provided by
each process in the communicator. Scan combines the arrays stored by each process into
partial results delivered to each process. The arrays are combined in a user-defined way,
specified via a delegate that will be applied elementwise to the values in each arrays.
If array(0), array(1), ..., array(N-1) are the arrays provided by the
N processes in the communicator, the resulting array for the process with
rank P will be array(0) op array(1) op ... op array(P). The processor with rank N-1 will
receive the same result as if one had performed a
operation with root N-1.
Scan is sometimes called an "inclusive" scan, because the result returned to each process
includes the contribution of that process. For an "exclusive" scan (that does not include the contribution
of the calling process in its result), use .
Any serializable type.
The array contributed by the calling process. The arrays provided by each process must
have the same length.
Operation used to combine two values from different processes.
The array array(0) op array(1) op ... op array(Rank)
Scan is a collective algorithm that performs partial reductions on data provided by
each process in the communicator. Scan combines the arrays stored by each process into
partial results delivered to each process. The arrays are combined in a user-defined way,
specified via a delegate that will be applied elementwise to the values in each arrays.
If array(0), array(1), ..., array(N-1) are the arrays provided by the
N processes in the communicator, the resulting array for the process with
rank P will be array(0) op array(1) op ... op array(P). The processor with rank N-1 will
receive the same result as if one had performed a
operation with root N-1.
Scan is sometimes called an "inclusive" scan, because the result returned to each process
includes the contribution of that process. For an "exclusive" scan (that does not include the contribution
of the calling process in its result), use .
Any serializable type.
The array contributed by the calling process. The arrays provided by each process must
have the same length.
Operation used to combine two values from different processes.
The array array(0) op array(1) op ... op array(Rank)
Scatters an array of values by sending the ith value of the array to processor i.
This variant of Scatter can only be called by the root process. Other processes
should call the non-root variant of .
Any serializable type.
An array of values of length , which is only significant at the root.
The ith value of this array (at the root process) will be sent to the ith processor.
The ith value of the array provided by the root process, where i is
the rank of the calling process.
Scatters an array of values by sending the ith value of the array to processor i.
This variant of Scatter can only be called by a non-root process. The root process
should either call the root-only variant of or the
general .
Any serializable type.
The ith value of the array provided by the root process, where i is
the rank of the calling process.
Scatters an array of values by sending the ith value of the array to processor i.
Any serializable type.
An array of values of length , which is only significant at the root.
The ith value of this array (at the root process) will be sent to the ith processor.
Rank of the "root" process, which will supply the array of values to be scattered.
The ith value of the array provided by the root process, where i is
the rank of the calling process.
Scatters an array of values by sending the ith value of the array to processor i.
Any serializable type.
Whether this process is root (== root for Intracommunicators, or
==Intercommunicator.Root for Intercommunicators).
An array of values of length , which is only significant at the root.
The ith value of this array (at the root process) will be sent to the ith processor.
Rank of the "root" process, which will supply the array of values to be scattered.
The ith value of the array provided by the root process, where i is
the rank of the calling process.
Scatter a one dimensional array to all processes, where multiple items are sent to each process.
(If the number of items to be sent is different, see
Any serializable type.
The array to be scattered. Only significant at the root.
The number of items to be received by each process. If T is a value type (primitive or
structure) count must be the same at each process (not just at the root). If T must
be serialized, count is ignored at processes other than the root.
The rank of the root process.
Scatter a one dimensional array to all processes, where the number of data items sent to
each process may differ.
Any serializable type.
The array to be scattered. Only significant at the root.
The number of items to be received by each process. If T must
be serialized (i.e. is not a value type), counts is ignored at processes other than the root.
The rank of the root process.
Scatter a one dimensional array to all processes, where multiple items are sent to each process.
(If the number of items to be sent is different, see
Any serializable type.
The array to be scattered. Only significant at the root.
The number of items to be received by each process. If T is a value type (primitive or
structure) count must be the same at each process (not just at the root). If T must
be serialized, count is ignored at processes other than the root.
The rank of the root process.
The array to write to at the receiving process. Does not have to be preallocated.
Scatter a one dimensional array to all processes, where the number of data items sent to
each process may differ.
Any serializable type.
The array to be scattered. Only significant at the root.
The number of items to be received by each process. If T must
be serialized (i.e. is not a value type), counts is ignored at processes other than the root.
The rank of the root process.
The array to write to at the receiving process. Does not have to be preallocated.
Retrieve the neighbors of another process.
The rank of the process to be queried.
The neighbors of the process.
The neighbors of the current process.
The number of edges in the communicator.
Allocates unique tags for the various point-to-point communications that are used within
the MPI.NET implementation but must remain hidden from the user. All of the routines
in the TagAllocator class are thread-safe when MPI is running in a mode that supports
multi-threading.
Initialize a new tag allocator
Allocate a new, unique tag for a single serialized send. The tag
must be returned via .
A new, unique tag for use with this serialized send.
Actual implementation of .
Returns a tag allocated via .
The tag to return.
Implementation of .
Tag value being returned.
The next unique tag that will be given out for a serialized send. This
value starts at zero and increases as more tags are requested.
Stack of send tags that have been returned out-of-order. We always
exhaust these tags first, before allocating a new send tag by increasing
.
A CartesianCommunicator is a form of whose
processes are arranged in a grid of arbitrary dimensions.
Each node in a CartesianCommunicator has
not only a rank but also coordinates indicating its place in an n-dimensional grid.
Grids may be specified as periodic (or not) in any dimension, allowing cylinder and
torus configurations as well as simple grids. Cartesian communicators are often used in
applications where the data is distributed across a logical grid of the processes. These
applications can become both simpler and more efficient due to the use of Cartesian
communicators, which provide the ability to translate between process coordinates and ranks
and can provide improved placement of MPI processes on the processing elements on the
parallel computer.
Suggests a size for each dimension for a Cartesian topology, given the number of nodes and dimensions.
The number of nodes in the grid.
The number of dimensions.
An array of size to store the suggested sizes. Nonzero entries will be
taken as given sizes.
Returns a recommended configuration for a new Cartesian grid.
The existing communicator.
The number of dimensions for the Cartesian grid.
An array of length indicating the size of the grid in each dimension.
A logical array of length indicating whether the grid is periodic in any given dimension.
The new rank of the calling process.
CartesianCommunicators can only be constructed from other communicators or adopted
from low-level Cartesian communicators.
Creates a .
An existing Intracommunicator from which to create the new communicator (e.g. ).
The number of dimensions for the Cartesian grid.
An array of length indicating the size of the grid in each dimension.
A logical array of length indicating whether the grid is periodic in any given dimension.
Logical indicating whether ranks may be reordered or not.
Construct a lower dimensional subgrid from an existing CartesianCommunicator.
Logical array with an entry for each dimension indicating whether a dimension
should be kept or dropped in the new communicator.
The new lower-dimensional communicator.
Initializes values for Property accessors.
Returns a process' rank given its coordinates in the CartesianCommunicator's grid.
An integer array specifying the processes' coordinates.
The processes' rank in the communicator.
Provides the coordinates in the communicator's grid of a process, given its rank.
The processes' rank in the communicator.
An array of ints giving the coordinates in each dimension.
Retrieve the neighbors of another process.
The rank of the process to be queried.
The neighbors of the process.
Finds the source and destination ranks necessary to shift data along the grid.
The dimension in which to shift.
The distance along the grid to shift. Positive values indicate upward shifts,
negative values downward shifts.
Will contain the rank of the source process.
Will contain the rank of the destination process.
The number of dimensions of the communicator.
The dimensions of the communicator.
The peridocity of the communicator in each dimension.
The coordinates in the communicator of the current process.
The size in each dimension of the Cartesian grid.
Whether the Cartesian grid is periodic in any given dimension.
The coordinates of the current process.
The number of edges in the communicator.
The neighbors of the current process.
The Group class provides the ability to manipulate sets of MPI processes.
Sentinel value used to indicate that a particular process is not part of a group.
A predefined group containing no processes.
Users cannot construct a Group directly. They typically will retrieve a group from
a communicator, from other groups, or, in rare cases, adopt one from the low-level
interface.
Adopts a low-level MPI group that was created with any of the low-level MPI facilities.
The resulting Group object will manage the lifetime of the low-level MPI group,
and will call when it is disposed or finalized.
This constructor should only be used in rare cases where the program
is manipulating MPI groups through the low-level MPI interface.
Finalizer that frees the MPI group.
Free the MPI group explicitly.
Constructs the union of two groups, containing those processes that are either in
or .
Constructs the intersection of two groups, containing those processes that are in
both and .
Constructs the difference of two groups, containing those processes that are in
but not .
Create a subset of this group that includes only the processes with the
given ranks.
Create a subset of this group that includes all of the processes in this
group except those identified by the given ranks.
Translates the ranks of processes in this group to the ranks of the same processes within a different group.
The rank values in this group that will be translated.
The group whose ranks we are translating to.
An integer array containing the ranks of the processes in that correspond to
the ranks of the same processes in this group. For processes that are in this group but not
, the resulting array will contain .
Compare two MPI groups.
Value
Description
-
The two Group objects represent the same group.
-
The two Group objects contain the same processes with the same ranks,
but represent different groups.
-
The two Group objects contain the same processes, but with different ranks.
-
The two Group objects are different.
The low-level MPI group handle.
The number of processes within this group.
The rank of the calling process within this group. This will be a value in [0, -1).
Enumeration describing how a given attribute should be copied
(or not) when the communicator is cloned (duplicated).
When the communicator is duplicated, this value is not copied.
For value types, small value types (less than the size of
a native pointer) will be kept in the low-level MPI communicator.
With larger value types, the low-level MPI communicator's
attribute will store a pointer to the value, which will be
automatically allocated and deallocated as appropriate. This
behavior can be used to interoperate with C MPI programs that
store attributes on the communicator.
When the communicator is duplicated, the new communicator will
hold a "shallow" copy of the underlying data, so that both
communicators reference the same value.
For value types smaller than a native pointer, the value will
be stored directly in the low-level communicator. This approach
can be used for interoperability with C MPI programs that store
primitive types or MPI handles directly in the attributes.
For object types and "large" value types, the value will be
stored on the (garbage-collected) heap. Copying entails
creating new references to the object.
When the communicator is duplicated, the new communicator will
contain a completely-new, distinct copy of the underlying data.
For value types, each low-level MPI communicator will store a
pointer to the data, which will be deallocated when the
MPI communicator is destroyed. This approach can be used for
interoperability with C MPI programs that store attributes as
pointers to primitives or structures.
For class types, MPI.NET will use the ICloneable interface
to clone objects for a deep copy.
Attributes are key/value pairs that can be attached to communicators,
and are generally used to maintain communicator-specific information
across different libraries or different languages.
Each instance
of the Attribute class is the "key" for a different kind of
data, and can be used to index the associated
with a communicator to query or modify the corresponding value. Each
attribute is created with the type of data its value will store (e.g.,
an integer, a string, an object) and a duplication policy, which
describes how a value of that type is propagated when communicators
are cloned.
Attributes can be used for interoperability with native code. Any
attribute whose type is a value type (e.g., primitive type or structure)
that has either deep-copy or no-copy semantics will be stored on the
low-level MPI communicator. These attributes can then be accessed by
native code directly via the low-level MPI interface.
Creates a new attribute. Users need to use the factory function .
Create a new attribute, which can be attached to MPI communicators.
The type of value that will be stored with the attribute.
Describes how (or if) an attribute is copied when a communicator
is cloned.
A new attribute whose value type is T. This attribute
can be attached to any communicator.
Dispose of this attribute.
This operation should not be performed until the attribute has
been deleted from all communicators.
Updates the object stored in with a new
, and returns the new stored value.
The stored value to update.
The new value.
The new value to store.
How this attribute will be transferred when a communicator
is cloned/duplicated (via ).
An attribute attached to the low-level communicator. This abstract class
only exists so that we can deal with the various different instantiations of
the class without having to know the
type T.
Construct a low-level attribute object.
Set this value's attribute to a particular value.
The communicator to modify.
The value to store.
Retrieve this attribute's value from a particular communicator.
The communicator to query.
The object stored in the communicator, if any.
Remove this attribute from a particular communicator.
The communicator storing the attribute.
Retrieve the value of this attribute in a communicator,
if it exists.
The communicator to query.
The value of this attribute in the communicator, if any.
Set the value of this attribute in a communicator.
The communicator to modify.
The new value.
Internal key value. This value will be the key value returned from
.
An attribute with value type T stored on the low-level communicator.
The type of value stored with the attribute.
Creates a new attribute that will be stored inside the low-level communicator.
How this attribute will be duplicated.
Whether this attribute will be allocated on the heap.
Copies an attribute value or pointer directly. This is the C# equivalent of MPI's
MPI_DUP_FN, which we don't have access to from within C#.
Makes a "deep" copy of an attribute that is referenced by a pointer.
Delete the memory associated with an attribute allocated on the heap.
Use as a parameter to
Free the low-level attribute associated with this attribute.
Whether the attribute's value is stored on the heap or not.
When the attribute is stored on the heap, a pointer to the
value is stored in the low-level communicator, and will be
freed when the attribute is deleted.
When the attribute is not stored on the heap, the value itself
will be placed into the communicator directly. The value
must not be larger than the size of an IntPtr.
A value-type attribute allocated with shallow copy semantics. These attributes
are stored as (boxed) objects in the . When we update
their values, we copy those values directly into the object, rather than
creating a new object, so we achieve shallow semantics.
The value type of the attribute.
Contains the attributes attached to a communicator.
Each communicator
can contain key/value pairs with extra information about the communicator
that can be queried from other languages and compilers. The keys in the
attribute set are instances of the class, each of
which will be associated with a specific type of value. The values associated
with any attribute can be added, modified, queried, or removed for a
particular communicator.
When a communicator is cloned, the attributes are copied to the new
communicator. When creating an , decide whether
not to copy the attribute (),
to copy only a reference to the attribute (),
or make a clone of the attribute ().
Remove the given attribute from this communicator. If not such attribute exists,
the communicator will not be changed and no exception will be thrown.
The attribute to remove.
Copies the attributes from the communicator being duplicated to
this attribute set (which is associated with the new communicator).
The attributes from the communicator being duplicated.
The low-level MPI communicator with which this attribute
set is associated.
Extra attributes not stored within the low-level MPI communicator.
Access or modify the value associated with the given attribute.
The attribute key.
The value associated with the given attribute,
or null if the attribute hasn't been set for this
communicator.
A stream object that is backed by unmanaged memory. The behavior of UnmanagedMemoryStream is similar to
that of the .NET , because it manages memory internally and will re-allocate
its internal buffers as necessary to accommodate additional writes (the latter is not supported by
). The memory used by this class is allocated either via MPI's
memory allocation routines (the default) or the class's
unmanaged memory allocation routines.
Create a new, empty unmanaged memory stream. The memory stream can be resized by
setting , calling , or writing to
the stream.
Create a new, empty unmanaged memory stream. The memory stream can be resized by
setting , calling , or writing to
the stream.
Whether this stream should first try to allocate its memory from MPI. If
MPI cannot provide memory, or if this parameter is false, memory
will be allocated from the unmanaged heap.
Create a new unmanaged memory stream with storage for a certain number of bytes of
data. The length of the stream will be set to , but the
contents of the stream after initialization are undefined.
The number of bytes in the new stream.
Create a new unmanaged memory stream with storage for a certain number of bytes of
data. The length of the stream will be set to , but the
contents of the stream after initialization are undefined.
The number of bytes in the new stream.
Whether this stream should first try to allocate its memory from MPI. If
MPI cannot provide memory, or if this parameter is false, memory
will be allocated from the unmanaged heap.
"Flush" the contents of the stream. This operation does nothing.
Read bytes from the current position in the stream, and place
them into the starting at the given .
The position will be updated to the point after the last byte read.
Array that will receive the data read from the stream.
The position in the buffer where the first byte will be written.
The maximum number of bytes to copy into the buffer.
The actual number of bytes read into the buffer.
Seek to a specific position in the stream.
Offset (in bytes) from the .
Where to start seeking from.
The new position in the stream.
Set the length of the stream. If the new length of the stream
is larger than the old length, the contents of the stream from
the old length to the new length are undefined.
The new length.
Write data into unmanaged memory. If the write would continue past the
end of the memory stream, the memory stream is expanded.
The buffer containing the data to write.
The position in the buffer from which data should be read.
The number of bytes to write to the stream.
Reserve a certain amount of space in the buffer, to minimize the need for
reallocations if you already know how much space will be needed.
The number of bytes to reserve.
Deallocate any memory allocated by this stream and
dispose of the object.
Whether this call was the result of calling dispose (true)
or occurred in response to a finalizer (false).
Releases the memory associated with the stream, if any.
Allocates unmanaged memory. The memory will either return memory allocated from
MPI or from the unmanaged heap, depending on . Memory
allocated in this way should be freed via .
The number of bytes to allocate.
If true, this routine will first try to allocate the memory
via MPI's memory allocation routines (e.g. ),
then will fall back to C#'s unmanaged memory allocation routines.
This value will be updated to reflect where the memory actually came from.
A pointer to the newly-allocated memory.
Frees memory allocated via .
The pointer returned from .
Whether this memory came from MPI or from the unmaanged heap.
Whether memory comes from the MPI allocation routines by default.
A pointer to unmanaged storage.
True when the is storage obtained from MPI
via .
The number of bytes that refers to.
The number of bytes in the buffer.
Current position within the stream.
Whether the stream can be read from. Always true.
Whether one can seek in the stream. Always true.
Whether on can write to the stream. Always true.
The length of the stream, in bytes.
Reports or sets the position in the stream.
Retrieve a pointer to the unmanaged memory buffer. Since this
buffer is pointing into unmanaged memory, it does not need to be
pinned.
The amount of space in the unmanaged memory buffer. This can be
larger than the length of the stream. If you know how many bytes
will be written to the stream, you might want to set the capacity
(either via this property or through ) large
enough to avoid resizing the stream multiple times.
A request list contains a list of outstanding MPI requests.
The requests in a RequestList
are typically non-blocking send or receive operations (e.g.,
,
). The
request list provides the ability to operate on the set of MPI requests
as a whole, for example by waiting until all requests complete before
returning or testing whether any of the requests have completed.
Create a new, empty request list.
Add a new request to the request list.
The request to add.
Remove a request from the request list.
Request to remove.
Waits until any request has completed. That request will then be removed
from the request list and returned.
The completed request, which has been removed from the request list.
Determines whether any request has completed. If so, that request will be removed
from the request list and returned.
The first request that has completed, if any. Otherwise, returns null to
indicate that no request has completed.
Wait until all of the requests has completed before returning.
A list containing all of the completed requests.
Test whether all of the requests have completed. If all of the
requests have completed, the result is the list of requests.
Otherwise, the result is null.
Either the list of all completed requests, or null.
Wait for at least one request to complete, then return a list of
all of the requests that have completed at this point.
A list of all of the requests that have completed, which
will contain at least one element.
Return a list of all requests that have completed.
A list of all of the requests that have completed. If
no requests have completed, returns null.
The actual list of requests.
Retrieves the number of elements in this list of requests.
Direct, low-level interface to the system MPI library.
This low-level interface provides direct access to the unmanaged
MPI library provided by the system. It is by nature unsafe, and
should only be used by programmers experienced both in the use
of MPI from lower-level languages (e.g., C, Fortran) and with an
understanding of the interaction between managed and unmanaged
code, especially those issues that pertain to memory
pinning/unpinning.
A second use of the Unsafe class is purely for documentation reasons. Each member of the
Unsafe class corresponds to an entity in the standard, C MPI, and the documentation of each member
of Unsafe will point to the corresponding functionality within MPI.NET. Programmers already familiar
with the Message Passing Interface in C can use the Unsafe class as a reference to better understand
how to apply their knowledge of C MPI to MPI.NET programs.
Predefined communicator containing all of the MPI processes. See .
Predefined communicator containing only the calling process. See .
Predefined communicator representing "no communicator". In the higher-level interface, this
is represented by a null object.
A single character. There is no equivalent to this type in C# or .NET.
A single, signed character. This is equivalent to the sbyte type
in C# and the System.SByte type in .NET.
A single, unsigned character. There is no equivalent to this type in C# or .NET.
A single byte. This is equivalent to the byte type
in C# and the System.Byte type in .NET.
A single, wide character. The equivalent is char in C# and System.Char in .NET.
A signed short integer. This is equivalent to the short type in C# and
System.Int16 in .NET.
An unsigned short integer. This is equivalent to the ushort type in C# and
System.UInt16 in .NET.
A signed integer. This is equivalent to the int type in C# and
System.Int32 in .NET.
An unsigned integer. This is equivalent to the uint type in C# and
System.UInt32 in .NET.
A long signed integer. There is no equivalent in C# or .NET, because the 64-bit
integer in C# and .NET is mapped to .
A long unsigned integer. There is no equivalent in C# or .NET, because the 64-bit
unsigned integer in C# and .NET is mapped to .
A single-precision floating-point value. The equivalent is float in C#
and System.Single in .NET.
A double-precision floating-point value. The equivalent is double in C#
and System.Double in .NET.
An extended-precision floating-point value. There is no equivalent in C# or .NET.
A long long signed integer. The equivalent is long in C# and
System.Int64 in .NET. This is a synonym for .
A long long unsigned integer. The equivalent is ulong in C# and
System.UInt64 in .NET.
A long long signed integer. The equivalent is long in C# and
System.Int64 in .NET. This is a synonym for .
A special data type used to indicate data that has been packed with .
This type is only used by the lowest-level MPI operations. The .NET equivalent is the
type.
A special datatype value that indicates "no datatype".
Constant used in comparisons of MPI objects to denote that two objects are identical.
See .
Constant used in comparisons of MPI objects to denote that two objects are congruent,
meaning that the objects act the same way but are not identical.
See .
Constant used in comparisons of MPI objects to denote that two objects are similar,
but assign different ranks to each of the processes.
See .
Constant used in comparisons of MPI objects to denote that two objects are completely
different.
See .
Special value for the source or dest argument to any communication operation,
which indicates that the communication is a no-op. Not supported in MPI.NET.
Special value used for Intercommunicator collective operations which indicates the root
process for a collective operation.
An empty group containing no processes. See .
A constant used to indicate the "null" group of processes. Corresponds to a null .
A special info key used to indicate that no extra information is being
passed into a routine.
"Undefined" value used to identify when a rank is not a part of a group.
See .
A constant used to indicate whether a communicator has a Cartesian topology.
A constant used to indicate whether a communicator has a Graph topology.
Special key value that indicates an invalid key.
Special "null" copy function that indicates that an attribute should not be copied.
Special "null" deletion function that indicates that no delete function should
be called when an attribute is removed from a communicator.
Indicates that the MPI program is single-threaded. See .
Indicates that the MPI program is multi-threaded, but all MPI operations will be called
from the main thread. See .
Indicates that the MPI program is multi-threaded, but only one thread will call into MPI
at any given time. See .
Indicates that the MPI program is multi-threaded, and any thread can call into MPI
at any time. See .
Predefined attribute key that can be used to determine the maximum
tag value that users are allowed to provide to a communication
request.
See .
Predefined attribute key that can be used to determine the rank of
the host process associated with .
If there is no host, the result will be .
See .
Predefined attribute key that can be used to determine the rank of
the process than can perform I/O via the language-standard I/O
mechanism. If every process can provided language-standard I/O, the
resulting value will be ; if no process
can support language-standard I/O, the result will be
.
See .
Predefined attribute key that can be used to determine whether the
clocks (accessed via ) are synchronized
across all processes.
See .
The maximum length of the string returned by .
The maximum number of characters that can occur in an error string returned from
.
Error value indicating no error.
Error class indicating an invalid buffer pointer.
Error class indicating an invalid count argument.
Error class indicating an invalid data type argument.
Error class indicating an invalid tag argument.
Error class indicating an invalid communicator.
Error class indicating an invalid rank.
Error class indicating an invalid root.
Error class indicating that a message was truncated on receive.
Error class indicating an invalid group argument.
Error class indicating an invalid operation argument.
Error class indicating an invalid request argument.
Error class indicating an invalid topology for a communicator argument.
Error class indicating an invalid dimension argument (for cartesian communicators).
Error class indicating an invalid argument.
Error class indicating an error that is know, but not described by other MPI
error classes.
Error class indicating that an unkown error occurred.
Error class indicating that an internal error occurred in the MPI implementation.
Error class indicating that the actual error code is in the status argument.
Error class indicating that a request is still pending.
Error class indicating an invalid file handle argument.
Error class indicating that permission was denied when accessing a file.
Error class indicating that the amode argument passed to MPI_File_open is invalid.
Error class indicating an invalid file name.
Error class indicating that the file already exists.
Error class indicating that the file is already in use.
Error class indicating that there is not enough space for the file.
Error class indicating that no such file exists.
Error class indicating an I/O error.
Error class indicating that the file is read-only.
Error class indicating that an error occurred in a user-supplied data conversion function.
Error class indicating that conversion functions could not be registered because a conversion
function has already been registered for this data representation identifier.
Error class indicating that an unsupported data representation was passed to MPI_FILE_SET_VIEW.
Error class indicating an invalid info argument.
Error class indicating an invalid info key.
Error class indicating an invalid info value.
Error class indicating that the requested info key is not defined.
Error class indicating that an attempt has been made to look up a service
name that has not been published.
Error class indicating that no memory is available when trying to allocate
memory with MPI_Alloc_mem.
Error class indicating that a collective argument is not the same on all processes,
or collective routines were called in a different order.
Error class indicating that a named port does not exist or has been closed.
Error class indicating that the user's quota has been exceeded.
Error class indicating that an attempt to unpublish a service
name that has already been unpublished or never was published.
Error class indicating that an attempt to spawn a process has failed.
Error class indicating that an operation is unsupported.
Error class indicating an invalid window argument.
Error class indicating an invalid base argument.
Error class indicating an invalid locktype argument.
Error class indicating an invalid attribute key.
Error class indicating that there were conflicting accesses within a window.
Error class indicating that RMA calls were incorrectly synchronized.
Error class indicating an invalid size argument.
Error class indicating an invalid displacement argument.
Error class indicating an invalid assert argument.
The last valid error code for a predefined error class.
Predefined error handler that indicates that the MPI program should be terminated
if an error occurs. This is the default error handler in the low-level MPI, which
is overridden by MPI.NET.
Predefined error handler that indicates that the MPI routine that detected an error
should return an error code. MPI.NET uses this error handler to translate MPI
errors into program exceptions.
Predefined error handler that represents "no" error handler.
Predefined value for the "source" parameter to MPI receive or probe operations,
which indicates that a message from any process may be matched.
See .
Predefined value for the "tag" parameter to MPI receive or probe operations,
which indicates that a message with any tag may be matched.
See .
Compute the maximum value via an MPI reduction operation.
See .
Compute the minimum value via an MPI reduction operation.
See .
Compute the sum via an MPI reduction operation.
See
Compute the product via an MPI reduction operation.
See
Compute the logical AND via an MPI reduction operation.
See
Compute the bitwise AND via an MPI reduction operation.
See
Compute the logical OR via an MPI reduction operation.
See
Compute the bitwise OR via an MPI reduction operation.
See
Compute the logical exclusive OR via an MPI reduction operation.
There is no high-level operation corresponding to this predefined
MPI reduction.
Compute the bitwise exclusive OR via an MPI reduction operation.
See
Compute the minimum value and location of that value via
an MPI reduction operation. There is no high-level operation
corresponding to this predefined MPI reduction.
Compute the maximum value and location of that value via
an MPI reduction operation. There is no high-level operation
corresponding to this predefined MPI reduction.
Placeholder operation that indicates "no operation".
Constant that indicates a "null" MPI request, meaning that there is no such request.
A special marker used for the "buf" parameter to point-to-point operations
and some collectives that indicates that the derived datatype contains absolute
(rather than relative) addresses. The use of MPI_BOTTOM is not recommended.
This facility is unused in C# and .NET.
Constant used to indicate that the MPI_Status argument of an MPI
operation will be ignored.
Constant used to indicate that the array of MPI_Status arguments
to an MPI operation will be ignored.
Creates a new datatype from a contiguous block of values
of the same type. Not used by MPI.NET.
Creates a new datatype from a strided block of values of
the same type. Not used by MPI.NET.
Creates a new datatype from a strided block of values of
the same type. Not used by MPI.NET.
Creates a new datatype from discontiguous blocks of values
of the same type. Not used by MPI.NET.
Creates a new datatype from discontiguous blocks of values
of the same type. Not used by MPI.NET.
Creates a new datatype from a structure containing
discontiguous blocks of different types.
This is the most general type constructor, and is used by
the to
create MPI datatypes from .NET value types.
Packs (serializes) data into a byte buffer. This serialized representation can be transmitted via MPI
with the datatype and unpacked with . Serialization
in MPI.NET is automatic, so this routine is very rarely used.
Pointer to the input buffer, containing values with the MPI datatype
.
The number of values in .
The MPI datatype of the values in .
A pointer to the buffer of bytes into which we will be packing the serialized representation
of the data in .
The size (in bytes) of .
A pointer to the position (in bytes) into where the packed data
will be written. This position will be updated to the next available position in the buffer
once the serialized data has been written.
The communicator over which the packed data will be sent.
Unpacks (deserializes) data from a byte buffer. The serialized representation will have been
packed by and (possibly) transmitted via MPI using the datatype
. Serialization in MPI.NET is automatic, so this routine is very
rarely used.
A pointer to the buffer of bytes that will be unpacked.
The number of bytes in .
A pointer to the position (in bytes) inside the buffer from which data will be unpacked.
This position will be updated to reflect the position of the next value in the buffer
after the data has been unpacked.
A pointer to the buffer where the unpacked data will be written. This buffer contains
values whose MPI datatype is .
Number of values that will be stored into .
The type of data in .
The communicator for which the packing was performed (and which may have been used to transmit the
serialized data).
Determine the maximum amount of space that packing values with the
MPI datatype will require. This routine is useful for allocating
buffer space when packing data with .
The number of elements of type to be packed.
The type of data to be packed.
The communicator over which the packed data would be transmitted.
A pointer to an integer. This integer will receive the maximum number of bytes required to
pack the data. However, it is possible that when calling , fewer bytes
will be required to pack the actual data.
Converts a pointer into an address for use with MPI. In many cases, this operation is simply a
cast from the pointer's value to an integer.
A pointer to the memory whose address will be returned.
A pointer to the integer address value that will be replaced with the address pointed to
by .
Determines the extent of the datatype.
The datatype to query.
Receives the extent of .
Computes the size of a datatype.
The MPI datatype.
Pointer to an integer, which will be assigned the size of the data type (in bytes).
Completes creation of an MPI datatype. This routine will be called
automatically when the MPI datatype is being generated via reflection
in .
Frees an MPI datatype.
Determine the number of processes in a group. See .
Determine the rank of the calling process in a group. See .
Translate the ranks of processes in one group into those processes' corresponding
ranks in another group. See .
Compare two groups. See .
Retrieve the group associated with a communicator. See .
Create a group from the union of two groups. See .
Create a group from the intersection of two groups. See .
Create a group from the difference of two groups. See .
Create a subgroup containing the processes with specific ranks in an existing group.
See .
Create a subgroup containing all processes in existing group except those specified.
See .
Create a subgroup of processes in a group, based on a set of (first, last, stride) rank triples.
Note: this precise functionality is not exposed directly in the normal MPI layer; however, the
same semantics can be attained with .
Create a subgroup of processes containing all of the processes in the source group except those described
by one of th provided(first, last, stride) rank triples.
Note: this precise functionality is not exposed directly in the normal MPI layer; however, the
same semantics can be attained with .
Frees a group. This routine will be invoked automatically by
or the finalizer for .
Determines the number of processes in the communicator. See .
Determines the rank of the calling process in the communicator. See .
Compare two communicators. See .
Duplicates a communicator, creating a new communicator with the same processes and ranks
as the original. See .
Creates a new communicator from a subgroup of the processes in an existing communicator.
See .
The existing communicator, from which the new communicator will be created.
A group specifying zero or more processes in the communicator .
A pointer that points to the newly-created communicator, which will contain all of
the processes in the group. The order of the processes in this new communicator will
be the same as the order of those processes in the original communicator.
Splits a communicator into several new communicators, based on the colors provided.
See .
Creates a new Cartesian communicator from another
communicator. See .
Existing communicator from which the new communicator will be created.
Number of dimensions for Cartesian communicator's grid to have.
Array to specify sizes in each dimension.
Array of logical values (0s and 1s) indicating whether grid should be periodic in each dimension
(i.e. if the last communicator and the first in each dimension are directly connected).
Logical value indicating whether ranks may be reordered or not.
Output parameter for new communicator.
Create a lesser dimensional grid from an existing
Cartesian communicator. See .
The existing communicator.
A logical array indicating whether a dimension in the existing should be kept (1) or dropped (0).
The new communicator.
Create a topological communicator with a graph topology,
where any rank can be connected to any other rank. See
.
An existing Intracommunicator to use to create the new communicator.
The number of nodes the graph will have.
An array indicating the starting index in of the edges for each vertex.
An array of edge targets, indexed by .
Logical indicating whether ranks can be reordered.
The new communicator.
Frees a communicator. This routine will be invoked automatically by
or the finalizer for .
The communicator to free.
Creates a new MPI attribute that can be attached to communicators. This routine is
automatically involved by MPI.NET when a new is created.
See
The function used to copy the attribute when a communicator is
duplicated.
The function used to delete the attribute when it is removed
from a communicator.
Will receive a new integer that identifies this attribute.
A user-defined pointer that includes extra information to be
passed to the copy and delete functions. This pointer can
be used to store more information about the attribute itself.
Frees an attribute with the given key value. The user must ensure that
this attribute has been deleted from all communicators before calling
this routine. This operation is performed by .
The attribute's key value.
Sets the value of an attribute on a communicator. Attributes in MPI.NET are
handled through the class, an instance of which is associated
with each communicator.
The communicator.
The attribute to set.
The new value to place into the communicator.
Retrieves the value of an attribute on a communicator. Attributes in MPI.NET are
handled through the class, an instance of which is associated
with each communicator.
The communicator.
The attribute to get.
Will receive the value stored for this attribute on this
communicator, if one exists. The result is only valid
if is non-zero.
Will receive a boolean value stating whether the attribute is stored
with this communicator.
Deletes an attribute stored on the communicator. Attributes in MPI.NET are
handled through the class, an instance of which is associated
with each communicator.
The communicator.
The attribute to delete.
Determine whether a communicator is an intercommunicator. In MPI.NET, intercommunicators
will have type .
The communicator.
Pointer to a flag, which will be set to a non-zero value if
is an intercommunicator.
Determines the number of processes in the remote group of an intercommunicator.
See .
The intercommunicator.
Will receive the number of processes in the remote group of
Retrieves the remote group from an intercommunicator.
See .
The intercommunicator.
Will receive the group containing all of the processes in the remote group
of .
Create a new intercommunicator from two disjoint intracommunicators.
See .
The local communicator.
The leader of the local communicator.
Communicator that bridges the intercommunicators, allowing the leaders to communicate.
The rank of the remote group's leader within .
Tag used for communication to create the intercommunicator.
Will receive the new intercommunicator.
Merge the two groups in an intercommunicator into a single intracommunicator.
See
The intercommunicator.
Whether this group of processes has the higher ranks in the resuling intercommunicator.
The resulting intracommunicator.
Gets the number of dimensions in the Cartesian communicator.
See .
Retrieves the primary topological information on a Cartesian communicator: the number of dimensions,
the size in each dimension, the periodicity in each dimension. Also gives the coordinates of the
calling process. See ,
, and .
The communicator.
The number of dimensions.
Output parameter for size of each dimension. Should be as long as .
Output parameter for periodicity in each dimension. 0 for false, 1 for true. Should be as long as .
Output parameter for coordinates of calling process. Should be as long as .
Determines the rank of a process in the Cartesian communicator given its coordinates.
See .
Determines the coordinates of a process given its rank in the Cartesian communicator.
See .
The communicator.
The rank of the process in the Cartesian communicator.
Length of
Output parameter.
Calculates the necessary source and destination ranks for shifting data over the
Cartesian communicator. See .
The communicator.
An integer specifying which of the dimensions along which to shift.
How far to shift (negative values means "downward," positive values "upward").
Output parameter for rank to receive from.
Output parameter for rank to send to.
Returns a recommended configuration for a new Cartesian grid.
See .
The existing communicator.
The number of dimensions for the Cartesian grid.
An array of length indicating the size of the grid in each dimension.
A logical array of length indicating whether the grid is periodic in any given dimension.
The new rank of the calling process.
Find out the communicator topology. In MPI.NET, one queries the communicator's topology by
looking at the type, e.g., , , or
.
The communicator.
Value indicating communicator topology; one of MPI_CART, MPI_GRAPH, or MPI_UNDEFINED (if the communicator
has no topology).
Retrieve the dimensions of a Graph communicator. See
and .
The communicator.
Output parameter for the number of nodes in the graph.
Output parameter for the number of edges in the graph.
Retrieve the index and edges arrays used to create the graph communicator. See
and .
The communicator.
The size of .
The size of
Output array in which to store the index array.
Output array in which to store the edges array.
Retrieve the number of neighbors of a node. See
and .
The communicator.
The rank of the node of interest.
Output parameter to store the number of neighbors.
Retrieve a list of the neighbors of a node. See
and .
The communicator.
The rank of the node of interest.
The size of .
Output array to store the list of neighbors.
Returns a recommended configuration for a new Graph communicator.
See .
The existing communicator.
The number of nodes to assume.
An index array to use (where the semantics is the same as for .
An array of edges as for the constructor .
The new rank of the calling process.
Suggest a shape for a new Cartesian communicator, given the number of dimensions.
See .
The number of nodes the grid will contain.
The number of dimensions the grid will have.
An array indicating the size in each dimension. Any nonzero entries will be left
alone; only 0 values will be changed to shape the grid.
Initializes MPI. This routine must be called before any other MPI routine.
It will be invoked by the constructor.
The number of arguments in .
A pointer to an array of C-style strings containing all of
the command-line arguments.
Finalizes (shuts down) MPI. This routine must be called before exiting the
program. It will be invoked by .
Determine whether MPI has already been initialized. See .
Will be set to a non-zero value if the MPI environment has been initialized.
Determine whether MPI has already been finalized. See .
Will be set to a non-zero value if the MPI environment has been finalized.
Aborts the current MPI program. See
and .
The communicator that will be used to abort the program.
The error code to be returned from the MPI process.
This routine does not return.
Initializes the MPI library with thread support. This operation subsumes .
See .
Pointer to the number of arguments passed on the command line.
Pointer to the command-line arguments (array of C-style strings).
The threading level required by the caller, which must be one of the MPI_THREAD_*
constants.
Returns the actual threading level that the MPI implementation is providing, which will be
one of the MPI_THREAD_* constants.
Determine whether the calling thread is the main MPI thread (that called
or . See .
Returns whether the calling thread is the main thread.
Determine the level of threading support provided by the MPI library.
See .
Returns one of the MPI_THREAD_* constants.
Retrieve the name of the processor or compute node that is currently executing.
See .
Pointer to an array of bytes that will, on return, contain the name of
the currenly executing processor. If the processor name requires more
than * ASCII characters, only the first
* characters will be written. To be sure that you
will always get the full processor name, should
refer to at least characters.
A pointer to the number of bytes in the processor name. On input, this is
the number of bytes that refers to. When this
function returns, this will point to the number of bytes in the actual name.
Creates a new MPI error handler from a user function. Attaching this error handler
to a communicator will invoke the user error handler when an error occurs.
This feature is not supported in MPI.NET; instead, MPI.NET installs its own error
handler that translates MPI errors into .NET exceptions.
The user's function.
The newly-created error handler.
Set the error handler for a given communicator. This feature is not supported in MPI.NET;
instead, MPI.NET installs its own error handler that translates MPI errors into .NET exceptions.
The communicator.
The error handler.
Retrieve the error handler for a given communicator. This feature is not supported in MPI.NET;
instead, MPI.NET installs its own error handler that translates MPI errors into .NET exceptions.
The communicator.
The error handler attached to the communicator.
Free a user-defined error handler that was created with .
This feature is not supported in MPI.NET; instead, MPI.NET installs its own error handler
that translates MPI errors into .NET exceptions.
Retrieves an error string corresponding to the given MPI error code. Used internally by
MPI.NET to provide an error string in MPI.NET exceptions.
The error code.
Byte array that will be filled with a string describing the error.
Returns the number of elements placed into the buffer .
Maps an MPI error code into an error class. Error classes describe (in general) what kind of
error occurred, and can be used to provide better information to the user. The MPI_ERR_* constants
give the various error classes present in MPI. Used internally by MPI.NET.
The error code returned from MPI.
Set to the error class
Send a message to another process within the communicator.
See .
Receive a message from another process within the communicator.
See .
Simultaneously send and receive a message from another process within the communicator.
Determine whether a particular communication operation was cancelled.
See .
Status object
Will be set to a non-zero value if the communnication was cancelled.
Error code.
Determine the number of elements transmitted by a communication operation.
See .
An immediate (non-blocking) point-to-point send.
See .
Buffer of data to send.
The number of elements in .
The type of data in .
Rank of the destination process.
Tag used to transmit this data.
Communicator through which this data will be sent.
Receives a request object that can be used to query this communication.
A non-blocking receive that posts the intent to receive a value. The actual receive will be
completed when the corresponding request is completed.
See .
Buffer that will receive message data.
Number of elements in .
Type of data stored in .
Rank of the processor that will initiate this message, or .
Message tag used to identify the message, or .
Communicator through which the message will be sent.
Receives a request object that can be used to query this communication.
Wait until the given request has completed. See .
Request object.
Will receive the status of the completed operation.
Test whether the given request has completed. See .
Request object.
Will be set to a non-zero value if the request has completed.
Will receive the status of the completed operation.
Free the resources associated with a request.
The request that will be freed.
Waits until any of the given MPI requests completes before returning.
See .
The number of requests in .
An array of MPI request objects.
Receives the index of the request that completed.
Receives the status of the completed request.
Test whether any of the MPI requests has completed.
See .
The number of requests in .
An array of MPI request objects.
Receives the index of the request that completed (if is non-zero).
Will be set to a non-zero value if a request has completed.
Receives the status of the completed request (if is non-zero).
Wait until all of the given MPI requests have completed before returning.
See .
The number of requests (and statuses).
An array of MPI request objects to be completed.
An array of MPI status objects, to be filled in by the completed requests.
Test whether all of the given MPI requests have been completed.
See .
The number of requests (and statuses).
An array of MPI request objects to be completed.
Will be set to a non-zero value if all requests have completed.
An array of MPI status objects, to be filled in by the completed requests (if is non-zero).
Wait until some MPI requests have completed, then provide a list of all of the requests that have completed.
See .
The number of requests in .
The array of requests to be completed.
Receives the number of requests that have been completed.
An array that will receive the indices into of the
completed requests.
Array containing the completed status information that corresponds to the completed
requests whose indices are in .
Providing a list of all of the requests that have completed, without waiting for any
requests to complete. See .
The number of requests in .
The array of requests to be completed.
Receives the number of requests that have been completed.
An array that will receive the indices into of the
completed requests.
Array containing the completed status information that corresponds to the completed
requests whose indices are in .
Test whether a message is available. See .
Wait until a message is available. See .
Cancel an outstanding MPI communication request. See .
The request to be cancelled.
Returns a floating point number of seconds, since some time in the past
See .
Returns a resolution of , in seconds.
See .
Perform a parallel reduction operation that summarizes the results from the input provided
by all of the processes in the communicator. Semantically, this is equivalent to an
to an arbitrary root followed by an from
that process.
See
Buffer containing the "outgoing" values contributed by the calling process to the reduction operation.
Buffer that will receive the results of the parallel reduction.
The number of elements in and .
The type of data in and .
The MPI reduction operation to use, which may be one of the predefined reduction operations
or a user-defined operation created with .
The communicator over which the reduction will occur.
Gather the values provided by each process into an array containing the contributions of all
of the processes. This operation is equivalent to a to an arbitrary
root followed by an from that root.
See
Buffer containing the values that will be sent from this process.
The number of elements to send.
The datatype describing the send buffer.
Buffer that will contain all of the values contributed by every process.
The number of elements to receive from each process.
The type of data that will be stored in the receive buffer.
The communicator over which data will be gathered.
Gather the values provided by each process into an array containing the contributions of all
of the processes. This operation differs from in that it
permits different processes to provide a different number of elements to be gathered.
See
Buffer containing the values that will be sent from this process.
The number of elements to send.
The datatype describing the send buffer.
Buffer that will contain all of the values contributed by every process.
An array whose ith element is the number of elements to be received from the process
with rank i.
An array whose ith element is the offset (in ) at which the
data from process i should be placed.
The type of data that will be stored in the receive buffer.
The communicator over which data will be gathered.
Transmits data from every process in a communicator to every other process in the communicator.
Similar to , except that each process can send different data to
every other process. To send a different amount of data to each process, use
or .
See .
Buffer containing the data to send from this process. The ith position in this buffer
contains the data that will be sent to the process with rank i.
The number of elements to send to each process.
The type of data stored in .
Buffer that will receive data sent from other processes to this process.
The number of elements that will be received from each process.
The type of data stored in .
The communicator used for collective communication.
Transmits data from every process in a communicator to every other process in the communicator.
Similar to , except that each process can send different data to
every other process. If all of your processes send the same amount of data to each other, use
the simpler ; if you need the data sent to different processes to
have different datatypes, use .
See .
Buffer containing the data to send from this process. The ith position in this buffer
contains the data that will be sent to the process with rank i.
An array whose ith element contains the number of elements to be send to the process with
rank i.
An array whose ith element contains the offsets into where the
data destined for the process with rank i begins.
The type of data in .
Buffer that will receive data sent from other processes to this process.
An array whose jth element contains the number of elements that will be received from the
process with rank j.
An array whose jth element contains the offset into where the
data received from the process with rank j begins.
The type of data in .
The communicator used for collective communication.
Transmits data from every process in a communicator to every other process in the communicator.
Similar to , except that each process can send different data to
every other process. If all of your processes send the same amount of data to each other, use
the simpler ; if the volume of data sent to each process can be different
but all of the data has the same type, use .
See .
Buffer containing the data to send from this process. The ith position in this buffer
contains the data that will be sent to the process with rank i.
An array whose ith element contains the number of elements to be send to the process with
rank i.
An array whose ith element contains the offsets into where the
data destined for the process with rank i begins.
An array whose ith element contains the type of data that will be sent to rank i.
Buffer that will receive data sent from other processes to this process.
An array whose jth element contains the number of elements that will be received from the
process with rank j.
An array whose jth element contains the offset into where the
data received from the process with rank j begins.
An array whose jth element contains the type of data that will be received from the process
with rank j.
The communicator used for collective communication.
A synchronization barrier where no processor leaves the barrier until all processors have entered the barrier.
See .
The communicator whose processes will be synchronized.
Broadcast a value from the root process to every process within the communication.
See .
Pointer to the data that will be broadcast. At the root, this buffer will be
read; in all other processes, the buffer will be written.
The number of elements that points to.
The type of data stored in the .
The rank of the root processor, from which the data will be broadcast.
The communicator over which the data will be transmitted.
Performs a partial exclusive reduction on the data, returning the result from combining the data provided
by the first P-1 processes to the process with rank P.
See
Buffer containing the data to contribute to the reduction.
Buffer that will receive the result of combining the first Rank values.
Number of values in and .
The type of data in and .
The reduction operation used to combine values.
The communicator over which the communication will occur.
Gather the values provided by each process into an array containing the contributions of all
of the processes. This routine differs from in that the results
are gathered to only the "root" process, which is identified by its
in the communicator.
See
Buffer containing the values that will be sent from this process.
The number of elements to send.
The datatype describing the send buffer.
Buffer that will contain all of the values contributed by every process.
This argument is only significant at the root.
The number of elements to receive from each process.
This argument is only significant at the root.
The type of data that will be stored in the receive buffer.
This argument is only significant at the root.
The rank of the "root" process.
The communicator over which data will be gathered.
Gather the values provided by each process into an array containing the contributions of all
of the processes. This routine differs from in that the results
are gathered to only the "root" process, which is identified by its
in the communicator.
See
Buffer containing the values that will be sent from this process.
The number of elements to send.
The datatype describing the send buffer.
Buffer that will contain all of the values contributed by every process.
This argument is only significant at the root.
An array whose ith element is the number of elements to receive from process i.
This argument is only significant at the root.
An array whose ith element contains the displacement (into ) at
which the data from process i will be placed. This argument is only significant at the root.
The type of data that will be stored in the receive buffer.
This argument is only significant at the root.
The rank of the "root" process.
The communicator over which data will be gathered.
Perform a parallel reduction operation that summarizes the results from the data contributed
by all of the processes in a communicator. Unlike , the results
of this operation are returned only to the process whose rank is equivalent to
, i.e., the "root" process.
See
Buffer containing the "outgoing" values contributed by the calling process to the reduction operation.
Buffer that will receive the results of the parallel reduction. This argument is
only significant at the root.
The number of elements in and .
The type of data in and .
The MPI reduction operation to use, which may be one of the predefined reduction operations
or a user-defined operation created with .
Identifies the root process (which will receive the intermediate of the reduction) by
its rank in the communicator .
The communicator over which the reduction will occur.
The equivalent of a followed by a , performing a
reduction on the data provided in and then scattering those results
to all of the processes. See .
Buffer containing the data to be reduced.
Buffer that will receive this process's results.
An array whose ith element gives the number of results that will go to the process with rank i.
The type of data in and .
The operation used to combine each element in .
The communicator over which this collective will operate.
Performs a partial reduction on the data, returning the result from combining the data provided
by the first P processes to the process with rank P.
See
Buffer containing the data to contribute to the reduction.
Buffer that will receive the result of combining the first Rank values.
Number of values in and .
The type of data in and .
The reduction operation used to combine values.
The communicator over which the communication will occur.
Scatters data from one process (the "root" process) to all of the processes in a communicator,
with different parts of the data going to different processes.
See .
Buffer containing the data to be sent. Only significant at the root process.
The number of elements to send to each process. Only significant at the root process.
The type of data in . Only significant at the root process.
A buffer that will receive the calling process's part of the data.
The number of elements to receive.
The type of data to receive.
The rank of the "root" process, which supplies the data.
The communicator over which the data will be scattered.
Scatters data from one process (the "root" process) to all of the processes in a communicator,
with different parts of the data going to different processes. Unlike ,
different processes may receive different amounts of data.
See .
Buffer containing the data to be sent. Only significant at the root process.
An array whose ith element contains the number of elements to send to process i.
Only significant at the root process.
An array whose ith element contains the offset (into )
if the data to be sent to process i. Only significant at the root process.
The type of data in . Only significant at the root process.
A buffer that will receive the calling process's part of the data.
The number of elements to receive.
The type of data to receive.
The rank of the "root" process, which supplies the data.
The communicator over which the data will be scattered.
Creates an MPI operation that invokes a user-provided function. The MPI operation
can be used with various reduction operations. MPI.NET provides support for user-defined
operations via the class.
A pointer to the user-defined function.
Whether this function is commutative.
Receives the newly-created MPI operation.
Frees an MPI operation created via . MPI.NET will automatically
manage any operations it creates via when the corresponding
object is disposed of or finalized.
The operation to be freed.
Attempts to allocate (unmanaged) memory from MPI. This memory must be
manually freed with a call to .
This routine is used automatically by the to
allocate memory when serializing or de-serializing objects within MPI.NET.
The number of bytes to allocate.
Provides extra information to the MPI implementation that may
help it allocate memory for a specific reason or from a specific
memory pool.
Will receive a pointer to the newly-allocated memory.
if memory is successfully allocated,
if no memory is available.
Frees memory allocated with .
This routine is used automatically by the to
allocate memory when serializing or de-serializing objects within MPI.NET.
The pointer provided by .
Converts the intermediate of an MPI_*_compare operation into a enum value.
Low-level representation of the status of an MPI communication operation.
This structure is used internally by MPI.NET, and most users will instead see the MPI.NET version
of the message-status class, . Unless you are interacting directly with the
low-level MPI interface (which is not typically recommended), use instead.
This field is only available if the underlying MPI is MS-MPI.
This field is only available if the underlying MPI is MS-MPI.
The rank of the source of the MPI message.
The MPI message tag associated with this communication.
The MPI error code associated with this communication.
TODO: We need a higher-level facility for dealing with this.
Delegate describing a low-level MPI function used to copy attribute values from a communicator
when the communicator is being duplicated.
This function will
be defined automatically by MPI.NET when a new is created, and will vary
depending on the type of the attribute and on the requested .
The communicator being duplicated.
The attribute's key value.
The extra state associated with the attribute, provided by the user
in .
The attribute value in the communicator to be duplicated.
A pointer to the attribute value that will be copied into the
new communicator. The attribute value will be no larger than an IntPtr.
The user only needs to set this value if the attribute will be copied,
as determined by flag.
Set this to a non-zero value to indicate that the attribute should
be copied.
Delegate describing a low-level MPI function that takes care of de-allocating
an attribute when it is deleted from a communicator (or the communicator itself
is freed).
Often used when the attribute's value is a pointer to some per-communicator
data, and the pointer needs to be freed. This function will be defined automatically
by MPI.NET when a new is created, and will vary
depending on the type of the attribute and on the requested .
The communicator.
The attribute being removed from the communicator.
The value of this attribute in the communicator.
The extra state provided by the user in .
Intercommunicators are s that contain two disjoint groups of
processes, an each process can communicate only with processes in the other group.
Intercommunicators effectively create a communication pattern that follows a bipartite graph.
Call the two disjoint groups of processes A and B. Any process in group A can send
a message to or receive a message from any process in group B, and vice-versa. However, there
is no way to use an intercommunicator to send messages among the processes within a group.
Intercommunicators are often useful in large MPI applications that tie together many, smaller
modules. Typically, each module will have its own intracommunicators and the modules will
interact with each other via intercommunicators.
Indicates that this process is the root for a collective operation. The root process should
pass this constant in as the value for root for calls to collective operations.
Other processes in the same group as root should use Null. Processes
in the group sending to the root should use the root process' local rank.
For a collective operation, indicates that this process is the same group as the root but is
not the root (and thus is not receiving any data). These processes should pass this is as
the root for calls to collective communication procedures. Processes
in the group sending to the root should use the root process' local rank. The root process
should pass in Root.
A tag on the reserved for communications that are part of collective operations.
Intercommunicators can only be constructed from other communicators or adopted
from low-level intercommunicators.
Constructs a new intercommunicator that provides communication between two groups of processes,
specified by intracommunicators. This is a collective operation involving all of the processes
in the communicators passed via .
Intracommunicator whose processes will form the local group in the resulting
intercommunication. Since there are two groups in an intercommunicator (each of which is
identified by an intracommunicator), each process will provide the communicator for its
own "local" group. Note that a process cannot be in both groups.
The rank of the "leader" in the local group. Each of the processes must provide
the same leader rank as all of the other processes within its group.
A communicator that permits communication between the leaders of the two groups.
This communicator is used internally to construct the intercommunicator, so there must
not be any pending communication that might interfere with point-to-pointer messages with
tag . This parameter is only significant for the processes
that are leaders of their group.
The rank of the remote group's leader within the communicator .
A tag value that indicates which intercommunicator is used to transmit setup messages across
the communicator . Pick a tag value that will not interfere
with other communicator on .
Adopts a low-level MPI intercommunicator that was created with any of the low-level MPI facilities.
The resulting Intercommunicator object will manage the lifetime of the low-level MPI intercommunicator,
and will call when it is disposed or finalized.
This constructor should only be used in rare cases where the program
is manipulating MPI intercommunicators through the low-level MPI interface.
Merge all of the processes in both groups of an intercommunicator into a single
intracommunicator. While the intercommunicator only allows communication among processes
in different groups, the merged intracommunicator allows communication among all of the
processes in either group, regardless of which group the source and target were in.
All of the processes within each group should provide the same value. If one group's
processes provide the value true while the other group's processes provide the value
false, the group providing the value true will receive the higher-numbered
ranks in the resulting intracommunicator. If all processes provide the same value,
the order of the union is arbitrary.
The new intracommunicator.
Gathers individual values provided by each processor from the other group into an array of values in which the
ith element of the array corresponds to the value provided by the processor with rank i.
The resulting array of values is available to all of the processors.
Any serializable type.
The value supplied by this processor, which will be placed into the element with index
in the array sent to processes in the other group.
An array of values, where the ith value in the array is a copy of the
argument provided by the processor from the other group with rank i.
Gathers individual values provided by each processor from the other group into an array of values in which the
ith element of the array corresponds to the value provided by the processor with rank i.
The resulting array of values is available to all of the processors.
Any serializable type.
The value supplied by this processor, which will be placed into the element with index
in the array sent to processes in the other group.
An array of values, where the ith value in the array is a copy of the
argument provided by the processor from the other group with rank i.
Supply this argument when you have pre-allocated space for the resulting array.
Gathers invidividual values provided by each processor from the other group into an array of values.
Any serializable type.
The values supplied by this processor.
The number of items to be received by each process in this group.
An array of values supplied by all processes of the other group. Supply this argument when
you have pre-allocated space for the resulting array.
Gathers invididual values provided by each processor into an array of values.
Any serializable type.
The values supplied by this processor.
The numbers of items to be received by each process in this group.
An array of values supplied by all processes. Supply this argument when
you have pre-allocated space for the resulting array.
Allreduce is a collective algorithm that combines the values supplied by each process of the other group
into a single value available to all processes. The values are combined in a user-defined way, specified via
a delegate. If value1, value2, ..., valueN are the values provided by the
N processes in the communicator, the result will be the value value1 op value2 op ... op valueN.
Any serializable type.
The local value that will be combined with the values provided by other processes
and sent to each process in the other group.
The operation used to combine two values. This operation must be associative.
The result of the reduction. The same value will be returned to all processes in a group.
Allreduce is a collective algorithm that combines the values supplied by each process of the other group
into a single value available to all processes. The values are combined in a user-defined way, specified via
a delegate. If value1, value2, ..., valueN are the values provided by the
N processes in the communicator, the result will be the value value1 op value2 op ... op valueN.
Any serializable type.
The local values that will be combined with the values provided by other processes
and sent to each process in the other group.
The operation used to combine two values. This operation must be associative.
The values that result from combining all of the values in (as provided by the
processes of the other group)
element-by-element. If needed, this array will be resized to the same size as .
Allreduce is a collective algorithm that combines the values supplied by each process of the other group
into a single value available to all processes. The values are combined in a user-defined way, specified via
a delegate. If value1, value2, ..., valueN are the values provided by the
N processes in the communicator, the result will be the value value1 op value2 op ... op valueN.
Any serializable type.
The local values that will be combined with the values provided by other processes
and sent to each process in the other group.
The operation used to combine two values. This operation must be associative.
The values that result from combining all of the values in (as provided by the
processes of the other group)
element-by-element. If needed, this array will be resized to the same size as .
Supply this argument when you have pre-allocated space for the resulting array.
Collective operation in which every process in one group sends data to every process of the other group.
Alltoall differs from in that a given process can send different
data to all of the other processes, rather than contributing the same piece of data to all
processes.
Any serializable type.
The array of values that will be sent to each process in the other group. The ith value in this array
will be sent to the process with rank i.
An array of values received from all of the processes in the other group. The jth value in this
array will be the value sent to the calling process from the process with rank j.
Collective operation in which every process in one group sends data to every process of the other group.
Alltoall differs from in that a given process can send different
data to all of the other processes, rather than contributing the same piece of data to all
processes.
Any serializable type.
The array of values that will be sent to each process. The ith value in this array
will be sent to the process with rank i.
An array of values received from all of the processes in the other group. The jth value in this
array will be the value sent to the calling process from the process with rank j.
Supply this argument when you have pre-allocated space for the resulting array.
Collective operation in which every process in one group sends data to every process of the other group.
Alltoall differs from in that a given process can send different
data to all of the other processes, rather than contributing the same piece of data to all
processes.
Any serializable type.
The array of values that will be sent to each process. sendCounts[i]
worth of data will be sent to process i.
The numbers of items to be sent to each process in the other group.
The numbers of items to be received by each process in this group.
The array of values received from all of the other processes.
Broadcast a value from the process to all processes in the other group.
Any serializable type.
The value to be broadcast. At the process, this value is
read (but not written). At leaf group processes, this value will be replaced with
the value at the root. At non-root processes in the root group, this value is not read or written.
The rank of the process that is broadcasting the value out to
all of the processes in the non-root group.
Broadcast an array from the process to all processes in the other group.
Any serializable type.
The array of values to be broadcast. At the process, this value is
read (but not written); at processes in the leaf group, this value will be replaced with
the value at the root; and at non-root root group processes, this value is not read or written.
Note that the receiving processes must already have allocated
enough space in the array to receive data from the root, prior to calling Broadcast.
The rank of the process that is broadcasting the values out to
all of the processes in the non-root group.
Gather the values from each process in the non-root group into an array of values at the
process. On the root process, the pth element of the result
will be equal to the parameter of the process
with rank p in the other group when this routine returns.
Any serializable type.
The value contributed by this process. Only significant at non-root group processes.
Used to indicate the process gathering the data.
At the root, should be . At leaf group processes
should be the rank of the root process in the root group. At non-root processes in the root group,
should be .
At the root, an array containing the s supplied by each of the processes
in the non-root group. All other processes receive null.
Gather the values from each process in the non-root group into an array of values at the
process. On the root process, the pth element of the result
will be equal to the parameter of the process
with rank p in the other group when this routine returns. This variant can be called only
by the root process or by members of the leaf (non-root) group.
Any serializable type.
Used to indicate the process gathering the data.
At the root, should be . At leaf group processes
should be the rank of the root process in the root group. At non-root processes in the root group,
should be .
Gather the values from each process in the non-root group into an array of values at the
process. Use this variant only on non-root processes in
the root group.
Any serializable type.
Gather the values from each process in the non-root group into an array of values at the
process. On the root process, the pth element of the result
will be equal to the parameter of the process
with rank p in the other group when this routine returns. Use this variant of the routine
when you want to pre-allocate storage for the array.
Any serializable type.
The value contributed by this process. Only significant at processes
in the leaf (non-root) group.
Used to indicate the process gathering the data.
At the root, should be . At leaf group processes
should be the rank of the root process in the root group. At non-root processes in the root group,
should be .
An array that will store the values contributed by each process.
This value is only significant at the , and
can be omitted by non-root processes.
Supply this argument when you have pre-allocated space for the resulting array.
Similar to but here all values are aggregated into one large array.
Use this variant at the root process.
Any serializable type.
The number of elements contributed by each process of the leaf group.
An array in which to store the aggregated, gathered values.
Similar to but here all values are aggregated into one large array.
Use this variant at the root process.
Any serializable type.
The number of elements contributed by each process of the leaf group.
Similar to but here all values are aggregated into one large array.
Use this variant at leaf group processes.
Any serializable type.
The values to be gathered.
Used to indicate the process gathering the data.
At the root, should be . At leaf group processes
should be the rank of the root process in the root group. At non-root processes in the root group,
should be .
Similar to but here all values are aggregated into one large array.
Use this variant at non-root processes in the root group.
Any serializable type.
Similar to but here all values are aggregated into one large array.
Use this variant at the root process.
Any serializable type.
The number of elements to be received from each process in the leaf group.
The aggregated, gathered values. Supply this parameter if you have preallocated space for the operation.
Similar to but here all values are aggregated into one large array.
Use this variant at the root process.
Any serializable type.
The number of elements to be received from each process in the leaf group.
Reduce is a collective algorithm that combines the values supplied by each
process in the leaf group into a
single value available at the designated process. The values are combined
in a user-defined way, specified via a delegate. If value1, value2, ..., valueN
are the values provided by the N processes in the communicator, the result will be the value
value1 op value2 op ... op valueN. This result is only
available to the process. If all processes need the result of the reduction,
use .
Any serializable type.
The local value that will be combined with the values provided by other leaf group processes.
The operation used to combine two values. This operation must be associative.
The rank of the process that is the root of the reduction operation, which will receive the result
of the reduction operation in its argument.
On the root, returns the result of the reduction operation. The other processes receive a default value.
Reduce is a collective algorithm that combines the values supplied by each
process in the leaf group into a
single value available at the designated process. This particular variant of
applies to each of the elements
of the provided arrays. Each process must provide arrays of the same length, and the values at each
array index are combined
in a user-defined way, specified via a delegate. If value1, value2, ..., valueN
are the ith values provided by the N processes in the communicator, the ith result will be the value
value1 op value2 op ... op valueN. The resulting array is only
available to the process. If all processes need the result of the reduction,
use .
Any serializable type.
The local values that will be combined with the values provided by other leaf group processes.
The operation used to combine two values. This operation must be associative.
On leaf group processes, the rank of the process that is the root of the reduction operation, to which this routine will
return the result of the reduction operation. On the root process, should be . On non-root processes
in the root group, should be .
On the root, an array that contains the result of elementwise reduction on the
arrays provided by each process. On all other processes, null.
Reduce is a collective algorithm that combines the values supplied by each
process in the leaf group into a
single value available at the designated process. This particular variant of
applies to each of the elements
of the provided arrays. Each process must provide arrays of the same length, and the values at each
array index are combined
in a user-defined way, specified via a delegate. If value1, value2, ..., valueN
are the ith values provided by the N processes in the communicator, the ith result will be the value
value1 op value2 op ... op valueN. The resulting array is only
available to the process. If all processes need the result of the reduction,
use .
Any serializable type.
The local values that will be combined with the values provided by other leaf group processes.
The operation used to combine two values. This operation must be associative.
At leaf group processes, the rank of the process that is the root of the reduction operation, which will receive the result
of the reduction operation in its argument.
At the root, should be . At non-root processes in the root group,
should be .
The variable that will receive the results of the reduction operation. Only the
process will receive the actual result; all other processes will receive a default-initialized value.
When this collective operation returns, will be of the same length as
.
A collective operation that first performs a reduction on the given
(see from one group
and then scatters the results by sending some elements to each process of the other group.
The reduction will be performed on the entire array of (like the array form of
). Then, the array will
be scattered, with process i receiving [i] elements. The process
with rank 0 will receive the first counts[0] elements, the process with rank 1 will
receive the next counts[1] elements, and so on.
Any serializable type.
An array of values that will be reduced. This array must be the same length at every process within a group.
The operation used to combine the elements in .
This operation must be associative.
An array whose ith element states the number of elements from the reduced result
that will be returned to the process with rank i. This array should be the same at every
process within a group (though the count values within the array need not be the same).
The sum of all counts for one group must be the same as the sume of all counts for the other group.
An array of length counts[Rank] containing the reduced results destined for
the calling process.
A collective operation that first performs a reduction on the given
(see from one group
and then scatters the results by sending some elements to each process of the other group.
The reduction will be performed on the entire array of (like the array form of
). Then, the array will
be scattered, with process i receiving [i] elements. The process
with rank 0 will receive the first counts[0] elements, the process with rank 1 will
receive the next counts[1] elements, and so on.
Any serializable type.
An array of values that will be reduced. This array must be the same length at every process within a group.
The operation used to combine the elements in .
This operation must be associative.
An array whose ith element states the number of elements from the reduced result
that will be returned to the process with rank i. This array should be the same at every
process within a group (though the count values within the array need not be the same).
The sum of all counts for one group must be the same as the sume of all counts for the other group.
An array of length counts[Rank] containing the reduced results destined for
the calling process.
Scatters an array of values by sending the ith value of the array to processor i of the other group.
This variant of Scatter can only be called by the root process. Other processes
should call the non-root variant of .
Any serializable type.
An array of values of length .
The ith value of this array (at the root process) will be sent to the ith processor of the other group.
Scatters an array of values by sending the ith value of the array to processor i.
This variant of Scatter can only be called by a leaf group process. The root process
should call the root-only variant of . Other
root group processes should call
Any serializable type.
Rank of the "root" process, which will supply the array of values to be scattered.
The ith value of the array provided by the root process, where i is
the rank of the calling process.
Scatters an array of values by sending the ith value of the array to processor i.
This variant of Scatter can only be called by a non-root process in the root group.
The root process should either call the root-only variant of .
Leaf group processes should call
Scatter a one dimensional array to all processes of the other group,
where multiple items are sent to each process.
This version should be called by the root process.
(If the number of items to be sent is different at each process, see
Any serializable type.
The array to be scattered. Only significant at the root.
The number of items to be received by each leaf group process. If T is a value type (primitive or
structure) count must be the same at each process (not just at the root). If T must
be serialized, count is ignored at processes other than the root.
Scatter a one dimensional array to all processes of the other group, where the number of data items sent to
each process may differ. This version should be called by the root process.
Any serializable type.
The array to be scattered.
The number of items to be received by each process of the leaf group.
Scatter a one dimensional array to all processes of the other group, where multiple items are sent to each process.
This version should be called by leaf group processes.
(If the number of items to be sent is different at each process, see
Any serializable type.
The number of items to be received by each process of the leaf group. If T is a value type (primitive or
structure) count must be the same at every process . If T must
be serialized, count is ignored at processes other than the root.
The rank of the root process.
The array to write to at the receiving process. Does not have to be preallocated.
Scatter a one dimensional array to all processes of the other group, where the number of data items sent to
each process may differ. This version should be called by members of the leaf group.
Any serializable type.
The number of items to be received by each process. If T must
be serialized (i.e. is not a value type), counts is ignored at processes other than the root.
The rank of the root process.
The array to write to at the receiving process. Does not have to be preallocated.
Scatter a one dimensional array to all processes of the other group, where the number of data items sent to
each process may differ. This version should be called by processes in the root group,
other than the root.
Scatter a one dimensional array to all processes of the other group, where multiple items are sent to each process.
(If the number of items to be sent is different, see
Any serializable type.
The array to be scattered. Only significant at the root.
The number of items to be received by each process. If T is a value type (primitive or
structure) count must be the same at every process. If T must
be serialized, count is ignored at processes other than the root.
Used to indicate the process gathering the data.
At the root, should be . At leaf group processes
should be the rank of the root process in the root group. At non-root processes in the root group,
should be .
The array to write to at the receiving process. Does not have to be preallocated.
Scatter a one dimensional array to all processes of the other group, where the number of data items sent to
each process may differ.
Any serializable type.
The array to be scattered. Only significant at the root.
The number of items to be received by each process. If T must
be serialized (i.e. is not a value type), counts is ignored at processes other than the root.
Used to indicate the process gathering the data.
At the root, should be . At leaf group processes
should be the rank of the root process in the root group. At non-root processes in the root group,
should be .
The array to write to at the receiving process. Does not have to be preallocated.
Returns the number of processes in the remote group of this intercommunicator.
Retrieve the group containing all of the remote processes in this intercommunicator.
A non-blocking communication request.
Each request object refers to a single
communication operation, such as non-blocking send
(see )
or receive. Non-blocking operations may progress in the background, and can complete
without any user intervention. However, it is crucial that outstanding communication
requests be completed with a successful call to or
before the request object is lost.
Wait until this non-blocking operation has completed.
Information about the completed communication operation.
Determine whether this non-blocking operation has completed.
If the non-blocking operation has completed, returns information
about the completed communication operation. Otherwise, returns
null to indicate that the operation has not completed.
Cancel this communication request.
A non-blocking receive request.
This class allows one to test a receive
request for completion, wait for completion of a request, cancel a request,
or extract the value received by this communication request.
Retrieve the value received via this communication. The value
will only be available when the communication has completed.
The value received by this communication.
A request that corresponds to a non-blocking send of either a
single value or an array of values, where the type of the value
(or values) is a value type with an associated MPI datatype.
Underneath, this request is a single MPI_Request object
coupled with a handle to pinned memory and some additional
information about the send itself.
Initialize a single request for a non-blocking send that has already been initiated.
The request object.
The number of elements transmitted in this communication.
A handle pointing to pinned memory that will be unpinned after
this operation completes.
Cleanup any resources that we're currently holding. This typically
involves unpinning the memory associated with this request.
If we've already completed this operation, this caches the status information
so we can return it again later.
The underlying MPI request object that provides a handle to this
non-blocking send.
The number of elements sent by this operation.
Handle to the pinned memory used in this request.
A structure storing two requests. Use this to keep the two requests in memory
next to each other, so that we can complete or test them with a single MPI call.
A request for a serialized send, which typically consists of two MPI_Request objects.
This class manages pinning and unpinning the data for both send requests, and testing/completing
both requests in the same operation.
Initiate an MPI non-blocking send operation managed by this Request object.
The communicator over which the initial message will be sent.
The destination rank for this message.
The message tag.
The stream of bytes that should be transmitted.
The number of serialized objects stored in .
Clean up whatever resources we are holding.
If we've already completed this operation, this caches the status information
so we can return it again later.
The number of elements transmitted by this operation.
Header sent in the first message corresponding to the serialized send.
Tag allocator user by the communicator to temporarily retrieve tags
for sending serialized data.
Handle that pins down the header object, so that it does not move.
Stream containing the serialized representation of the data to send
in unmanaged memory (that map be owned by MPI).
The two outstanding MPI requests. The first request contains the send request
for the buffer, while the second request contains the send for the length
(which may be ).
A non-blocking receive request for a single value of value type. This
request contains only a single MPI_Request object, which will
receive into its own value member.
Cleanup any resources we're still holding on to.
If we've already completed this operation, this caches the status information
so we can return it again later.
Handle to this, which will be pinned so that value's
address will remain the same.
The MPI request associated with the non-blocking receive.
The actual value we'll be receiving
A non-blocking receive request for an array of values of value type. This
request contains only a single MPI_Request object, which will
receive into the given array.
Cleanup any resources we're still holding on to.
If we've already completed this operation, this caches the status information
so we can return it again later.
Handle to this, which will be pinned so that value's
address will remain the same.
The MPI request associated with the non-blocking receive.
The actual array we'll be receiving into.
A request for a serialized receive, which uses a two-stage receive process. The first stage
receives the size of the serialized data. The second stage receives the actual data and,
upon completion, deserializes that data.
Any serializable type.
Given the header data, this routine will set up the receive of the
serialized data on the shadow communicator.
The status message returned from the completion of the first
receive (of the header data).
If we've already completed this operation, this caches the status information
so we can return it again later.
The tag value used by the original received message. We store this value when we
receive the header rather that storing the complete status object, since the
status object from the second receive is just as good.
Handle that pins down either the header object (when receiving the header)
or the stream's buffer (when receiving the serialized data).
Request object that corresponds to the currently-active request.
"Shadow" communicator through which we will receive the serialized data.
Stream that will receive the serialized data.
Message header to be received in the first stage.
The value we are receiving.
A request for a serialized receive of an array of values. The communication behavior is
identical to (and implemented as) , but
here we need to copy the values from the de-serialized array into the array provided
by the user.
Any serializable type.
Copies the results from the received array into the user-provided array
and returns a new status object with the appropriate count.
The request that handles receipt of the actual array, since we cannot
de-serialize an array into an existing array.
The user-provided array, where values will be copied once the receive
has completed.
Cached copy of the status object returned from this request. When non-null,
this communication has already completed, so we just return this object.
Enumeration describing the level of threading support provided by the MPI implementation.
The MPI environment should be initialized with the minimum threading support required
for your application, because additional threading support can have a negative impact
on performance.
The four options providing monotonically-increasing levels of freedom for the MPI
program. Thus, a program implemented based on the Threading.Single semantics
will work perfectly well (although perhaps less efficiently) with Threading.Multiple.
The program is single-threaded, and does not ever create additional threads
(even those that don't use MPI).
The program is multi-threaded, but only one of those threads (the main thread)
will make calls into the MPI library. Thus, all of the MPI calls are "funneled"
into that one thread. One can determine if the currently-executing thread is
the main thread via .
The program is multi-threaded, and more than one thread will make calls into
the MPI library. However, these calls into MPI are "serialized", in that
no two threads will call the MPI library at the same time. This mode essentially
requires the user program to have the equivalent of a global lock around all calls
to MPI.
The program is multi-threaded, and more than one thread will make calls into
the MPI library. The program is free to call the MPI library routines from
any thread at any time, including having multiple threads calling MPI
concurrently. Note that this level of threading is not supported by MS MPI.
Provides MPI initialization, finalization, and environmental queries.
The Environment class provides initialization, finalization, and
environmental query operations for the Message Passing Interface.
Users must initialize the MPI environment before using any of the
MPI facilities by creating an instanceof the Environment class.
Initializes the MPI environment. This variant of the constructor
initializes the MPI environment with the threading model.
Arguments passed to the Main function in your program. MPI
may use some of these arguments for its initialization, and will remove
them from this argument before returning.
This routine must be invoked before using any other MPI facilities.
Be sure to call Dispose() to finalize the MPI environment before exiting!
This simple program initializes MPI and writes out the rank of each processor:
using MPI;
public class Hello
{
static void Main(string[] args)
{
using (MPI.Environment env = new MPI.Environment(ref args))
{
System.Console.WriteLine("Hello, from process number "
+ MPI.Communicator.world.Rank.ToString() + " of "
+ MPI.Communicator.world.Size.ToString());
}
}
}
Initializes the MPI environment.
Arguments passed to the Main function in your program. MPI
may use some of these arguments for its initialization, and will remove
them from this argument before returning.
The level of threading support requested of the MPI implementation. The
implementation will attempt to provide this level of threading support.
However, the actual level of threading support provided will be published
via the property.
This routine must be invoked before using any other MPI facilities.
Be sure to call Dispose() to finalize the MPI environment before exiting!
This simple program initializes MPI and writes out the rank of each processor:
using MPI;
public class Hello
{
static void Main(string[] args)
{
using (MPI.Environment env = new MPI.Environment(ref args))
{
System.Console.WriteLine("Hello, from process number "
+ MPI.Communicator.world.Rank.ToString() + " of "
+ MPI.Communicator.world.Size.ToString());
}
}
}
Finalizes the MPI environment. Users must call this routine to shut down MPI.
Verifies that the MPI environment has been finalized by calling Dispose().
Terminates all processes.
An error code that will be returned to the invoking environment.
Translates an MPI error code into an appropriate exception, then throws that exception.
The MPI error code, returned from one of the class's MPI routines.
The level of threading support actually provided by MPI.
Determine whether the MPI environment has been initialized.
Determine whether the MPI environment has been finalized.
The level of threading support provided by the MPI library.
This value describes whether and how the MPI library can be
used in multi-threaded programs. The threading level is
requested when the MPI library is initialized in the
constructor.
Determines whether the calling thread is the main MPI thread. Will return
true for the thread that called the constructor
to initialize MPI. The main thread is particularly important when the threading
mode is , because in that model only the
main thread can invoke MPI routines.
Returns the name of the currently executing processor.
This name does not have any specific form, but typically
identifies the computere on which the process is executing.
Returns the time, in seconds, since some arbitrary time in the past.
This value is typically used for timing parallel applications.
Returns the resolution of , in seconds.
Determines whether the value is synchronized
across all MPI processes (i.e., if is a global
value).
Returns the maximum allowed tag value for use with MPI's
point-to-point operations.
Returns the rank of the "host" process, if any.
Returns the rank of the process (or processes) that can perform I/O via the
normal language facilities. If no such rank exists, the result will be null; if
every process can perform I/O, this will return the value
.
A GraphCommunicator is a form of where the processes are
connected in an arbitrary graph topology.
With a GraphCommunicator, the topology of the processes is specified as an arbitrary graph,
where each process will communicate with its neighbors in the graph. Graph topologies are
more general than the Cartesian topology provided by a ,
but they also provide less information to the user and the underlying MPI implementation.
Returns a recommended configuration for a new Graph communicator.
The existing communicator.
An array of edges as for the constructor .
The new rank of the calling process.
Constructs a new Graph communicator.
An existing communicator from which to construct the Graph communicator.
A jagged array of adjacency information (so, for example, process i is adjacent to all
of the processes whose ranks are listed in edges[i]).
Whether the ranking may be reordered or not.
Retrieve the neighbors of another process.
The rank of the process to be queried.
The neighbors of the process.
The array of adjacency information. Entry x in Edges[i][j] indicates i is adjacent to x.
The number of edges in the communicator.
The neighbors of the current process.
An exception thrown when an MPI message has been truncated on receive.
Create a new exception stating that a received message has been truncated.
The message associated with this exception.
A reduction operation that combines two values to produce a third value.
Reduction operations are used by various collective operations such as
.
Note that any operation used as a reduction operation must be associative,
e.g., op(x, op(y, z)) == op(op(x, y), z). These operations need not be
commutative.
Structure sent on the main MPI communicator for the
class to indicate that serialized data will be coming on the shadow communicator.
The tag of the message containing the serialized data, which will come via
the shadow communicator.
Number of bytes in the serialized data.
The Operation class provides reduction operations for use with the
reduction collectives.
The Operation class is used with the reduction collective communication operations, such as
. For example,
the property is a delegate that adds two values of type
, while returns the minimum of the
two values. The reduction operations provided by this class should be
preferred to hand-written reduction operations (particularly for built-in types)
because it enables additional optimizations in the MPI library.
The Operation class also has a second role for users that require
access to the low-level MPI interface. Creating an instance of the Operation
class will find or create an appropriate MPI_Op for that reduction
operation. This MPI_Op, accessible through the property,
can be used with low-level MPI reduction operations directly.
The type of data used in these operations.
Synthesize a new mpiDelegateMethod associated with a given operation.
The name of the mpiDelegateMethod to build, e.g., "add".
The OpCode used for primitive types.
The name of the overloaded mpiDelegateMethod used for class types.
Returns a new delegate implementing the given operation.
Cached intermediate of the reduction operation that computes the minimum of
two values.
Cached intermediate of the reduction operation that computes the maximum of
two values.
Cached intermediate of the reduction operation that adds two values.
Cached intermediate of the reduction operation that multiplies two values.
Cached intermediate of the reduction operation that computes the logical
AND of two values.
Cached intermediate of the reduction operation that computes the logical
OR of two values.
Cached intermediate of the reduction operation that computes the bitwise
AND of two values.
Cached intermediate of the reduction operation that computes the bitwise
OR of two values.
Cached intermediate of the reduction operation that computes the bitwise
exclusive OR of two values.
The MPI datatype classification of the type .
Retrieves the kind of datatype for the type .
Used only to initialize .
Determine the predefined MPI_Op that is associated with
this reduction operation. If no such MPI_Op exists,
returns .
When true, we will use user-defined MPI operations generated on-the-fly for
reduction operations on value types. Otherwise, we will use the more generic,
static MPI operations.
The dynamically-generated method that provides a delegate with a
signature compatible with MPI_User_function that calls
the user's repeatedly.
Creates a new MPI delegate from a reduction operation.
Create a user-defined MPI operation based on the given reduction operation.
The reduction operation.
Free the MPI operation that this object wraps, but only if it is not a
predefined MPI operation.
The wrapper around the user's reduction operation.
The actual MPI_Op corresponding to this operation.
Reduction operation that computes the minimum of two values.
Reduction operation that computes the maximum of two values.
Reduction operation that adds two values.
Reduction operation that multiply two values.
Reduction operation that computes the logical AND of two values,
including integral types.
Reduction operation that computes the logical OR of two values,
including integral types.
Reduction operation that computes the bitwise AND of two values.
Reduction operation that computes the bitwise OR of two values.
Reduction operation that computes the bitwise exclusive OR of two values.
The MPI operation that can corresponds to the user's reduction operation,
This operation may be either a predefined MPI reduction operation or a
user-defined MPI_Op created by the Operation constructor.
The kind of MPI datatype. MPI classifies the predefined data types into
several different categories. This classification is used primarily to determine
which predefined reduction operations are supported by the low-level MPI
implementation.
C integer types, such as the predefined integral types in C# and .NET.
Fortran integer types. At present, there are no C# or .NET types that
are classified this way.
Floating point types, such as the predefined float and double types.
The MPI logical type. At present, there are no C# or .NET types that
are classified this way.
The MPI complex type. At present, there are no C# or .NET types that
are classified this way.
The MPI byte type, which corresponds to the byte type in C#.
Any type that does not fit into one of the other MPI datatype classifications.
Wraps a to provide an MPI-compatible interface
for use with .
Construct a new reduction operation wrapper.
Applies a reduction operation to each of the values in and
, writing the results back into the corresponding
position in .
Incoming values of type T.
Incoming values of type T. The results of the reduction
operation will be written back to this memory.
The length of the and arrays.
The MPI datatype for the data stored in and .
This should be the same as the intermediate of applied to the
type T.
The result of a comparison between two MPI objects.
The two MPI objects are identical.
The two MPI objects are not identical, but they have the same properties.
For example, two s that contain the same set of
processes with the same ranks.
The two MPI objects are similar, but are not identical and do not match
exactly. For example, two s that contain the
same set of processes but with different rank order.
The two MPI objects are different.
Contains information about a specific message transmitted via MPI.
Constructs a Status
object from a low-level structure.
Determine the number of elements transmitted by the communication
operation associated with this object.
The type of data that will be stored in the message.
If the type of the data is a value type, returns the number
of elements in the message. Otherwise, returns null,
because the number of elements stored in the message won't
be known until the message is received.
The low-level MPI status object.
The rank of the process that sent the message.
The tag used to send the message.
Whether the communication was cancelled before it completed.
Information about a specific message that has already been
transferred via MPI.
Constructs a Status
object from a low-level structure
and a count of the number of elements received.
Determines the number of elements in the transmitted message.
The number of elements in the message.
Provides a mapping from .NET types to their corresponding MPI datatypes.
This class should only be used by experts in both MPI's low-level (C)
interfaces and the interaction between managed and unmanaged code in .NET.
Builds a new MPI datatype by using reflection on the given type.
Get the MPI datatype associated with the given type.
The type for which we want to build or find an MPI datatype.
if there is no corresponding MPI
datatype for this type. Otherwise, returns the MPI datatype that can be
used to transfer objects of this type without serialization.
Builds a dictionary containing all of the built-in datatypes.
Contains a mapping from value types to their MPI datatype equivalents
Placeholder type that is used to indicate that data being sent by one of the
low-level MPI routines is packed by MPI.
Advanced users can explicitly pack data to be transmitted via MPI with the
routine, then unpack that data via
.