ll{
Package: pbdMPI
Type: Package
License: GPL
LazyLoad: yes
} This package requires an MPI library (OpenMPI, MPICH2, or LAM/MPI).
The install command (with OpenMPI library) is
> tar zxvf pbdMPI_0.1-0.tar.gz
> R CMD INSTALL pbdMPI
Other arguments include
ll{
Argument Default
--with-Rmpi-type OPENMPI
--with-Rmpi-include ${MPI_ROOT}/include
--with-Rmpi-libpath ${MPI_ROOT}/lib
--with-mpi ${MPI_ROOT}
}
where ${MPI_ROOT} is the path to the MPI root.
See the package source file pbdMPI/configure for details.
After loading library(pbdMPI), the standard process starts from
init which set two global variables .comm.size
and .comm.rank. The standard process should end
with finalize.
Most functions are assumed to run in SPMD, i.e.
in batch mode. Ideally, most codes run with mpiexec and Rscript,
together, such as
> mpiexec -np 2 Rscript some_code.r
where some_code.r contains whole SPMD program.
The package source files provide several examples based on pbdMPI,
such as
ll{
Directory Examples
pbdMPI/inst/examples/test_spmd/ major SPMD functions
pbdMPI/inst/examples/test_rmpi/ analog to Rmpi
pbdMPI/inst/examples/test_parallel/ analog to parallel
pbdMPI/inst/examples/test_s4/ S4 extension
}
The current version is mainly written and tested under OpenMPI
environments in Linux system (xubuntu-11.04). Also, it is tested
under MPICH2 environments in Windows 7 system.
It is expected to be fine for other MPI libraries and other OS platforms.