On 3 Dec 2010, at 16:38, Erik Schnetter wrote:
I have just committed a new thorn CactusUtils/NoMPI. This thorn contains a fake MPI implementation for much (but not everything) of MPI's functionality. It provides only a trivial implementation that runs on a single processor. NoMPI can be used to use an MPI code on systems where there is no MPI conveniently available, e.g. on laptops or workstations.
To use this thorn, add #include <nompi.h> to your source code, and "uses include header: nompi.h" to the interface.ccl. Thorn NoMPI will automatically switch itself off if a real MPI implementation is found, so that it can be safely used all the time.
Wouldn't it make more sense for NoMPI to provide the usual mpi.h header so that authors of thorns which call MPI don't need to know anything about the particular implementation they are using?
My main goal was to make Carpet run on such systems, without having to add #ifdefs around each MPI call. Thorn NoMPI is not quite trivial, since certain functionality (e.g. MPI datatypes) still need to be supported.
This will be very helpful for tutorials and getting new users started with Kranc. Thanks!