readme.txt

来自「《并行算法实践》附带的mpi源程序」· 文本 代码 · 共 31 行

TXT
31
字号
1. compile:
mpicc cjacobi.c -o cjacobi -lm

2. run:
mpirun -np 4 cjacobi

3. result:
Input of file "dataIn.txt"
8        8
1.000000        3.000000        4.000000        4.000000        5.000000        6.000000        7.000000        8.000000
3.000000        1.000000        2.000000        2.000000        3.000000        4.000000        5.000000        6.000000
4.000000        2.000000        1.000000        2.000000        3.000000        3.000000        2.000000        1.000000
1.000000        2.000000        3.000000        4.000000        4.000000        6.000000        7.000000        8.000000
4.000000        5.000000        5.000000        6.000000        7.000000        8.000000        1.000000        1.000000
2.000000        2.000000        2.000000        3.000000        4.000000        5.000000        7.000000        3.000000
2.000000        4.000000        5.000000        7.000000        9.000000        0.000000        2.000000        3.000000
1.000000        2.000000        4.000000        6.000000        2.000000        7.000000        8.000000        1.000000
the 0st envalue:-5.539342
the 1st envalue:9.369179
the 2st envalue:2.678424
the 3st envalue:0.378010
the 4st envalue:30.210718
the 5st envalue:-1.180327
the 6st envalue:-10.858351
the 7st envalue:-3.058303

Iteration num = 4
Whole running time    = 0.142161 seconds
Distribute data time  = 0.003757 seconds
Parallel compute time = 0.132369 seconds

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?