问题描述:
使用mpirun指定多进程运行amg算例时,程序运行时间反而增加
执行命令 time -p mpirun --allow-run-as-root -np 2 ./amg -P 1 2 1 -n 100 100 100 -printstats
输出运行时间 real 42.36 user 80.33 sys 4.15
执行命令 time -p mpirun --allow-run-as-root -np 8 ./amg -P 2 2 2 -n 100 100 100 -printstats
输出运行时间 real 71.89 user 531.72 sys 27.09
根因分析
分析运行日志Running with these driver parameters:
第一次运行该参数为
Running with these driver parameters:
solver ID = 1
Laplacian_27pt:
(Nx, Ny, Nz) = (100, 200, 200)
(Px, Py, Pz) = (1, 2, 2)
第二次运行该参数为
Running with these driver parameters:
solver ID = 1
Laplacian_27pt:
(Nx, Ny, Nz) = (200, 200, 200)
(Px, Py, Pz) = (2, 2, 2)
由于amg运行指定的进程数目要等于运行参数-P Px,Py,Pz三个值的乘积,而算例规模等于Px*nx Py*ny Pz*nz (也就是-P 三个参数与-n 对应三个参数相乘的得出的积作为最终运算规模的三个维度的值)可知,算例规模会随着指定进程数的增大而增大。
查阅软件文档
该软件运行时间随着指定进程的数量增加而小幅度增加,直到趋于稳定
For example, we get the following timing results (in seconds) for a system with a 3D 27-point stencil, distributed on a logical P x Q x R processor topology, with fixed local problem size per process given as 96 x 96 x 96:
P x Q x R procs setup time solve time
---------------------------------------------------------------
8x 8x 8 512 14.91 51.05
16x16x 8 2048 15.31 53.35
32x16x16 8192 16.00 57.78
32x32x32 32768 17.55 65.19
64x32x32 65536 17.49 64.93
问题描述:
使用mpirun指定多进程运行amg算例时,程序运行时间反而增加
执行命令 time -p mpirun --allow-run-as-root -np 2 ./amg -P 1 2 1 -n 100 100 100 -printstats
输出运行时间 real 42.36 user 80.33 sys 4.15
执行命令 time -p mpirun --allow-run-as-root -np 8 ./amg -P 2 2 2 -n 100 100 100 -printstats
输出运行时间 real 71.89 user 531.72 sys 27.09
根因分析
分析运行日志Running with these driver parameters:
第一次运行该参数为
Running with these driver parameters:
solver ID = 1
Laplacian_27pt:
(Nx, Ny, Nz) = (100, 200, 200)
(Px, Py, Pz) = (1, 2, 2)
第二次运行该参数为
Running with these driver parameters:
solver ID = 1
Laplacian_27pt:
(Nx, Ny, Nz) = (200, 200, 200)
(Px, Py, Pz) = (2, 2, 2)
由于amg运行指定的进程数目要等于运行参数-P Px,Py,Pz三个值的乘积,而算例规模等于Px*nx Py*ny Pz*nz (也就是-P 三个参数与-n 对应三个参数相乘的得出的积作为最终运算规模的三个维度的值)可知,算例规模会随着指定进程数的增大而增大。
查阅软件文档
该软件运行时间随着指定进程的数量增加而小幅度增加,直到趋于稳定
For example, we get the following timing results (in seconds) for a system with a 3D 27-point stencil, distributed on a logical P x Q x R processor topology, with fixed local problem size per process given as 96 x 96 x 96:
P x Q x R procs setup time solve time
---------------------------------------------------------------
8x 8x 8 512 14.91 51.05
16x16x 8 2048 15.31 53.35
32x16x16 8192 16.00 57.78
32x32x32 32768 17.55 65.19
64x32x32 65536 17.49 64.93