MPI中大小可变的消息 [英] Variable sized message in MPI
本文介绍了MPI中大小可变的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否存在允许使用MPI发送/接收大小可变的消息的库调用?
Is there a library call that would allow for sending/receiving of variable sized messages using MPI?
一种解决方法是在第一条消息中发送数据大小,并在其后跟随实际的有效负载,但是我想知道是否存在将这两个单独的消息组合在一起的约定.
A work around would be to send the data size in the first message and follow it with the actual payload, but I was wondering if there was a convention for combining these two separate messages.
推荐答案
提供给MPI_Recv的计数只是一个上限. MPI_Get_count可用于查找收到的物品的确切数量.
The count provided to MPI_Recv is only an upper bound. MPI_Get_count can be used to find the exact number of items received.
我猜有点类似的插座.
这篇关于MPI中大小可变的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文