我工作的MPI对C.我有我想要序列,并使用MPI集体通信发送到其他节点这个自定义结构(收集,分散,广播)发送一个结构使用MPI集体通信
的结构是如下
typedef struct {
double x[2]; /* Old and new X-axis coordinates */
double y[2]; /* Old and new Y-axis coordinates */
double xf; /* force along X-axis */
double yf; /* force along Y-axis */
double xv; /* velocity along X-axis */
double yv; /* velocity along Y-axis */
double mass; /* Mass of the body */
double radius; /* width (derived from mass) */
} bodyType;
我试图了解关于MPI自定义结构体的序列化,但不能真正理解这个过程。如果有人能帮助我在这里将是巨大的
谢谢
'MPI_Type_struct'是你的朋友! – simpel01
@ simpel01,'MPI_Type_struct'在MPI-2中被弃用,并且在MPI-3中不再存在。应该使用'MPI_Type_create_struct'来代替。 –
anyhelp如何实际使用它们? –