<font class="Apple-style-span" face="&#39;Times New Roman&#39;" size="3"><div>    I have one `structure xyz` as given below and i need </div><div>to broadcast it among 20 nodes. so i used `MPI_Bcast()` function </div><div>
to do this. This function requires MPI datatype of corresponding </div><div>structure xyz type as third arguments.</div><div>`struct xyz</div><div>{</div><div> char a;</div><div> int32_t b;</div><div> char c[50];</div><div>
 uint32_t d;</div><div> uchar e[10];</div><div>}`</div><div><br></div><div>So i used `MPI_Type_creat_struct()` function to create a new MPI datatype </div><div>as `MPI_Datatype MPI_my_new_datatype, oldtypes[4];`</div><div>
 where i used MPI datatypes corresponding to above structure members datatype </div><div>as followings</div><div> `oldtypes[4] = {MPI_CHAR, MPI_INT, MPI_UNSIGNED, MPI_UNSIGNED_CHAR};` </div><div><br></div><div>and to craete new datatype i used following arguments in the function..</div>
<div>    MPI_Type_create_struct(4, blockcounts, offsets, oldtypes, &amp;MPI_my_new_datatype);</div><div>    MPI_Type_commit(&amp;MPI_my_new_datatype);</div><div>Now it is compiling but giving run time error as below::</div>
<div><br></div><div>*** An error occurred in `MPI_Type_create_struct`on </div><div>communicator `MPI_COMM_WORLD` </div><div>`MPI_ERR_ARG`: invalid argument of some other kind </div><div>`MPI_ERRORS_ARE_FATAL` (goodbye).</div>
<div><br></div><div>Can any one find out where is the problem?</div></font>