[mpich-discuss] discuss Digest, Vol 8, Issue 40

Wesley Bland wbland at mcs.anl.gov
Tue Jun 25 07:39:48 CDT 2013


The problem is that all of the processes other than rank 0 are not seeing the data that is entered on the command line. They're falling directly through to your receive call and therefore their per_process_data is 0 and they aren't allocating a buffer for the data that needs to be received.

The usual way of getting input from a user is not via command line input in a parallel program, but via a file in the filesystem. If the file is shared among all of the MPI processes (such as with a shared file system like NFS), then they can all read it directly. If not, then rank 0 could read the file and send all the data to the other ranks individually, which I believe is more like what you're trying to do. The problem is that you need to tell the other ranks how much data will be sent first so they can allocate an appropriate buffer.

By the way, in the future when you see the error Segmentation fault, you can usually debug things your self very simply by using 'gdb' or 'ddd'. Often your program will generate a core file (something like 1234.core) that you can pass into 'gdb' or 'ddd' to discover where the problems are. If you aren't familiar with those debugging programs, there should be plenty of tutorials on the web that can help you familiarize yourself.

Thanks,
Wesley

On Jun 25, 2013, at 3:33 AM, pradnya dixit <pradnya.dixit123 at gmail.com> wrote:

> 
> Hello,
> 
>       I am trying to send chunk of data using send and recv funcions in mpi.. but facing so many problem or errors like
> 
> 
> Elements of rank 1 are:
> [pradnya-Lenovo-G570:04553] *** Process received signal ***
> [pradnya-Lenovo-G570:04553] Signal: Segmentation fault (11)
> [pradnya-Lenovo-G570:04553] Signal code: Address not mapped (1)
> [pradnya-Lenovo-G570:04553] Failing at address: 0x8be8950
> [pradnya-Lenovo-G570:04554] *** Process received signal ***
> [pradnya-Lenovo-G570:04554] Signal: Segmentation fault (11)
> [pradnya-Lenovo-G570:04554] Signal code: Address not mapped (1)
> [pradnya-Lenovo-G570:04554] Failing at address: 0x8be8960
> [pradnya-Lenovo-G570:04552] *** Process received signal ***
> [pradnya-Lenovo-G570:04552] Signal: Segmentation fault (11)
> [pradnya-Lenovo-G570:04552] Signal code: Address not mapped (1)
> [pradnya-Lenovo-G570:04552] Failing at address: 0x8be86f8
> [pradnya-Lenovo-G570:04553] [ 0] [0xff440c]
> [pradnya-Lenovo-G570:04553] [ 1] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0xc66e37]
> [pradnya-Lenovo-G570:04553] [ 2] lst() [0x8048871]
> [pradnya-Lenovo-G570:04553] *** End of error message ***
> [pradnya-Lenovo-G570:04552] [ 0] [0x57c40c]
> [pradnya-Lenovo-G570:04552] [ 1] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x126e37]
> [pradnya-Lenovo-G570:04552] [ 2] lst() [0x8048871]
> [pradnya-Lenovo-G570:04552] *** End of error message ***
> [pradnya-Lenovo-G570:04554] [ 0] [0xd0740c]
> [pradnya-Lenovo-G570:04554] [ 1] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x27de37]
> [pradnya-Lenovo-G570:04554] [ 2] lst() [0x8048871]
> [pradnya-Lenovo-G570:04554] *** End of error message ***
> --------------------------------------------------------------------------
> mpirun noticed that process rank 2 with PID 4553 on node pradnya-Lenovo-G570 exited on signal 11 (Segmentation fault)
> 
> 
> so plz guide me.
> check given attachment.
> 
> thank you.
> <last.c>_______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss




More information about the discuss mailing list