Hi I got a problem of MPI. I donot know whether it can be resolved in boost MPI. My program has 5 processes. All of them can run MPI_Finalize() and return 0. But, the whole program cannot be completed. In the MPI cluster job queue, it is still in running status. If I use 1 process to run it, no problem. Why ? My program: int main (int argc, char **argv) { MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &myRank); MPI_Comm_size(MPI_COMM_WORLD, &mySize); MPI_Comm world; world = MPI_COMM_WORLD; if (myRank == 0) { do some things. } if (myRank != 0) { do some things. } cout << " I am rank " << rank << " I am before MPI_Finalize()" << endl; MPI_Finalize(); cout << " I am rank " << rank << " I am after MPI_Finalize()" << endl; return 0; } I can get the output " I am rank 0 (1, 2, ....) I am before MPI_Finalize() ". and " I am rank 0 I am after MPI_Finalize() " But, other processes do not printed out "I am rank ... I am after MPI_Finalize()" . It is weird. The process has reached the point just before MPI_Finalize(), why they are hanged there ? Are there other better ways to check this ? Any help is appreciated. And, some output files get wrong codes, which can not be readible. In 1-process case, the program can print correct results to these output files . Any help is appreciated. thanks Jack Oct. 24 2010
On 25 Oct 2010, at 16:24, Jack Bryan wrote:
Hi
I got a problem of MPI.
I donot know whether it can be resolved in boost MPI.
My program has 5 processes.
All of them can run MPI_Finalize() and return 0.
But, the whole program cannot be completed.
In the MPI cluster job queue, it is still in running status.
If I use 1 process to run it, no problem.
Why ?
My program:
int main (int argc, char **argv) {
MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &myRank); MPI_Comm_size(MPI_COMM_WORLD, &mySize); MPI_Comm world; world = MPI_COMM_WORLD;
if (myRank == 0) { do some things. }
if (myRank != 0) { do some things. }
cout << " I am rank " << rank << " I am before MPI_Finalize()" << endl;
MPI_Finalize();
cout << " I am rank " << rank << " I am after MPI_Finalize()" << endl; return 0;
}
I can get the output " I am rank 0 (1, 2, ....) I am before MPI_Finalize() ".
and
" I am rank 0 I am after MPI_Finalize() "
But, other processes do not printed out "I am rank ... I am after MPI_Finalize()" .
It is weird. The process has reached the point just before MPI_Finalize(), why they are hanged there ?
Are there other better ways to check this ?
Any help is appreciated.
Hi Jack, does the same happen when you remove the "do some things". My conjecture is that your code might be buggy and overwrite some memory that MPI needs. You can also try to just omit the MPI_Finalize() to see if that is indeed the problem. Another remark though: this is not a Boost.MPI question since you do not use Boost.MPI here. Matthias
participants (2)
-
Jack Bryan
-
Matthias Troyer