Sorry for the delay in replying. You might want to run your code through a debugger, particularly a memory-checking debugger. Your stack trace shows that it's segv'ing in main(), so it might not be that difficult to find.
On Mar 8, 2011, at 12:48 AM, arep isa wrote: > Hi, > I need to use Open MPI to distribute 2d-array in the PGM file among 10 > working computers. Then I need to manipulate each value of the array > to get a negative image (255-i) and then print the output back. I'm > thinking of using mpi_scatterv and mpi_gatherv to distribute the data. > After i compile the program, it got segmentation faults. I dont know > what is the problem whether my code wrong or compiler. I integrate the > code to read/write pgm from pgm_RW_1.c and the MPI code in exmpi_2.c. > > --I install OPEN MPI version 1.4.1-2 via Synaptic Package Manager on > UBUNTU 10.04. > > --I compile with : > mpicc -o exmpi_2 exmpi_2.c > --I run for testing (segmentation faults): > mpirun -np 10 ./exmpi_2 2.pgm out.pgm > --Then I run with hostfile: > mpirun -np 10 --hostfile .mpi_hostfile ./exmpi_2 2.pgm out.pgm > > > Here is the error: > ____________________________________________________________________________ > arep@ubuntu:~/Desktop/fyp$ mpirun -np 10 ./exmpi_2 2.pgm out.pgm > [ubuntu:02948] *** Process received signal *** > [ubuntu:02948] Signal: Segmentation fault (11) > [ubuntu:02948] Signal code: Address not mapped (1) > [ubuntu:02948] Failing at address: (nil) > [ubuntu:02948] [ 0] [0x792410] > [ubuntu:02948] [ 1] ./exmpi_2(main+0x1f6) [0x8048d2a] > [ubuntu:02948] [ 2] > /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x126bd6] > [ubuntu:02948] [ 3] ./exmpi_2() [0x8048aa1] > [ubuntu:02948] *** End of error message *** > -------------------------------------------------------------------------- > mpirun noticed that process rank 0 with PID 2948 on node ubuntu exited > on signal 11 (Segmentation fault). > -------------------------------------------------------------------------- > > ____________________________________________________________________________ > Here is the input 2.pgm image : > http://orion.math.iastate.edu/burkardt/data/pgm/balloons.pgm > > TQ for your help. > <pgmmpi.tar.gz>_______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/