blacsexit: BLACS Exit

Description Usage Arguments Details Value Examples

Description

Shuts down all BLACS communicators.

Usage

1
2
3

Arguments

CONT

logical; determines whether or not to shut down all MPI communicators

Details

If the user wishes to shut down BLACS communicators but still have access to MPI, then call this function with CONT=TRUE. Calling blacsexit(CONT=FALSE) will shut down all MPI communicators, equivalent to calling

> blacsexit(CONT=TRUE) > finalize(mpi.finalize=TRUE)

This function is automatically invoked if BLACS communicators are running and finalize() is called.

Value

Has an invisible return of 0 when successful.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
spmd.code <- "
  suppressMessages(library(pbdMPI))
  suppressMessages(library(pbdBASE))
  init.grid()

  ### Do something with BLACS here.

  ### Don't use this unless you know what to do after this.
  # blacsexit()

  ### Then, do others without BLACS here.

  finalize()  # This should be off since blacexit().
"
pbdMPI::execmpi(spmd.code = spmd.code, nranks = 2L)

RBigData/pbdBASE documentation built on Oct. 29, 2021, 6:19 p.m.