Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_PAPI_Counter.cpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #include "Panzer_PAPI_Counter.hpp"
12 
13 #include "krp.hpp"
14 namespace panzer {
15 
16  std::map<std::string,PAPICounter::InternalCounter> PAPICounter::m_counters;
17 
18  PAPICounter::PAPICounter(const std::string name, const int my_rank, MPI_Comm comm)
19  : m_name(name), m_rank(my_rank), m_comm(comm)
20  {
21 
22  }
23 
25  {
27 
28  panzer::krp_init_(&m_rank,&c.hw_counters,&c.rcy,&c.rus,&c.ucy,&c.uus);
29  }
30 
32  {
34 
35  //panzer::krp_rpt_init_sum_(&m_rank,m_comm,&c.hw_counters,&c.rcy,&c.rus,&c.ucy,&c.uus,&c.rt_rus,&c.rt_ins,&c.rt_fp,&c.rt_dcm,&c.uus);
36  panzer::krp_rpt_init_sum_(&m_rank,m_comm,&c.hw_counters,&c.rcy,&c.rus,&c.ucy,&c.uus,&c.rt_rus,&c.rt_ins,&c.rt_fp,&c.rt_dcm,const_cast<char*>(m_name.c_str()));
37  }
38 
39  void PAPICounter::report(std::ostream& os)
40  {
41 // InternalCounter& c = m_counters[m_name];
42 
43 // panzer::krp_rpt_(&m_rank,m_comm,&c.hw_counters,&c.rcy,&c.rus,&c.ucy,&c.uus,const_cast<char*>(m_name.c_str()));
44  }
45 
46 }
void report(std::ostream &os)
PAPICounter(const std::string, const int my_rank, MPI_Comm comm)
static std::map< std::string, InternalCounter > m_counters
dangerous in a multithreaded world!