Solve a system with two processors

2007-01-09 Thread Isabel Gil
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




Solve a system with two processors

2007-01-09 Thread Barry Smith

  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
 
 




Using library from another linux system

2007-01-09 Thread Satish Balay
On Wed, 10 Jan 2007, Ben Tay wrote:

 Hi,
 
 I've some problems compiling PETSC on one of my school's server.

send us configure.log at petsc-maint at mcs.anl.gov and we take a look
at the problem. Its probably easier to get this working than trying
the alternatives below..

  I've already compiled a working library on another linux system. Is
 it possible for me to just copy the library from one to
 another. They are both redhat linux system and I think they're
 running on xeon processors.
 
 What are the things which I must looked out for? e.g. directory location
 etc...

It might work [see notes below] 

 Can the compiler be of different version? The server I compiled on uses
 ifort 9 or 7 while on the problem system ifort 8 is used.

yeah difference in compiler verson can cause problems..  [I'm not sure
 if there are issues between these intel compiler versions]. If it
 were to work - you can copy the whole petsc tree with 'rsync -a'

 Can the original library be shared or must it be static?

If PETSc was configured with Sharedlibs, there could be issues after
the move. Rebuilding sharedlibs might work arround this problem..

make deleteshraed shared

There could also be issues with external libraries. They need to exist
on the other machine - in the exact same location as the first
one. [otherwise you will get errors at compile time.

Satish