I'm trying to scatter a 2d boxed array. here is the summerized code:
using (new MPI.Environment(ref args))
{
Intracommunicator comm = Communicator.world;
object[] boxedArrays = new object[] { };
if (comm.Rank == 0)
{
[... //some initialization ]
boxedArrays = new object[comm.size];
for (int p = 0; p < comm.Size; p++)
{
[... //some code to init the array]
boxedArrays[p] = array;
}
}
object myChunk= comm.Scatter(boxedArrays, 0);
var myArray = (int[,])myChunk;
}
When I print myArray it's empty.I tried the other variation of the scatter method but they also didn't work.
I'm using mpi.net sdk with Microsoft HPC Pack 2012.
Scattering messages in MPI.NET
An array of integers is scattered to all ranks, from the rank 0: