90 |
|
|
91 |
@param scale: defines the number of (OpenMP) threads to be used. If scale is a scalar all benchmarks |
@param scale: defines the number of (OpenMP) threads to be used. If scale is a scalar all benchmarks |
92 |
are run with scale number of threads. If scale is a C{list}, the p-th problem in each of the benchmarks |
are run with scale number of threads. If scale is a C{list}, the p-th problem in each of the benchmarks |
93 |
in the suite is run with scale[p] threads. In the case, len(scale) has to be less or equal to the |
in the suite is run with scale[p] threads. |
|
largest benchmark in the suite. |
|
94 |
@type scale: C{int} or C{list} of C{int}s. |
@type scale: C{int} or C{list} of C{int}s. |
95 |
""" |
""" |
96 |
self.__scale=scale |
self.__scale=scale |
183 |
|
|
184 |
@param scale: defines the number of (OpenMP) threads to be used. If scale is a scalar all benchmarks |
@param scale: defines the number of (OpenMP) threads to be used. If scale is a scalar all benchmarks |
185 |
are run with scale number of threads. If scale is a C{list}, the p-th problem in each of the benchmarks |
are run with scale number of threads. If scale is a C{list}, the p-th problem in each of the benchmarks |
186 |
in the suite is run with scale[p] threads. In the case, len(scale) has to be less or equal to the |
in the suite is run with scale[p] threads. |
|
largest benchmark in the suite. |
|
187 |
@type scale: C{int} or C{list} of C{int}s. |
@type scale: C{int} or C{list} of C{int}s. |
188 |
""" |
""" |
189 |
if isinstance(scale,list): |
if isinstance(scale,list): |
190 |
if len(scale)<len(self.__problems): |
c_max=min(len(scale),len(self.__problems)) |
191 |
raise ValueError,"scale list is too small. must be greater or equal to the number of problems in the benchmark" |
else: |
192 |
|
c_max=len(self.__problems) |
193 |
self.__filter=filter |
self.__filter=filter |
194 |
self.__scale=scale |
self.__scale=scale |
195 |
self.__results=[] |
self.__results=[] |
196 |
c=0 |
for c in range(c_max): |
197 |
for r in self.__problems: |
r=self.__problems[c] |
198 |
if isinstance(scale,list): |
if isinstance(scale,list): |
199 |
s=scale[c] |
s=scale[c] |
200 |
else: |
else: |
204 |
os.environ['OMP_NUM_TREADS']=str(s) |
os.environ['OMP_NUM_TREADS']=str(s) |
205 |
row.append(r.run(p)) |
row.append(r.run(p)) |
206 |
self.__results.append(row) |
self.__results.append(row) |
|
c+=1 |
|
207 |
def getHTML(self,filter,level=1): |
def getHTML(self,filter,level=1): |
208 |
""" |
""" |
209 |
returns the results of the last benchmark run in HTML format. |
returns the results of the last benchmark run in HTML format. |