Calling LAMMPS in serial environment

Dear all,

if I want to call the LAMMPS library
in a serial environment, I include "lammps.h"
(2.5.4. Calling the LAMMPS library).
However, in this header there will be also
the header "mpi.h" be included at some point.

Shouldn't these includes be #ifdef'ed somehow?
Otherwise I don't see how I would call it in a
serial environment, because I need to include "lammps.h".

Thanks in advance.

Best,
Stephan

Dear all,

if I want to call the LAMMPS library
in a serial environment, I include "lammps.h"
(2.5.4. Calling the LAMMPS library).
However, in this header there will be also
the header "mpi.h" be included at some point.

​when compiling​ LAMMPS in serial mode, the MPI calls are not removed, but
rather delegated to a "fake" MPI library in src/STUBS.

Shouldn't these includes be #ifdef'ed somehow?
Otherwise I don't see how I would call it in a
serial environment, because I need to include "lammps.h".

​when you want to use the library interface from library.cpp, you should
only need to include library.h​.

​you still need mpi.h, but that should be the mpi.h from src/STUBS

axel.