文件名称:15-4
介绍说明--下载内容均来自于网络,请自行研究使用
Example
编译:mpicc mst.c mst
运行:本实例中使用了5个处理器。
mpirun –np 5 mst
运行结果:
Input the size of matrix:9
0 4 5 8 6 2 5 7 3
5 0 8 3 1 6 4 9 5
7 2 0 6 4 1 3 8 9
4 5 6 0 5 7 2 1 6
4 5 8 7 0 2 3 4 7
4 1 4 7 5 0 7 8 4
7 8 9 3 2 1 0 6 7
4 2 1 4 3 5 8 0 9
5 3 2 8 9 7 6 2 0
最终输出结果:
the MST is:
0 0 0 0 0 2 0 0 0
0 0 0 0 1 1 0 0 0
0 0 0 0 0 1 0 1 2
0 0 0 0 0 0 0 1 0
0 1 0 0 0 2 0 0 0
2 1 1 0 2 0 1 0 0
0 0 0 0 0 1 0 0 0
0 0 1 1 0 0 0 0 0
0 0 2 0 0 0 0 0 0
说明:输出结果为最小生成树的边。
-
Example
Compile: mpicc mst.c mst
Run: The example of the use of the five processors.
mpirun-np 5 mst
Run Results:
Input the size of matrix: 9
045,862,573
508,316,495
720,641,389
456,057,216
458,702,347
414,750,784
789,321,067
421,435,809
532,897,620
The final output:
the MST is:
000,002,000
000,011,000
000,001,012
000,000,010
010,002,000
211,020,100
000,001,000
001,100,000
002 million
Descr iption: The output for the minimum spanning tree edges.
编译:mpicc mst.c mst
运行:本实例中使用了5个处理器。
mpirun –np 5 mst
运行结果:
Input the size of matrix:9
0 4 5 8 6 2 5 7 3
5 0 8 3 1 6 4 9 5
7 2 0 6 4 1 3 8 9
4 5 6 0 5 7 2 1 6
4 5 8 7 0 2 3 4 7
4 1 4 7 5 0 7 8 4
7 8 9 3 2 1 0 6 7
4 2 1 4 3 5 8 0 9
5 3 2 8 9 7 6 2 0
最终输出结果:
the MST is:
0 0 0 0 0 2 0 0 0
0 0 0 0 1 1 0 0 0
0 0 0 0 0 1 0 1 2
0 0 0 0 0 0 0 1 0
0 1 0 0 0 2 0 0 0
2 1 1 0 2 0 1 0 0
0 0 0 0 0 1 0 0 0
0 0 1 1 0 0 0 0 0
0 0 2 0 0 0 0 0 0
说明:输出结果为最小生成树的边。
-
Example
Compile: mpicc mst.c mst
Run: The example of the use of the five processors.
mpirun-np 5 mst
Run Results:
Input the size of matrix: 9
045,862,573
508,316,495
720,641,389
456,057,216
458,702,347
414,750,784
789,321,067
421,435,809
532,897,620
The final output:
the MST is:
000,002,000
000,011,000
000,001,012
000,000,010
010,002,000
211,020,100
000,001,000
001,100,000
002 million
Descr iption: The output for the minimum spanning tree edges.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
15-4\mst.c
....\readme.txt
15-4
....\readme.txt
15-4