Пример #1
0
    def setUpClass(cls):
        """Create launcher, execute benchmark and set up class variables.

        """
        sys.stdout.write('(' + os.path.basename(__file__).split('.')[0] +
                         '.' + cls.__name__ + ') ...')
        test_name = 'test_ee_stream_dgemm_mix'
        cls._report_path = test_name + '.report'
        cls._trace_path = test_name + '.trace'
        cls._skip_launch = _g_skip_launch
        cls._keep_files = os.getenv('GEOPM_KEEP_FILES') is not None
        cls._agent_conf_path = test_name + '-agent-config.json'
        if  not cls._skip_launch:
            num_node = 2
            num_rank = 2
            min_freq = geopm_test_launcher.geopmread("CPUINFO::FREQ_MIN board 0")
            sticker_freq = geopm_test_launcher.geopmread("CPUINFO::FREQ_STICKER board 0")
            agent_conf = geopmpy.io.AgentConf(cls._agent_conf_path,
                                              'energy_efficient',
                                              {'frequency_min':min_freq,
                                               'frequency_max':sticker_freq})
            launcher = geopm_test_launcher.TestLauncher(AppConf(),
                                                        agent_conf,
                                                        cls._report_path,
                                                        cls._trace_path,
                                                        time_limit=6000)
            launcher.set_num_node(num_node)
            launcher.set_num_rank(num_rank)
            launcher.run(test_name)
Пример #2
0
 def test_energy_efficient_max_freq(self):
     test_freq = self._sticker_freq - 2 * self._step_freq
     current_freq = geopm_test_launcher.geopmread("MSR::PERF_CTL:FREQ board 0")
     self.assertNotEqual(test_freq, current_freq)
     self.run_tool('energy_efficient', {'FREQ_FIXED': test_freq})
     current_freq = geopm_test_launcher.geopmread("MSR::PERF_CTL:FREQ board 0")
     self.assertEqual(test_freq, current_freq)
Пример #3
0
 def test_freq_map_max_freq(self):
     test_freq = self._sticker_freq - 2 * self._step_freq
     current_freq = geopm_test_launcher.geopmread("MSR::PERF_CTL:FREQ board 0")
     self.assertNotEqual(test_freq, current_freq)
     self.run_tool('frequency_map', {'frequency_max': test_freq})
     current_freq = geopm_test_launcher.geopmread("MSR::PERF_CTL:FREQ board 0")
     self.assertEqual(test_freq, current_freq)
Пример #4
0
 def test_power_balancer_power_cap(self):
     num_pkg = geopmpy.topo.num_domain('package')
     test_power = self._tdp_power * num_pkg - 20
     current_power = num_pkg * geopm_test_launcher.geopmread("MSR::PKG_POWER_LIMIT:PL1_POWER_LIMIT board 0")
     self.assertNotEqual(test_power, current_power)
     self.run_tool('power_balancer', {'power_budget': test_power})
     current_power = num_pkg * geopm_test_launcher.geopmread("MSR::PKG_POWER_LIMIT:PL1_POWER_LIMIT board 0")
     self.assertEqual(test_power, current_power)
Пример #5
0
 def test_monitor_no_policy(self):
     # check that the monitor doesn't change anything
     start_freq = geopm_test_launcher.geopmread("MSR::PERF_CTL:FREQ board 0")
     start_power = geopm_test_launcher.geopmread("MSR::PKG_POWER_LIMIT:PL1_POWER_LIMIT board 0")
     self.run_tool('monitor', {})
     end_freq = geopm_test_launcher.geopmread("MSR::PERF_CTL:FREQ board 0")
     end_power = geopm_test_launcher.geopmread("MSR::PKG_POWER_LIMIT:PL1_POWER_LIMIT board 0")
     self.assertEqual(start_freq, end_freq)
     self.assertEqual(start_power, end_power)
Пример #6
0
    def setUp(self):
        self._old_max_freq = geopm_test_launcher.geopmread("MSR::PERF_CTL:FREQ board 0")
        self._old_max_power = geopm_test_launcher.geopmread("MSR::PKG_POWER_LIMIT:PL1_POWER_LIMIT board 0")

        # make sure controls are at default
        self._max_freq = geopm_test_launcher.geopmread("FREQUENCY_MAX board 0")
        geopm_test_launcher.geopmwrite("FREQUENCY board 0 {}".format(self._max_freq))
        self._tdp_power = geopm_test_launcher.geopmread("POWER_PACKAGE_TDP package 0")
        geopm_test_launcher.geopmwrite("POWER_PACKAGE_LIMIT board 0 {}".format(self._tdp_power))
        self._sticker_freq = geopm_test_launcher.geopmread("FREQUENCY_STICKER board 0")
        self._step_freq = geopm_test_launcher.geopmread("FREQUENCY_STEP board 0")

        self._stdout = None
        self._stderr = None