[英]Different time measurements with MPI
I am getting different time measurements every time I run my MPI application. 每次我运行MPI应用程序时,都会得到不同的时间度量。 I am measuring time like this:
我正在这样测量时间:
MPIt1 = MPI_Wtime();
// do work
MPIt2 = MPI_Wtime();
MPIelapsed = MPIt2 - MPIt1;
The behavior is same, with or without MPI_Barrier(MPI_COMM_WORLD);
无论是否
MPI_Barrier(MPI_COMM_WORLD);
行为都是相同的MPI_Barrier(MPI_COMM_WORLD);
. 。 The result of the program, of course, is correct every time the executable runs.
当然,每次可执行文件运行时,程序的结果都是正确的。
Check the extreme difference I got for a 5x5 matrix: 检查我得到的5x5矩阵的极端差异:
0.00025 seconds // first run
0.10728 seconds // second run
Moreover, the problem is occurring with larger matrices, like this 2000x2000: 此外,较大的矩阵(例如2000x2000)正在发生此问题:
0.55996 seconds // first run
0.83657 seconds // second run
Am I measuring the time in a wrong way? 我是用错误的方式测量时间吗? Or is this a knowing issue with MPI?
还是这是MPI的已知问题? Note that the time is reported only from the master node.
请注意,时间仅从主节点报告。
I am running the program in another computer, where I have logged in with ssh
. 我正在另一台使用
ssh
登录的计算机上运行该程序。 I recall getting faster execution when I was actually sitting in that computer. 我记得当我实际上坐在那台计算机上时,执行速度更快。 I am the only user logged in:
我是唯一登录的用户:
gsamaras@pythagoras:~/konstantis/cholesky$ who
gsamaras my internet connection
gsamaras@pythagoras:~/konstantis/cholesky$
EDIT with many runs: 多次运行编辑 :
1.6035
0.422967
1.53891
0.347107
0.761991
1.22824
0.934829
0.45618
0.794225
0.554099
1.09323
0.421858
0.621015
0.889867
0.613867
0.459144
2.02273
0.67689
2.2390
1.0448
0.751333
EDIT _2 编辑 _2
From a colleague and Patrick I concluded that: 我从一位同事和帕特里克得出结论:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.