1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// *****************************************************************************
/*!
  \file      src/Main/LBSwitch.cpp
  \copyright 2012-2015 J. Bakosi,
             2016-2018 Los Alamos National Security, LLC.,
             2019-2021 Triad National Security, LLC.,
             2022-2025 J. Bakosi
             All rights reserved. See the LICENSE file for details.
  \brief     Charm++ chare group for switching on/off load balancing
  \details   Charm++ chare group for switching on/off load balancing.
*/
// *****************************************************************************

#include <iostream><--- Include file:  not found. Please note: Cppcheck does not need standard library headers to get proper results.

#include "LBSwitch.hpp"
#include "Print.hpp"

using tk::LBSwitch;

LBSwitch::LBSwitch()
// *****************************************************************************
//  Constructor: turn on automatic load balancing
// *****************************************************************************
{
  TurnManualLBOff();
  if (CkMyPe() == 0) Print() << "Xyst> Load balancing on\n";
}

void
// cppcheck-suppress unusedFunction
LBSwitch::off()
// *****************************************************************************
//  Turn off automatic load balancing
//! \details Since this is a [initproc] routine, the runtime system executes the
//!   routine exactly once on every PE early on in the Charm++ init
//!   sequence. Must be static as it is called without an object. See also:
//!   Section "Initializations at Program Startup" at in the Charm++ manual
//!   http://charm.cs.illinois.edu/manuals/html/charm++/manual.html.
// *****************************************************************************
{
  TurnManualLBOn();

  if (CkMyPe() == 0) Print() << "Xyst> Load balancing off\n";
}

#include "NoWarning/lbswitch.def.h"<--- Include file: "NoWarning/lbswitch.def.h" not found.