mpi_napply: mpi_napply

Description Usage Arguments Details Value

Description

A distributed "n-apply" function. Syntactically, this is sugar for a distributed lapply(1:n, FUN).

Usage

1
2
mpi_napply(n, FUN, ..., checkpoint_path = NULL, checkpoint_freq = 1,
  preschedule = TRUE)

Arguments

n

A global, positive integer.

FUN

Function to evaluate.

...

Additional arguments passed to FUN.

checkpoint_path

If a path is specified, then each MPI rank will write checkpoints to disk during execution. If this path is global (the same on all ranks), then that path should be accessible to all ranks. However, a local path pointing to node-local storage can also be used. All checkpoint files will be removed on successful completion of the function. If the value is the default NULL, then no checkpointing takes place.

checkpoint_freq

The checkpoint frequency; a positive integer. The value is assumed to be 1 if preschedule=FALSE.

preschedule

Should the jobs be distributed among the MPI ranks up front? Otherwise, the jobs will be evaluated on a "first come first serve" basis among the ranks.

Details

If preschedule=FALSE then jobs are likely to be evaluated out of order (that's actually the point). However, the return is reconstructed in the linear order, so that the first element of the return list is the value resulting from evaluating FUN at 1, the second at 2, and so on.

Value

A list on rank 0.


RBigData/tasktools documentation built on May 22, 2019, 1:51 p.m.