IBAMR  IBAMR version 0.19.
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
SAMRAI::tbox::PIO Struct Reference

#include <tbox/PIO.h>

Static Public Member Functions

static void initialize ()
 
static void finalize ()
 
static void logOnlyNodeZero (const std::string &filename)
 
static void logAllNodes (const std::string &filename)
 
static void suspendLogging ()
 
static void resumeLogging ()
 

Static Private Member Functions

static void shutdownFilestream ()
 

Static Private Attributes

static int s_rank
 
static std::ofstream * s_filestream
 

Detailed Description

Class PIO manages parallel stream I/O and logging. Static member function initialize() must be called before any of the parallel streams pout, perr, or plog may be used. Routine finalize() should also be called before termination of the program. Note that these functions are currently called by the SAMRAI manager startup and shutdown routines and therefore should not be explicitly called by an application code.

By default, logging is disabled. To enable logging, call one of the routines logOnlyNodeZero() or logAllNodes(). Logging may be suspended and resumed.

Member Function Documentation

◆ initialize()

static void SAMRAI::tbox::PIO::initialize ( )
static

Initialize the parallel I/O streams. This routine must be called before using pout, perr, or plog. This routine is automatically invoked by the SAMRAI library start-up routines. This routine must be called after the MPI routines have been initialized.

◆ finalize()

static void SAMRAI::tbox::PIO::finalize ( )
static

Shut down the parallel I/O streams and close log files. This routine must be called before program termination and is currently invoked from the SAMRAI library shutdown procedure.

◆ logOnlyNodeZero()

static void SAMRAI::tbox::PIO::logOnlyNodeZero ( const std::string &  filename)
static

Log messages for node zero only to the specified filename. All output to pout, perr, and plog on node zero will go to the log file.

◆ logAllNodes()

static void SAMRAI::tbox::PIO::logAllNodes ( const std::string &  filename)
static

Log messages from all nodes. The diagnostic data for processor XXXXX will be sent to a file with the name filename.XXXXX, where filename is the function argument.

◆ suspendLogging()

static void SAMRAI::tbox::PIO::suspendLogging ( )
static

Temporarily suspend file logging. Log file output will be discarded, although the output file will not be closed. Logging can be resumed by calling member function resumeLogging().

◆ resumeLogging()

static void SAMRAI::tbox::PIO::resumeLogging ( )
static

Resume logging after logging was suspended via member function suspendLogging().

◆ shutdownFilestream()

static void SAMRAI::tbox::PIO::shutdownFilestream ( )
staticprivate

Member Data Documentation

◆ s_rank

int SAMRAI::tbox::PIO::s_rank
staticprivate

◆ s_filestream

std::ofstream* SAMRAI::tbox::PIO::s_filestream
staticprivate

The documentation for this struct was generated from the following file: