MPI Datatype Examples (2)
Rectangular sections are also possible
- A 10´10 section of R would be (C syntax)
MPI_Type_vector(10,10,50,MPI_REAL,&blk1);
- To position this within R, make it a struct
blen[0] = 1; blen[1] = 1;
types[0] = blk1; types[1] = MPI_UB;
displs[0] = 0; displs[1] =sizeof(double);
MPI_Type_struct(2,blen,displs,types,&blk2);
- The MPI_UB lets you place the origin of the section