Solve a system with two processors

Barry Smith bsmith at mcs.anl.gov
Tue Jan 9 08:31:08 CST 2007


  Isa,

    The PETSc solvers are all deadlock free, this means that if
used with a proper MPI implementation it will never deadlock
inside the solvers. The easiest way (and best and the one you should
use) to determine what is causing the problem is to use the additional
option -start_in_debugger when the two xterms popup then type 
cont in both debuggers, wait and wait until you think it is stuck
and then do control-c in each window and then where, it will show
you exactly where it is hanging. (Do this with the debug version 
of PETSc, that is config/configure.py should not be run with
--with-debugging=0.

   Good luck,

   Barry

Should become a FAQ question


On Tue, 9 Jan 2007, Isabel Gil wrote:

> Hello PETSc's users!
> 
> I have a problem with my parallel program.
> If I run it with only one processor (mpirun -np 1...), everything is all right
> but if I use 2 processors (mpi -np 2...), the problem appears.
> 
> When I want to solve my matricial system through a solver, after having
> created my matrices without any hitch, I have the following problem:
> 
> The two processes that are running in two different processors using 100% of
> CPU and 14.6% of memory each of them, end up using 0% of CPU and 14.6% of
> memory and, although the program doesn't break down, both of the processes
> don't do anything. This looks like a lockup: one processor is waiting for a
> message from the second one, but the second one thinks that it doesn't have to
> send anything and is instead waiting for something else from the first
> processor.
> 
> But I don't know how to avoid this problem since it is supposed that I don't
> have to use "MPI_Send()" and "MPI_Recv()" functions because PETSc itself deals
> with it, do I?.
> Any advice will be welcome.
> 
> Thanks in advance and best regards
> Isa
> 
> 




More information about the petsc-users mailing list