<div dir="ltr">Hi Adolph,<br><br>What are the results of running make test after you've completed PETSc installation? Do those tests pass? If so, you should try copying over an example makefile and using that to build your code. If they fail, something is wrong with your PETSc installation and you should send a copy of your configure.log to <a href="mailto:petsc-maint@mcs.anl.gov">petsc-maint@mcs.anl.gov</a> for more help.<br>
<br><a href="http://www-unix.mcs.anl.gov/petsc/petsc-as/documentation/installation.html">http://www-unix.mcs.anl.gov/petsc/petsc-as/documentation/installation.html</a><br><br>A SIGSEGV is a segmentation violation, usually caused by your program attempting to access a zero'd memory location. You can run it through the debugger to get a better feel for what's not being initialized, but I think in this case it wouldn't be too helpful.<br>
<br>~A<br><br><div class="gmail_quote">On Mon, Jul 28, 2008 at 7:29 AM, Adolph J. Vogel <span dir="ltr"><<a href="mailto:ajvogel@tuks.co.za">ajvogel@tuks.co.za</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I'm having trouble when running a hello world example program with PETSc.<br>
Running the same type of program with plain MPI works. This lead me to<br>
believe that the error lies with my PETSc setup.<br>
<br>
I get the following error:<br>
<br>
$ ./hello<br>
MPI process rank 0 (n0, p28410) caught a SIGSEGV in MPI_Comm_rank.<br>
Rank (0, MPI_COMM_WORLD): Call stack within LAM:<br>
Rank (0, MPI_COMM_WORLD): - MPI_Comm_rank()<br>
Rank (0, MPI_COMM_WORLD): - main()<br>
<br>
and:<br>
<br>
$ mpirun -np 2 hello<br>
-----------------------------------------------------------------------------<br>
One of the processes started by mpirun has exited with a nonzero exit<br>
code. This typically indicates that the process finished in error.<br>
If your process did not finish in error, be sure to include a "return<br>
0" or "exit(0)" in your C code before exiting the application.<br>
<br>
PID 28430 failed on node n0 (<a href="http://127.0.0.1" target="_blank">127.0.0.1</a>) due to signal 11.<br>
-----------------------------------------------------------------------------<br>
<br>
Does anyone have any idea what the error might be?<br>
<br>
Thank you in advance.<br>
<br>
Adolph<br>
<br>
PS: hello.c:<br>
#include "petsc.h"<br>
#include <stdio.h><br>
<br>
int main( int argc, char *argv[] )<br>
{<br>
PetscInitialize( &argc, &argv, 0, 0 );<br>
PetscPrintf( PETSC_COMM_WORLD, "Hello World\n" );<br>
PetscFinalize();<br>
return 0;<br>
}<br>
<font color="#888888"><br>
--<br>
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/<br>
Adolph J. Vogel <a href="mailto:ajvogel@tuks.co.za">ajvogel@tuks.co.za</a><br>
<br>
Department Mechanical and Aeronautical Engineering<br>
University of Pretoria, South Africa<br>
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/<br>
<br>
</font></blockquote></div><br></div>