Mark library as finalized¶
ss_zap
is a function defined in sslib.c.
Synopsis:
-
herr_t
ss_zap
(void)¶
Description: Sometimes it’s necessary to mark the library as finalized but without actually finalizing it. For instance,
a call to MPI_Abort
may eventually call exit
(e.g., from MPID_SHMEM_Abort
) which would cause SSlib’s
atexit
handler to be invoked. But we really don’t want that because the handler tries to do some MPI
communication. So this function is supplied to make the atexit
handler think ss_finalize has already
been called.
Return Value: Returns non-negative on success; negative on failure.
Parallel Notes: Collective across the library’s communicator, although this function does no MPI communication.
Issues: This function is here only because some libraries (e.g., MPICH
’s MPI_Abort
) incorrectly call exit
instead of calling _exit
.
We should really set handlers back to their default values now and unmask them
See Also:
- ss_finalize: 2.3: Terminate the library
- Library: Introduction for current chapter