Rhpc_lapply: Parallel lapply using MPI

View source: R/Rhpc.R

Rhpc_lapplyR Documentation

Parallel lapply using MPI

Description

MPI-based version of lapply that distributes work across worker processes sequentially.

Usage

Rhpc_lapply(cl, X, FUN, ...,
            usequote = ifelse(is.logical(getOption("Rhpc.usequote")),
                              getOption("Rhpc.usequote"), TRUE))

Arguments

cl

external pointer to MPI communicator

X

vector or list to be processed

FUN

function to apply to each element of X

...

additional arguments passed to FUN

usequote

logical; if FALSE, quote handling is skipped for performance improvement

Details

This function distributes elements of X sequentially to worker processes. The input X is divided among workers and each worker processes its portion in order.

Results are collected and returned in a list maintaining the original order.

Value

A list with results from applying FUN to each element of X.

See Also

Rhpc_lapplyLB, Rhpc_sapply, Rhpc_apply


Rhpc documentation built on Aug. 4, 2026, 1:07 a.m.