j***@gmail.com
2008-10-02 09:40:42 UTC
Hi!
I am debugging an MPI application which makes use of MPI_Barrier()
in a manner similar to this:
do {
MPI_Barrier(MPI_COMM_WORLD);
int result = f();
MPI_Barrier(MPI_COMM_WORLD); // ***
} while(...);
Unfortunately, the function f(), depending on complex conditions,
sometimes enters code branches that call MPI_Barrier() themselves.
Sometimes I wind up with a situation in which all the processors wait
on the barrier marked *** above, while one processor, still in the
computation of f(), hits a barrier that is absolutely unrelated to the
barrier marked ***. Then all sorts of weird things happen, as the
other processors go past the *** barrier, where they should wait for
that other processor. Instead, I would like a deadlock to happen, so
that I could debug the code.
Is there any way I can simulate a "barrier with a tag", so that
different barriers would not pair-up?
Please don't tell me the code design is flawed -- I know that,
that's why I'm trying to debug it, just it would be much easier if I
could equip barriers with a tag so that different barriers would not
pair up.
TIA,
- J.
I am debugging an MPI application which makes use of MPI_Barrier()
in a manner similar to this:
do {
MPI_Barrier(MPI_COMM_WORLD);
int result = f();
MPI_Barrier(MPI_COMM_WORLD); // ***
} while(...);
Unfortunately, the function f(), depending on complex conditions,
sometimes enters code branches that call MPI_Barrier() themselves.
Sometimes I wind up with a situation in which all the processors wait
on the barrier marked *** above, while one processor, still in the
computation of f(), hits a barrier that is absolutely unrelated to the
barrier marked ***. Then all sorts of weird things happen, as the
other processors go past the *** barrier, where they should wait for
that other processor. Instead, I would like a deadlock to happen, so
that I could debug the code.
Is there any way I can simulate a "barrier with a tag", so that
different barriers would not pair-up?
Please don't tell me the code design is flawed -- I know that,
that's why I'm trying to debug it, just it would be much easier if I
could equip barriers with a tag so that different barriers would not
pair up.
TIA,
- J.