[petsc-users] On what condition is useful MPI-based solution?

Satish Balay balay at mcs.anl.gov
Wed Jan 13 08:44:20 CST 2010


On Wed, 13 Jan 2010, Jose E. Roman wrote:

> 
> On 13/01/2010, Takuya Sekikawa wrote:
> 
> > I have a few more questions.
> > 
> > Just in case I want to ask.
> > 
> > [Q1]
> > In general, like ex1, Don't we need any change to source code to
> > run program with MPI-based system?
> > in other words, to run SLEPc-based program in MPI-based system,
> > all I need to do is changing ./configure option (--with-mpi=1, etc)
> > and re-compiling (without changing source) ?
> 
> No change in the program. Just enable MPI in the installation.

Note that the examples are written to be parallel - and run with or
without MPI. You cannot take any random sequential code, compile it
with MPI - and expect it to run parallely.

Eventhough SLEPc/PETSc hide most of the MPI related stuff from the
user - there is generally some user code that should be MPI aware. [in
ex1 - the matrix assembly is written to be MPI aware - and the data is
distrubuted and assembled parallely]

> > 
> > [Q2]
> > Can I use intel-compiler (icc/icpc) on MPI-based SLEPc application?
> > (because intel compiler is really fast so I want to use it on MPI-based
> > system too)
> 
> Yes,

Note: Faster compilers speedup sequential part of the code [hence the
overall runtime for the parallel run aswell]. But your bottleneck is
MPI/communication cost - which won't change. So your parallel
scalability will be skewed further.

To improve parallel scalability - you'll have to get the fastest
network you can - between the nodes. And then install MPI that can
perform well on the given network setup.

[and as Jed mentioned -log_summary is a better tool to compare performance]

Satish



More information about the petsc-users mailing list