[petsc-users] query on meaning of libmpiuni.*

Toby D. Young tyoung at ippt.gov.pl
Mon Mar 1 07:18:08 CST 2010


Thanks Jed, that more-or-less covers everything I wanted to know!

Best,
	Toby

-----

Toby D. Young
Assistant Professor
Philosophy-Physics
Polish Academy of Sciences
Warszawa, Polska

www:   http://www.ippt.gov.pl/~tyoung
skype: stenografia

On Mon, 1 Mar 2010, Jed Brown wrote:

> On Mon, 1 Mar 2010 13:20:49 +0100, "Toby D. Young" <tyoung at ippt.gov.pl> wrote:
> >
> > Greetings,
> >
> > I am very curious to understand why libmpiuni is there PETSc and how
> > he is implemented by PETSc and PETSc-based programs.
> >
> > I understand that this library can be built as static or dynamic; right?
> > I also understand that this library is used when PETSc is compiled with
> > MPI, but the program is run without mpirun. (What about mpirun -np
> > 1 ./program.x ?)
>
> MPIUNI is only used if you have not built with a real MPI.  It's purpose
> is to allow code to be written for the more complex (parallel) case
> without littering the code with "#ifdef PARALLEL" statements.  It
> implements trivial MPI functionality when there is only process (note
> that one process is not the same as "one processor" or "one core").
>
> If a real MPI is available on your system, then you should use it even
> if you only intend to run single-process jobs.  This will not reduce
> serial performance, but it allows you to interoperate more easily with
> other libraries that also use MPI, and it allows you to run with
> multiple jobs (again, you do not need multiple cores for this to be
> useful, it is convenient for testing algorithmic correctness and
> scalability).
>
> Jed
>


More information about the petsc-users mailing list