PSCF v1.1
Public Member Functions | List of all members
Util::MpiLogger Class Reference

Allows information from every processor in a communicator, to be output in rank sequence. More...

#include <MpiLogger.h>

Public Member Functions

 MpiLogger (MPI::Intracomm &comm=MPI::COMM_WORLD)
 Constructor. More...
 
void begin ()
 Begin logging block. More...
 
void end ()
 End logging block. More...
 

Detailed Description

Allows information from every processor in a communicator, to be output in rank sequence.

The begin() method for processor of rank > 0 waits for receipt of a message from processor rank - 1. The end() method sends a message to processor rank + 1.

Usage:

MpiLogger logger;
logger.begin();
std::cout << "Print from processor " << MPI::COMM_WORLD.Get_rank() << std::endl;
logger.endl();
Allows information from every processor in a communicator, to be output in rank sequence.
Definition: MpiLogger.h:38
void begin()
Begin logging block.
Definition: MpiLogger.cpp:26

Definition at line 37 of file MpiLogger.h.

Constructor & Destructor Documentation

◆ MpiLogger()

Util::MpiLogger::MpiLogger ( MPI::Intracomm &  comm = MPI::COMM_WORLD)

Constructor.

Definition at line 18 of file MpiLogger.cpp.

Member Function Documentation

◆ begin()

void Util::MpiLogger::begin ( )

Begin logging block.

Definition at line 26 of file MpiLogger.cpp.

◆ end()

void Util::MpiLogger::end ( )

End logging block.

Definition at line 42 of file MpiLogger.cpp.


The documentation for this class was generated from the following files: