[petsc-users] query on meaning of libmpiuni.*
Jed Brown
jed at 59A2.org
Mon Mar 1 06:43:19 CST 2010
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