⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 高教出版社的《并行算法实践》一书的源代码
💻 TXT
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -