pbdBASE (version 0.5-0)

blacsexit: BLACS Exit

Description

Shuts down all BLACS communicators.

Usage

base.blacsexit(CONT = TRUE)

blacsexit(CONT = TRUE)

Arguments

CONT

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

Value

Has an invisible return of 0 when successful.

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.

Examples

Run this code
# NOT RUN {
spmd.code = "
  suppressMessages(library(pbdBASE))
  init.grid()

  blacsexit()

  # finalize()  # This should be off since blacexit().
"

pbdMPI::execmpi(spmd.code = spmd.code, nranks = 2L)

# }

Run the code above in your browser using DataLab