I am having a problem where I cannot set the target_disp parameter to a positive value in any of the 1-sided calls I've tried (EG: MPI_Put, MPI_Get, MPI_Fetch_and_op, etc.)
I am trying to use a shared (lock_all) approach with flushes. When I set target_disp to zero, the messaging works fine as expected. If I use a positive value I always get a Seg fault.
Obligatory disclaimer: I am not a c or MPI expert so it's entirely possible I've made some newbie error here. But I am at my wit's end trying to figure this out and could use help.
Info: MPICH 3.0.4 built on Ubuntu 12.04 LTS running one node on Intel® Core™ i5-3570K CPU @ 3.40GHz × 4
I've attached the code I've isolated to show the problem. With the targetDisp int set to 0, the data is properly transferred. If it is set to 1, or sizeof(int), I get the following seg fault from mpiexec for targetDisp>0.
corey@UbuntuDesktop:~/workspace/TargetDispBug/Release$ mpiexec -n 2 ./TargetDispBug
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= EXIT CODE: 139
= CLEANING UP REMAINING PROCESSES
= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions
corey@UbuntuDesktop:~/workspace/TargetDispBug/Release$ mpiexec -n 2 ./TargetDispBug
Received: 42.