How to call an MPI-enabled program from R?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to call an MPI-enabled program from R?

Alireza Mahani
Conceptually, how is it possible to call an MPI-parallelized code in C from R? My experience with MPI so far indicates that one has to launch an MPI-enabled binary using a command like

mpiexec -n <number of processes> <name of binary>

In other words, I'm not sure how to create an MPI 'library' and then call it from a single-threaded application. In this sense, my question is perhaps not strictly a R question but an MPI question. (Using a system call forces one to use disk as intermediary between R and the MPI binary to pass data between the two.)

I am also aware of packages such as Rmpi, but at this stage I want to be able to understand the low-level capabilities rather than relying on an abstraction layer.

Thank you,
Alireza