Xyst test code coverage report
Current view: top level - Main - LBSwitch.cpp (source / functions) Hit Total Coverage
Commit: 5689ba12dc66a776d3d75f1ee48cc7d78eaa18dc Lines: 8 8 100.0 %
Date: 2024-11-22 19:17:03 Functions: 2 3 66.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 7 10 70.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Main/LBSwitch.cpp
       4                 :            :   \copyright 2012-2015 J. Bakosi,
       5                 :            :              2016-2018 Los Alamos National Security, LLC.,
       6                 :            :              2019-2021 Triad National Security, LLC.,
       7                 :            :              2022-2024 J. Bakosi
       8                 :            :              All rights reserved. See the LICENSE file for details.
       9                 :            :   \brief     Charm++ chare group for switching on/off load balancing
      10                 :            :   \details   Charm++ chare group for switching on/off load balancing.
      11                 :            : */
      12                 :            : // *****************************************************************************
      13                 :            : 
      14                 :            : #include <iostream>
      15                 :            : 
      16                 :            : #include "LBSwitch.hpp"
      17                 :            : #include "Print.hpp"
      18                 :            : 
      19                 :            : using tk::LBSwitch;
      20                 :            : 
      21                 :        739 : LBSwitch::LBSwitch()
      22                 :            : // *****************************************************************************
      23                 :            : //  Constructor: turn on automatic load balancing
      24                 :            : // *****************************************************************************
      25                 :            : {
      26         [ +  - ]:        739 :   TurnManualLBOff();
      27 [ +  + ][ +  - ]:        739 :   if (CkMyPe() == 0) Print() << "Xyst> Load balancing on\n";
      28                 :        739 : }
      29                 :            : 
      30                 :            : void
      31                 :            : // cppcheck-suppress unusedFunction
      32                 :        768 : LBSwitch::off()
      33                 :            : // *****************************************************************************
      34                 :            : //  Turn off automatic load balancing
      35                 :            : //! \details Since this is a [initproc] routine, the runtime system executes the
      36                 :            : //!   routine exactly once on every PE early on in the Charm++ init
      37                 :            : //!   sequence. Must be static as it is called without an object. See also:
      38                 :            : //!   Section "Initializations at Program Startup" at in the Charm++ manual
      39                 :            : //!   http://charm.cs.illinois.edu/manuals/html/charm++/manual.html.
      40                 :            : // *****************************************************************************
      41                 :            : {
      42                 :        768 :   TurnManualLBOn();
      43                 :            : 
      44 [ +  + ][ +  - ]:        768 :   if (CkMyPe() == 0) Print() << "Xyst> Load balancing off\n";
      45                 :        768 : }
      46                 :            : 
      47                 :            : #include "NoWarning/lbswitch.def.h"

Generated by: LCOV version 1.16