mpi_print: MPI Printer

Description Usage Arguments Details Value Examples

View source: R/02-print.r

Description

Orderly printing of data across MPI ranks. Similar to pbdMPI::comm.print().

Usage

1
2
3
mpi_cat(x, quiet = FALSE, all.rank = FALSE, comm = 0L)

mpi_print(x, quiet = FALSE, all.rank = FALSE, comm = 0L)

Arguments

x

The input to be printed.

quiet

Should ranks print their rank number before printing the input?

all.rank

Should all ranks print or only rank 0?

comm

MPI communicator number.

Details

All printing is done on rank 0 to ensure printing occurs in rank order. This requires communication if all.rank=TRUE.

Value

Invisibly returns NULL.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
suppressMessages(library(cop))

x = matrix(1:4, 2) + 10*comm.rank()
mpi_print(x)

finalize()

## End(Not run)

RBigData/cop documentation built on March 10, 2021, 8:21 p.m.