以与MPI_Gather相似的补充方式,MPI_Allreduce将归约值并将结果分配给所有进程。 函数原型如下: MPI_Allreduce( void*send_data, void*recv_data, intcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm communicator) MPI_Allreduce等效于先执行MPI_Reduce,然后执行MPI_Bcast。 很简单,对吧? 使用MPI_Allred...