开发者

Open MPI Sending structure C

Is it poss开发者_JAVA百科ible to send a structure as a datatype in Open MPI?


Yes, have a look first at MPI_TYPE_CREATE_STRUCT, or if your implementation does not include MPI-2 features, the older MPI_TYPE_STRUCT.


Yes, but you'll need to define a new MPI datatype that desribes the memory layout of your struct. More info here.


If you are using C and your cluster uses the same hardware on every node you can memcopy the structs in and out of an MPI_BYTE array when passing them around. You do have to be careful of offsets and endian issues. Works for one of "script" type programs but you would never want to do this in production unless you had a standard API for marshalling.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜