Skip to content

Commit

Permalink
fix for review
Browse files Browse the repository at this point in the history
  • Loading branch information
jgphpc committed May 3, 2019
1 parent 75976bd commit 09ad4a6
Showing 1 changed file with 23 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,30 @@ def __init__(self):
self.maintainers = ['JG']
self.tags = {'scs'}

@property
@sn.sanity_function
def arithmetic_intensity(self):
flops = sn.extractsingle(r'^--->Total FLOPs = (?P<flops>\d+)',
self.rpt, 'flops', int)
byts = sn.extractsingle(r'^--->Total Bytes = (?P<byts>\d+)',
self.rpt, 'byts', int)
return flops/byts

@property
@sn.sanity_function
def gflops(self):
flops = sn.extractsingle(r'^--->Total FLOPs = (?P<flops>\d+)',
self.rpt, 'flops', int)
sec = sn.extractsingle(r'^Triad:\s+\d+\.\d+\s+(?P<avgtime>\d+\.\d+)',
self.stdout, 'avgtime', float)
step = sn.extractsingle(r'^Each kernel will be executed (?P<step>\d+)',
self.stdout, 'step', int)
return flops/(sec*step*10**9)

def setup(self, partition, environ, **job_opts):
self.executable_opts = self.sdeflags
super().setup(partition, environ, **job_opts)
if not self.num_tasks == 36:
if self.num_tasks != 36:
self.job.options = ['--cpu-bind=verbose,none']
else:
self.job.options = ['--cpu-bind=verbose']
Expand All @@ -49,6 +69,7 @@ def setup(self, partition, environ, **job_opts):
@rfm.parameterized_test(*[[mpitask, arraysize]
for mpitask in [2]
for arraysize in [100000000]])
# For parameter space study, you may want to use:
# for mpitask in [36, 18, 12, 9, 6, 4, 3, 2, 1]
# for arraysize in [400000000, 200000000, 100000000]])
class SdeBroadwellJ1Test(SdeBaseTest):
Expand Down Expand Up @@ -89,30 +110,11 @@ def __init__(self, mpitask, arraysize):
sn.assert_reference(self.arithmetic_intensity, ai, -0.1, 0.3),
])

@property
@sn.sanity_function
def arithmetic_intensity(self):
flops = sn.extractsingle(r'^--->Total FLOPs = (?P<flops>\d+)',
self.rpt, 'flops', int)
byts = sn.extractsingle(r'^--->Total Bytes = (?P<byts>\d+)',
self.rpt, 'byts', int)
return flops/byts

@property
@sn.sanity_function
def gflops(self):
flops = sn.extractsingle(r'^--->Total FLOPs = (?P<flops>\d+)',
self.rpt, 'flops', int)
sec = sn.extractsingle(r'^Triad:\s+\d+\.\d+\s+(?P<avgtime>\d+\.\d+)',
self.stdout, 'avgtime', float)
step = sn.extractsingle(r'^Each kernel will be executed (?P<step>\d+)',
self.stdout, 'step', int)
return flops/(sec*step*10**9)


@rfm.parameterized_test(*[[mpitask, arraysize]
for mpitask in [2]
for arraysize in [100000000]])
# For parameter space study, you may want to use:
# for mpitask in [72, 36, 24, 18, 12, 9, 8, 6, 4, 3, 2,
# 1]
# for arraysize in [400000000, 200000000, 100000000]])
Expand Down Expand Up @@ -153,23 +155,3 @@ def __init__(self, mpitask, arraysize):
sn.assert_reference(self.gflops, gflops, -0.1, 0.3),
sn.assert_reference(self.arithmetic_intensity, ai, -0.1, 0.3),
])

@property
@sn.sanity_function
def arithmetic_intensity(self):
flops = sn.extractsingle(r'^--->Total FLOPs = (?P<flops>\d+)',
self.rpt, 'flops', int)
byts = sn.extractsingle(r'^--->Total Bytes = (?P<byts>\d+)',
self.rpt, 'byts', int)
return flops/byts

@property
@sn.sanity_function
def gflops(self):
flops = sn.extractsingle(r'^--->Total FLOPs = (?P<flops>\d+)',
self.rpt, 'flops', int)
sec = sn.extractsingle(r'^Triad:\s+\d+\.\d+\s+(?P<avgtime>\d+\.\d+)',
self.stdout, 'avgtime', float)
step = sn.extractsingle(r'^Each kernel will be executed (?P<step>\d+)',
self.stdout, 'step', int)
return ((flops/(sec*step))/10**9)

0 comments on commit 09ad4a6

Please sign in to comment.