1########################################################################## 2# Copyright (c) 2009, 2010, ETH Zurich. 3# All rights reserved. 4# 5# This file is distributed under the terms in the attached LICENSE file. 6# If you do not find this file, copies can be found by writing to: 7# ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. 8########################################################################## 9 10import re 11import debug, tests, barrelfish 12from common import TestCommon, TimeoutError 13from results import RowResults 14 15@tests.add_test 16class BOMPSideBySideTest(TestCommon): 17 ''' BOMP side-by-side app execution benchmark ''' 18 name = "bomp_sidebyside" 19 20 def get_modules(self, build, machine, cores=0): 21 modules = super(BOMPSideBySideTest, self).get_modules(build, machine) 22 modules.add_module("bomp_sync_progress", ["core=0", str(cores)]) 23 modules.add_module("bomp_cpu_bound_progress", ["core=8", "8"]) 24 return modules 25 26 def run(self, build, machine, testdir): 27 for cores in range(2, machine.get_ncores()): 28 modules = self.get_modules(build, machine, cores) 29 self.boot(machine, modules) 30 for line in self.collect_data(machine): 31 yield line 32 33 def process_data(self, testdir, raw_iter): 34 return PassFailResult(True) 35 # results = RowResults(['threads', 'sync', 'cpu_bound']) 36 # havesync = False 37 # havecpu = False 38 39 # for line in raw_iter: 40 # m = re.match("bomp_sync: threads (\d+), compute time (\d+) ticks", line) 41 # if m: 42 # threads = int(m.group(1)) 43 # sync_ticks = int(m.group(2)) 44 # havesync = True 45 46 # m = re.match("bomp_cpu_bound: threads (\d+), compute time (\d+) ticks", line) 47 # if m: 48 # cpu_bound_ticks = int(m.group(2)) 49 # havecpu = True 50 51 # if havesync == True and havecpu == True: 52 # results.add_row([threads, sync_ticks, cpu_bound_ticks]) 53 # havesync = False 54 # havecpu = False 55 56 # return results 57