Hi,
When I commit a struct, I got run time error says "invalid datatype argument".
Does any one can tell me why? Here is the source code
MPI::Datatype MPI_A, types[2] = {MPI::INT, MPI::INT};
int blockLength[2] = {1, 1};
MPI::Aint local[2];
MPI::Aint lb, extent;
MPI::INT.Get_extent(lb, extent);
local[0] = (MPI_Aint) 0;
local[1] = extent;
MPI_A.Create_struct(2, blockLength, local, types);
MPI_A.Commit();
Thanks.
Lingyan
|