title: MPI: Error while executing MPI_Finalize()
body: <p>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.</p>
  
  <p>When I run it on 1 processor, it works fine but on 2 or more processors, I am getting an segmentation fault..</p>
  
  <p>The error message is </p>
  
  <pre><code>[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).
  --------------------------------------------------------------------------
  </code></pre>
  
  <p>All I am doing in the code is scattering, gathering and broadcasting the data.
  Can anyone tell me how to debug it....</p>