Properly end “mpi” workers before quitting R (e.g., at a crash)
A list with at least one named element
Ideally, we use
Rmpi::mpi.exit() on exit, but we
cannot as of Rmpi v0.6.6. Because rSFSW2 does not attach
Rmpi, the function
an error when it executes
detach(package:Rmpi) which results in
"Error in detach(package:Rmpi) : invalid 'name' argument".
Rmpi::mpi.comm.size(1) crashes with a segfault if
there are no workers running because of the call
.Call("mpi_comm_is_null", as.integer(comm), PACKAGE = "Rmpi").
Ideally, we would use
However, this function hangs our R session because of its call to
Rmpi::mpi.comm.disconnect(); even wrapping this
try doesn't prevent it from hanging.
gv will usually be the package-level global
SFSW2_glovars. This is because this function
is registered as finalizer to the object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.