01/03/2008
Reduction Operations now on Comm object
Associative reduction operations are now supported on the communication interface. A simple summation example is below:
static int Sum(int left, int right)
{
return left + right;
}
static void Main(string[] args)
{
ProcessorGroup.Process("MPIEnvironment",
delegate(IDictionary<string, Comm> comms)
{
Comm comm = comms["MPI_COMM_WORLD"];
Console.WriteLine("Rank:{0} Result:{1}", comm.Rank,
comm.Reduce<int>(0, comm.Rank, Sum));
});
}