Simpatico  v1.10
MpiLogger.h
1 #ifdef UTIL_MPI
2 #ifndef UTIL_MPI_LOGGER_H
3 #define UTIL_MPI_LOGGER_H
4 
5 /*
6 * Util Package - C++ Utilities for Scientific Computation
7 *
8 * Copyright 2010 - 2017, The Regents of the University of Minnesota
9 * Distributed under the terms of the GNU General Public License.
10 */
11 
12 #include <util/global.h>
13 
14 #include <iostream>
15 #include <string>
16 
17 namespace Util
18 {
19 
37  class MpiLogger
38  {
39 
40  public:
41 
45  MpiLogger(MPI::Intracomm& comm = MPI::COMM_WORLD);
46 
50  void begin();
51 
55  void end();
56 
57 
58  private:
59 
61  MPI::Intracomm* communicatorPtr_;
62 
64  int rank_;
65 
67  int size_;
68 
69  };
70 
71 }
72 
73 #endif
74 #endif
void begin()
Begin logging block.
Definition: MpiLogger.cpp:26
void end()
End logging block.
Definition: MpiLogger.cpp:42
File containing preprocessor macros for error handling.
MpiLogger(MPI::Intracomm &comm=MPI::COMM_WORLD)
Constructor.
Definition: MpiLogger.cpp:18
Allows information from every processor in a communicator, to be output in rank sequence.
Definition: MpiLogger.h:37
Utility classes for scientific computation.
Definition: accumulators.mod:1