- 论坛徽章:
- 0
|
刚学的MPI,要求做个程序,没有什么头绪,请高手帮忙
要求写一个MIP程序在4太机器上运行4个进程并打印出最小的进程ID,输出结果是:
Process 0: the smallest process ID xxxx is the one from Process n
Process 1: the smallest process ID xxxx is the one from Process n
Process 2: the smallest process ID xxxx is the one from Process n
Process 3: the smallest process ID xxxx is the one from Process n
输出的顺序无所谓
我知道用 MPI_Allreduce (void *sendbuf, Void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
和 MPI_MINLOC这两个命令比较方便,但是具体怎么用不是很清楚,请高手帮帮忙,谢谢~~~~~~~~
[ 本帖最后由 dolaimi 于 2006-9-6 13:14 编辑 ] |
|