How to compile an MPI application in serial mode (without using an MPI compiler)?

This question may seem a little strange ...

Imagine that I have an MPI application, but I do not have a system with MPI installed. Therefore, I want to compile an application without MPI support (1-process, 1-thread) without changing the source code. Is it possible?

I found somewhere "mimic_mpi.h" a shell that should do exactly what I want. But it lacked some MPI functions (for example, MPI_Cart_create, MPI_Cart_get, etc.), so I did not succeed.

mimic_mpi.h http://openmx.sourcearchive.com/documentation/3.2.4.dfsg-3/mimic__mpi_8h-source.html

mimic_mpi.c http://openmx.sourcearchive.com/documentation/3.2.4.dfsg-3/mimic__mpi_8c-source.html

Do you know any other approach that I could use to compile MPI applications without MPI support?

Thanks in advance!

+1
source share
1 answer

You can run the โ€œrealโ€ MPI application in a single process. In practice, this even works without using mpiexec / mpirun, although I'm not sure if this is officially supported. However, a complete and validating 1-processing โ€œsequentialโ€ MPI implementation is likely to become quite complex and its own library - so in this case, why not just use the real full MPI implementation?

, , : MPI, MPI - , .

, MPI , MPI, , #ifdef HAVE_MPI .

+2

All Articles