[MPI] request::test() crashes or returns garbage

Hi,
I'm having some problem with nonblocking p2p communications. This is
with boost 1.47 and openmpi-1.5.3 compiled with icpc 12.0.3. Here's an
example that exhibits the problem:
#include

Hi Patrik,
On Thu, Nov 17, 2011 at 00:09, Patrik Jonsson
I'm having some problem with nonblocking p2p communications. This is with boost 1.47 and openmpi-1.5.3 compiled with icpc 12.0.3.
I tried to run your example on my Ubuntu 11.04 box (GCC 4.5.2, OpenMPI
1.4.3, both coming from the main Ubuntu packages) and get no error:
$ mpirun -np 3 --gmca btl tcp,self ./a.out
Task 2 posting recv from 0
Task 2 sending to 0
Task 0 posting recv from 1
Task 1 posting recv from 0
Task 0 sending to 1
Task 1 sending to 0
Task 2 posting recv from 1
Task 2 sending to 1
Task 0 posting recv from 2
Task 0 sending to 2
Task 1 posting recv from 2
Task 1 sending to 2
Task 1 received message tag 13 from task 0
Task 2 received message tag 13 from task 1
Task 1 received message tag 13 from task 2
I have tried up to "-np 8" without any problem.
Note that the final loop does not receive all pending messages, but
that's because the final "for" loop only does one pass over
"handshake_reqs_". If I substitute it with the following, all
messages are received correctly:
// receive all messages in final loop
while (not handshake_reqs_.empty()) {
int i = 0;
while(i

HI Ricardo,
Thanks for responding. I'm beginning to suspect this is because of
some library mismatch, since the C version works correctly for me.
Where does the build pick up the location of the MPI library? I just
want to make sure it's finding the same version I'm linking to.
cheers,
/Patrik
On Fri, Nov 18, 2011 at 8:59 AM, Riccardo Murri
Hi Patrik,
On Thu, Nov 17, 2011 at 00:09, Patrik Jonsson
wrote: I'm having some problem with nonblocking p2p communications. This is with boost 1.47 and openmpi-1.5.3 compiled with icpc 12.0.3.
I tried to run your example on my Ubuntu 11.04 box (GCC 4.5.2, OpenMPI 1.4.3, both coming from the main Ubuntu packages) and get no error:
$ mpirun -np 3 --gmca btl tcp,self ./a.out Task 2 posting recv from 0 Task 2 sending to 0 Task 0 posting recv from 1 Task 1 posting recv from 0 Task 0 sending to 1 Task 1 sending to 0 Task 2 posting recv from 1 Task 2 sending to 1 Task 0 posting recv from 2 Task 0 sending to 2 Task 1 posting recv from 2 Task 1 sending to 2 Task 1 received message tag 13 from task 0 Task 2 received message tag 13 from task 1 Task 1 received message tag 13 from task 2
I have tried up to "-np 8" without any problem.
Note that the final loop does not receive all pending messages, but that's because the final "for" loop only does one pass over "handshake_reqs_". If I substitute it with the following, all messages are received correctly:
// receive all messages in final loop while (not handshake_reqs_.empty()) { int i = 0; while(i
# sample output $ mpirun -np 3 --gmca btl tcp,self ./a.out Task 0 posting recv from 1 Task 0 sending to 1 Task 1 posting recv from 0 Task 2 posting recv from 0 Task 2 sending to 0 Task 0 posting recv from 2 Task 0 sending to 2 Task 1 sending to 0 Task 2 posting recv from 1 Task 2 sending to 1 Task 1 posting recv from 2 Task 1 sending to 2 Task 2 received message tag 13 from task 0 Task 2 received message tag 13 from task 1 Task 0 received message tag 13 from task 1 Task 0 received message tag 13 from task 2 Task 1 received message tag 13 from task 0 Task 1 received message tag 13 from task 2
Best regards, Riccardo _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi Patrik,
On Fri, Nov 18, 2011 at 16:30, Patrik Jonsson
Thanks for responding. I'm beginning to suspect this is because of some library mismatch, since the C version works correctly for me. Where does the build pick up the location of the MPI library?
The build process uses the mpic++/mpicxx/mpiCC compiler wrapper, which then inserts the correct "-I"/"-L" switches for the real C++ compiler. The build process searches for "mpic++", "mpiCC" and "mpicxx" in this order; look into `tools/build/v2/tools/mpi.jam` for details. If you want to force the use of a specific `mpic++`, you can append this line to the `user-config.jam` file: using mpi : /path/to/preferred/mpicxx ; Best regards, Riccardo

Ok, figured it out. As I suspected, there was a mismatch, not with
libraries but with the headers. Boost built correctly, but when I
compiled my program it found headers from a different OpenMPI build
and used those.
Thanks for your assistance and sorry for the noise.
Regards,
/Patrik
On Fri, Nov 18, 2011 at 11:26 AM, Riccardo Murri
Hi Patrik,
On Fri, Nov 18, 2011 at 16:30, Patrik Jonsson
wrote: Thanks for responding. I'm beginning to suspect this is because of some library mismatch, since the C version works correctly for me. Where does the build pick up the location of the MPI library?
The build process uses the mpic++/mpicxx/mpiCC compiler wrapper, which then inserts the correct "-I"/"-L" switches for the real C++ compiler.
The build process searches for "mpic++", "mpiCC" and "mpicxx" in this order; look into `tools/build/v2/tools/mpi.jam` for details.
If you want to force the use of a specific `mpic++`, you can append this line to the `user-config.jam` file:
using mpi : /path/to/preferred/mpicxx ;
Best regards, Riccardo _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Patrik Jonsson
-
Riccardo Murri