Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Classes | Functions
Teuchos::details Namespace Reference

Classes

class  MagValue
class  MagValue< ScalarType, true >
class  MagValue< ScalarType, false >
class  GivensRotator
class  GivensRotator< ScalarType, true >
class  GivensRotator< ScalarType, false >
struct  lapack_traits
struct  lapack_traits< std::complex< T > >

Functions

void safeCommFree (MPI_Comm *comm)
 Give comm to MPI_Comm_free, if MPI is not yet finalized.
int setCommErrhandler (MPI_Comm comm, MPI_Errhandler handler)

Function Documentation

void Teuchos::details::safeCommFree ( MPI_Comm *  comm)

Give comm to MPI_Comm_free, if MPI is not yet finalized.

This function "frees" the given communicator by giving it to MPI_Comm_free. It only does so if MPI_Finalize has not yet been called. If MPI_Finalize has been called, this function does nothing, since it is not legal to call most MPI functions after MPI_Finalize has been called. This function also ignores any errors returned by MPI_Finalize, which makes it suitable for use in a destructor.

Note:
This function may allow a memory leak in your program, if you have allowed the MPI_Comm to persist after MPI_Finalize has been called.

Definition at line 62 of file Teuchos_DefaultMpiComm.cpp.

int Teuchos::details::setCommErrhandler ( MPI_Comm  comm,
MPI_Errhandler  handler 
)

Set the given communicator's error handler to handler.

If the MPI version is >= 2, this calls MPI_Comm_set_handler(). If the MPI version is 1, this calls MPI_Errhandler_set().

Definition at line 75 of file Teuchos_DefaultMpiComm.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines