[英]C++ OpenMPI linked-lists
Currently, I have a nice c++ graph algorithm written with custom struct definitions of linked-lists or arrays of linked-lists (I should turn this into a template definition, but it currently is not). 目前,我有一个很好的c ++图算法,用链接列表或链表列表的自定义结构定义编写(我应该将其转换为模板定义,但目前不是)。 This algorithm can easily be distributed, and I would like to test this.
这个算法很容易分发,我想测试一下。 However, I do not have much OpenMPI experience other than understanding of some basic MPI examples.
但是,除了理解一些基本的MPI示例之外,我没有太多的OpenMPI经验。
Thanks for the guidance and all the help! 感谢您的指导和所有帮助!
The bare interface basically provides a way to send a contiguous region of memory to other nodes in various ways, but will not traverse your linked list for you in order to do it. 裸接口基本上提供了一种以各种方式将连续的内存区域发送到其他节点的方法,但是为了这样做,它不会为您遍历链接列表。
Thus, you need to decide how you want to transmit and receive data based on what makes sense for your algorithm in order to optimize performance. 因此,您需要根据对算法有意义的内容来决定如何传输和接收数据,以便优化性能。 For example, you could send one message per element, or collect many of them and scatter.
例如,您可以为每个元素发送一条消息,或者收集其中的许多消息并进行分散。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.