readme.txt
来自「一个MPI程序」· 文本 代码 · 共 45 行
TXT
45 行
Dear KT:
> heatdis-MN0-pq is the standard send-recv version.
> heatdis-IMN0-pq is the non-blocking version.
PS.
I have writen 5-6 versions of this mpi-program. Through this course, I learned quite a few things^-^
At the very begining, I completely used my own way to implement the sequential version and corresponding mpi-program. However, after testing the sequential program, I found some sequential optimizing methods are needed as follows:
1) Array is no good. In your sequential progrm, the space is created by two-level pointers.
2) a > b is slower than b < a, especially when this is checked for 100000000(=3000*200*200) times.
3) assignment (=) operator is a very time-wasted sentence, especially when it is done for 100000000 times.
4) the performances of the following two versions are quite different.
for(k=0;k<10000;k++)
for(I = 0;i<200;i++)
for(j = 0; j<200;j++)
{
a +=d;
b +=c;
}
and
for(k=0;k<10000;k++)
{
for(i = 0;i<200;i++)
for(j = 0; j<200;j++)
{
a +=d;
}
for(i = 0;i<200;i++)
for(j = 0; j<200;j++)
{
b +=c;
}
}
After that, I also found some probs in my parallel versions.
1) the order of the send and receive is very important, not only because of avoiding dead-lock, but also impoving performance.
Anyway, my final parallel program runs well.^_^
BTW, KT, I really appreciate your help!
sdi
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?