Learn R Programming

Rhpc (version 0.26.5)

Rhpc-package: Rhpc: MPI-based apply-style parallel computing for R

Description

Provides MPI-aware apply-style functions and worker utilities for high-performance computing in R.

Arguments

Details

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_initialize

Initialize MPI environment

Rhpc_getHandle

Get communicator handle to workers

Rhpc_lapply, Rhpc_lapplyLB

Parallel lapply variants

Rhpc_sapply, Rhpc_sapplyLB

Parallel sapply variants

Rhpc_apply

Parallel apply for arrays/matrices

Rhpc_worker_call

Call functions on workers

Rhpc_worker_noback

Call functions without waiting for results on workers

Rhpc_Export

Export variables to workers

Rhpc_setupRNG

Setup random number generators

Rhpc_finalize

Clean 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.