ParallelInfo.hpp
Go to the documentation of this file.
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 /// \file
5 /// Declares the chares for ParallelInfo
6 
7 #pragma once
8 
9 #include "Executables/ParallelInfo/ParallelInfo.decl.h"
10 #include "Parallel/Reduction.hpp"
11 
12 /// \cond
13 class CkArgMsg;
14 class CkCallback;
15 /// \endcond
16 
17 /*!
18  * \page ParallelInfoExecutablePage ParallelInfo Executable
19  * \tableofcontents
20  * The %ParallelInfo executable can be used to check the number of nodes, and
21  * processing elements (roughly number of cores) registered with Charm++.
22  * Depending on the build of Charm++ the way Charm++ identifies nodes will vary.
23  * Specifically, for non-SMP builds of Charm++ each processing element is
24  * identified as a node instead of each physical node being identified as a
25  * node. The substantially increased number of "nodes" for non-SMP builds can
26  * cause problems if large amounts of read-only data is cached on a per-node
27  * basis.
28  *
29  * The ParallelInfo executable starts one process on each processing element and
30  * each node, which then all print identifying information such as the
31  * processing element ID, node ID, etc.
32  */
33 
34 /// \cond HIDDEN_SYMBOLS
35 class ParallelInfo : public CBase_ParallelInfo {
36  public:
37  explicit ParallelInfo(CkArgMsg* msg);
38  void start_node_group_check() const;
39  [[noreturn]] void end_report() const;
40 
41  private:
42  void start_pe_group_check() const;
43 };
44 
45 class PeGroupReporter : public Group {
46  public:
47  // clang-tidy: non-const reference, Charm++ interface
48  explicit PeGroupReporter(CkCallback& cb_start_node_group_check); // NOLINT
49 };
50 
51 class NodeGroupReporter : public NodeGroup {
52  public:
53  // clang-tidy: non-const reference, Charm++ interface
54  explicit NodeGroupReporter(CkCallback& cb_end_report); // NOLINT
55 };
56 /// \endcond