PSCF v1.1
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
17namespace Util
18{
19
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
Allows information from every processor in a communicator, to be output in rank sequence.
Definition: MpiLogger.h:38
void end()
End logging block.
Definition: MpiLogger.cpp:42
void begin()
Begin logging block.
Definition: MpiLogger.cpp:26
File containing preprocessor macros for error handling.
Utility classes for scientific computation.
Definition: accumulators.mod:1