MPI_Allgather和动态结构

我想用MPI_Allgather()发送一个结构数组,但我的结构有一个动态数组:

 typedef struct { float a; int* b; } structure_t; 

我的结构通过以下方式初始化:

  structure_t *resultat = (structure_t*) malloc( sizeof( structure_t ) + n * sizeof( int ) ); 

但是如何使用MPI_Allgather发送我的结构? 如何创建两个(发送和接收)数组?