mpi.apply {Rmpi}R Documentation

Scatter an array to slaves and then apply a fun

Description

An array (length <= total number of slaves) is scattered to slaves so that the first slave calls fun with arguments x[[1]] and ..., the second one calls with arguments x[[2]] and ..., and so on.

Usage

mpi.apply(x, fun, ..., comm=1)  

Arguments

x an array
fun a function
... optional arguments to fun
comm a communicator number

Value

A list of the results is returned. Its length is the same as that of x. In case the call fun with arguments x[[i]] and ... fails on ith slave, corresponding error message will be returned in the returning list.

Author(s)

Hao Yu


[Package Rmpi version 0.5-2 Index]