有什么区别MPI_Allgather()
and MPI_Allgatherv()
?
来自MPI标准 http://www.mpi-forum.org/docs/
MPI_GATHERV 扩展了功能
MPI_GATHER 通过允许变化
每个进程的数据计数,因为
recvcounts 现在是一个数组。它也是
允许更灵活地选择在哪里
数据被放置在根上,通过
提供新的论点,displs
MPI_ALLGATHERV 是其扩展。
这两个函数的签名是
int MPI_Allgather(void * sendbuff, int sendcount, MPI_Datatype sendtype,
void * recvbuf, int recvcount, MPI_Datatype recvtype,
MPI_Comm comm)
int MPI_Allgatherv(void * sendbuff, int sendcount, MPI_Datatype sendtype,
void * recvbuf, int * recvcounts, int * displs,
MPI_Datatype recvtype, MPI_Comm comm)
您可以使用以下命令为每个进程的数据指定大小和目标偏移量recvcounts
and displs
使用 v 变体。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)