# Path: tacc_stats/pickler/amd64_pmc.py
# def perf_event(event_select, unit_mask):
# def core_to_sock(c):
# def process_host(host, times):
# def process_job(job):
# 
# Path: tacc_stats/pickler/intel_process.py
# def CORE_PERF_EVENT(event_select, unit_mask):
# def CORE_PERF_EVENT1(event_select, unit_mask):
# def CBOX_PERF_EVENT(event, umask):
# def HAU_PERF_EVENT(event, umask):
# def IMC_PERF_EVENT(event, umask):
# def IMC_PERF_EVENT_SKX(event, umask):
# def PCU_PERF_EVENT(event):
# def QPI_PERF_EVENT(event, umask):
# def R2PCI_PERF_EVENT(event, umask):
# def WTM_PERF_EVENT(event, umask):
# def WTMUNC_PERF_EVENT(event, umask):
# def KNL_EDC_UCLK_PERF_EVENT(event, umask):
# def KNL_EDC_ECLK_PERF_EVENT(event, umask):
# def KNL_MC_UCLK_PERF_EVENT(event, umask):
# def KNL_MC_DCLK_PERF_EVENT(event, umask):
#     def __init__(self, job, name, event_map):
#     def register(self,host):
# def format_knl(job, typename):
# def process_job(job):
# class reformat_counters:


import datetime, errno, glob, numpy, os, sys, time, gzip
import re
import string
from tacc_stats.pickler import amd64_pmc, intel_process
                    A[i, j] *= e.mult
            if "MSR_DRAM_ENERGY_STATUS" == schema.keys()[j]: 
                for i in range(0, m):
                    A[i, j] *= 0.0153/0.06104
        return A

    def logoverflow(self, host_name, type_name, dev_name, key_name):
        if type_name not in self.overflows:
            self.overflows[type_name] = dict()
        if dev_name not in self.overflows[type_name]:
            self.overflows[type_name][dev_name] = dict()
        if key_name not in self.overflows[type_name][dev_name]:
            self.overflows[type_name][dev_name][key_name] = []

        self.overflows[type_name][dev_name][key_name].append(host_name)

    def process_stats(self):
        for host in self.hosts.values():
            host.stats = {}
            for type_name, raw_type_stats in host.raw_stats.items():
                stats = host.stats[type_name] = {}
                schema = self.schemas[type_name]
                for dev_name, raw_dev_stats in raw_type_stats.items():
                    try:
                        stats[dev_name] = self.process_dev_stats(host, type_name, schema,
                                                                 dev_name, raw_dev_stats)
                    except:
                        continue
            del host.raw_stats
        amd64_pmc.process_job(self)

# Path: tacc_stats/pickler/amd64_pmc.py
# def perf_event(event_select, unit_mask):
# def core_to_sock(c):
# def process_host(host, times):
# def process_job(job):
# 
# Path: tacc_stats/pickler/intel_process.py
# def CORE_PERF_EVENT(event_select, unit_mask):
# def CORE_PERF_EVENT1(event_select, unit_mask):
# def CBOX_PERF_EVENT(event, umask):
# def HAU_PERF_EVENT(event, umask):
# def IMC_PERF_EVENT(event, umask):
# def IMC_PERF_EVENT_SKX(event, umask):
# def PCU_PERF_EVENT(event):
# def QPI_PERF_EVENT(event, umask):
# def R2PCI_PERF_EVENT(event, umask):
# def WTM_PERF_EVENT(event, umask):
# def WTMUNC_PERF_EVENT(event, umask):
# def KNL_EDC_UCLK_PERF_EVENT(event, umask):
# def KNL_EDC_ECLK_PERF_EVENT(event, umask):
# def KNL_MC_UCLK_PERF_EVENT(event, umask):
# def KNL_MC_DCLK_PERF_EVENT(event, umask):
#     def __init__(self, job, name, event_map):
#     def register(self,host):
# def format_knl(job, typename):
# def process_job(job):
# class reformat_counters:


# Path: tacc_stats/pickler/job_stats.py
import datetime, errno, glob, numpy, os, sys, time, gzip
import re
import string
from tacc_stats.pickler import amd64_pmc, intel_process

                    A[i, j] *= e.mult
            if "MSR_DRAM_ENERGY_STATUS" == schema.keys()[j]: 
                for i in range(0, m):
                    A[i, j] *= 0.0153/0.06104
        return A

    def logoverflow(self, host_name, type_name, dev_name, key_name):
        if type_name not in self.overflows:
            self.overflows[type_name] = dict()
        if dev_name not in self.overflows[type_name]:
            self.overflows[type_name][dev_name] = dict()
        if key_name not in self.overflows[type_name][dev_name]:
            self.overflows[type_name][dev_name][key_name] = []

        self.overflows[type_name][dev_name][key_name].append(host_name)

    def process_stats(self):
        for host in self.hosts.values():
            host.stats = {}
            for type_name, raw_type_stats in host.raw_stats.items():
                stats = host.stats[type_name] = {}
                schema = self.schemas[type_name]
                for dev_name, raw_dev_stats in raw_type_stats.items():
                    try:
                        stats[dev_name] = self.process_dev_stats(host, type_name, schema,
                                                                 dev_name, raw_dev_stats)
                    except:
                        continue
            del host.raw_stats
        amd64_pmc.process_job(self)

        intel_process.process_job(self)