Reputation: 6614
This is the first time I am getting an error while executing MPI_Finalize(). I think the communication is causing the problem but I don't know what makes it to happen.
When I run it on 1 processor, it works fine but on 2 or more processors, I am getting an segmentation fault..
The error message is
[seismicmstm:32604] *** Process received signal ***
[seismicmstm:32604] Signal: Segmentation fault (11)
[seismicmstm:32604] Signal code: (128)
[seismicmstm:32604] Failing at address: (nil)
[seismicmstm:32604] [ 0] /lib64/libpthread.so.0 [0x311c60eb10]
[seismicmstm:32604] [ 1] /usr/local/openmpi-1.4.2/lib/libopen-pal.so.0(opal_memo ry_ptmalloc2_int_malloc+0x2f4) [0x2b6955551794]
[seismicmstm:32604] [ 2] /usr/local/openmpi-1.4.2/lib/libopen-pal.so.0 [0x2b6955 553543]
[seismicmstm:32604] [ 3] /lib64/libc.so.6(__libc_calloc+0x330) [0x311ba74bc0]
[seismicmstm:32604] [ 4] /lib64/ld-linux-x86-64.so.2 [0x311b609d65]
[seismicmstm:32604] [ 5] /lib64/ld-linux-x86-64.so.2 [0x311b605a9c]
[seismicmstm:32604] [ 6] /lib64/ld-linux-x86-64.so.2 [0x311b6076e1]
[seismicmstm:32604] [ 7] /lib64/ld-linux-x86-64.so.2 [0x311b610bb6]
[seismicmstm:32604] [ 8] /lib64/ld-linux-x86-64.so.2 [0x311b60ce06]
[seismicmstm:32604] [ 9] /lib64/ld-linux-x86-64.so.2 [0x311b6105bc]
[seismicmstm:32604] [10] /lib64/libc.so.6 [0x311bb08df0]
[seismicmstm:32604] [11] /lib64/ld-linux-x86-64.so.2 [0x311b60ce06]
[seismicmstm:32604] [12] /lib64/libc.so.6(__libc_dlopen_mode+0x47) [0x311bb08f57 ]
[seismicmstm:32604] [13] /lib64/libpthread.so.0 [0x311c60f1dc]
[seismicmstm:32604] [14] /lib64/libpthread.so.0 [0x311c60f2f0]
[seismicmstm:32604] [15] /lib64/libpthread.so.0(__pthread_unwind+0x40) [0x311c60 d160]
[seismicmstm:32604] [16] /lib64/libpthread.so.0 [0x311c607985]
[seismicmstm:32604] [17] /usr/local/openmpi-1.4.2/lib/openmpi/mca_btl_openib.so [0x2b695869d22b]
[seismicmstm:32604] [18] /lib64/libpthread.so.0 [0x311c60673d]
[seismicmstm:32604] [19] /lib64/libc.so.6(clone+0x6d) [0x311bad3f6d]
[seismicmstm:32604] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 32604 on node seismicmstm.cluster exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
All I am doing in the code is scattering, gathering and broadcasting the data. Can anyone tell me how to debug it....
Upvotes: 0
Views: 4754
Reputation: 1342
There are two possible reasons: 1) your MPI_Finalize is bad: Check that the MPI library is working fine by running an example code like CPI that is included in the MPI distribution. If you dont have access to the distribution, you can either download the tar file and extract the CPI code or download any simple Hello World app from the web. I highly recommend http://www.citutor.org/ If the sample code works, your MPI library is fine and your code is wrong. If not, the library is not properly working. Download your choice of implementation and compile another copy.
2) The code is not dying (segfault) in MPI_Finalize but somewhere before MPI_Finalize. Can you confirm the segfault occurs in MPI_Finalize and not before?
Upvotes: 1