Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct st_Data
- {
- int nWRank;
- int nSRank;
- char cName[160];
- int nData;
- };
- MPI_Aint offsets[] = {(MPI_Aint)offsetof(struct st_Data, nWRank), (MPI_Aint)offsetof(struct st_Data, nSRank), (MPI_Aint)offsetof(struct st_Data, cName), (MPI_Aint)offsetof(struct st_Data, nData)};
- MPI_Datatype types[] = {MPI_INT, MPI_INT, MPI_CHAR, MPI_INT};
- int blockcounts[] = {1, 1, 160, 1};
- MPI_Datatype myMPI_Data;
- MPI_Type_struct(4, blockcounts, offsets, types, &myMPI_Data);
- MPI_Type_commit(&myMPI_Data);
- struct st_Data
- {
- int nWRank;
- int nSRank;
- char cName[160];
- int *nData;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement