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.
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.
-erik
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!
On Fri, Dec 3, 2010 at 10:57 AM, Ian Hinder ian.hinder@aei.mpg.de wrote:
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?
Yes, this is my long-term goal. At the moment, only a subset of MPI is supported, and to avoid confusion I've made it explicit whether a thorn requires full MPI or this substitute. (Also, to prevent confusion between which mpi.h file is included, I would probably call it cctk_mpi.h.)
-erik
I don't know any thorns explicitly include mpi.h. What If we replace mpi.h with cctk_mpi.h in the cactus header file and make nompi (or whatever suitable name for this choice) as one of the compilation options ? Surely, code to implement nompi needs to be in the flesh.
Regards, Jian
On Dec 3, 2010, at 11:21 AM, Erik Schnetter schnetter@cct.lsu.edu wrote:
On Fri, Dec 3, 2010 at 10:57 AM, Ian Hinder ian.hinder@aei.mpg.de wrote:
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?
Yes, this is my long-term goal. At the moment, only a subset of MPI is supported, and to avoid confusion I've made it explicit whether a thorn requires full MPI or this substitute. (Also, to prevent confusion between which mpi.h file is included, I would probably call it cctk_mpi.h.)
-erik
-- Erik Schnetter schnetter@cct.lsu.edu http://www.cct.lsu.edu/~eschnett/ _______________________________________________ Users mailing list Users@cactuscode.org http://cactuscode.org/mailman/listinfo/users
users@lists.einsteintoolkit.org