On 12 April 2018 at 15:31, <
talebi....@gmail.com> wrote:
>
>
> I see. It was an assertion. For both C and Fortran I am using the MPI Stubs
> for years. LAMMPS is also another code beside PETSc.
>
Are you talking about this MPI stubs?
http://people.sc.fsu.edu/~jburkardt/c_src/mpi_stubs/mpi_stubs.html
Or maybe something else? Could you provide a link?
>
> I will not ask why, but I explain my problem. mpi4py needs the MPI library
> installed even when running serial (right?).
Yes, of course.
> In Linux it is no problem. But
> in Windows for many users it is a headache to install a MPI library.
Why? Windows users can just use the Microsoft MPI implementation! As
far as I can tell, it is a free download. Even if running on a desktop
and not a cluster, you can benefit from multiple processor cores
through MPI.
> In my
> special situation packaging the code and supporting MPI for all users is a
> big problem.
>
> I can try to open a case for every MPI call I make for the serial mode, or
> write the Stubs myself.
>
If you build your own (or third-party) MPI stub library, then mpi4py
should build just fine, setup.py will check for availability of EVERY
symbol in MPI and should endup linking just fine. At runtime, any
missing MPI function in the stubs will raise NotImplementedError if
called.