MPI-GraphTheory

所属分类:数据结构
开发工具:C/C++
文件大小:721KB
下载次数:113
上传日期:2009-08-24 10:29:27
上 传 者phoenix168
说明:  图论部分的MPI源码,包括传递闭包、连通分量、最短路径和最小生成树,附带说明和测试用例
(Graph Theory part of the MPI source code, including the transitive closure, connected components, shortest path and minimum spanning tree, with instructions and test cases)

文件列表:
15-2\connect.c (4729, 2003-07-15)
15-3\1.txt (30104, 2003-07-14)
15-3\1result.txt (31650, 2003-07-14)
15-3\2.txt (60104, 2003-07-14)
15-3\2result.txt (31607, 2003-07-14)
15-3\3.txt (90104, 2003-07-14)
15-3\3result.txt (31583, 2003-07-14)
15-3\4.txt (120104, 2003-07-14)
15-3\4result.txt (31587, 2003-07-14)
15-3\5.txt (150104, 2003-07-14)
15-3\5result.txt (31593, 2003-07-14)
15-3\6.txt (180104, 2003-07-14)
15-3\6result.txt (31561, 2003-07-14)
15-3\7.txt (210104, 2003-07-14)
15-3\7result.txt (31559, 2003-07-14)
15-3\8.txt (240104, 2003-07-14)
15-3\8result.txt (31586, 2003-07-14)
15-3\9.txt (270104, 2003-07-14)
15-3\9result.txt (31613, 2003-07-14)
15-3\a.txt (300104, 2003-07-14)
15-3\aresult.txt (31598, 2003-07-14)
15-3\shortest.c (6187, 2003-07-14)
15-4\mst.c (4629, 2003-07-14)
15-1\closure.c (5299, 2003-07-14)
15-2 (0, 2008-05-18)
15-3 (0, 2008-05-18)
15-4 (0, 2008-05-18)
15-1 (0, 2008-05-18)

Example: 编译:mpicc connect.c 运行:本实例中使用3个处理器。    mpirun Cnp 3 a.out 运行结果: Input the vertex num: 8 Input the adjacent matrix: 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 0 最终输出结果: Result: 0 0 2 0 0 0 0 0 说明:使用了和上一小节传递闭包时相同的输入矩阵,得到的结果也相同。除顶点2外,其余顶点构成另一个连通分

近期下载者

相关文件


收藏者