Provides MPI-aware apply-style functions and worker utilities for high-performance computing in R.
The Rhpc package offers MPI-aware versions of common apply-style functions and helper utilities for distributed computation. It supports both static worker configuration and dynamic process generation.
Main functions:
Rhpc_initializeInitialize MPI environment
Rhpc_getHandleGet communicator handle to workers
Rhpc_lapply, Rhpc_lapplyLBParallel lapply variants
Rhpc_sapply, Rhpc_sapplyLBParallel sapply variants
Rhpc_applyParallel apply for arrays/matrices
Rhpc_worker_callCall functions on workers
Rhpc_worker_nobackCall functions without waiting for results on workers
Rhpc_ExportExport variables to workers
Rhpc_setupRNGSetup random number generators
Rhpc_finalizeClean up MPI environment
MPI-related options are exposed through getOption(): Rhpc.mpi.c.comm, Rhpc.mpi.f.comm, Rhpc.mpi.rank, and Rhpc.mpi.procs.
See https://github.com/e-nakama/Rhpc for more information and examples.