当前位置: 首页 > 工具软件 > Open MPI > 使用案例 >

Kubernetes之AllReduce任务调度 (CPU+GPU环境) --【D-10/14】Open MPI集群之MPI_Bcast函数测试

宰宣
2023-12-01

Abstract

The Open MPI cluster is ready. This blog will make use of the MPI_Bcast() function in the Open MPI cluster. Tomorrow we are going to compare the complexity and the source code implementation of them.


1. Implement Our Own MPI Broadcast Function

Section one is going to implement our own MPI Broadcast function, i.e., naive_bcast.c.

First, one naive implementation of MPI Broadcast function is to make use of MPI primitives: MPI_Send() and MPI_Recv(). Assume that we requested 4 CPU cores via Open MPI, we want to broadcast a message across all 4 CPU cores. A naive idea is to choose one CPU core as a message sender and the other CPU cores are message receivers.

Second, we compiled the

 类似资料: