/[escript]/trunk/escript/py_src/benchmark.py
ViewVC logotype

Diff of /trunk/escript/py_src/benchmark.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 386 by gross, Tue Dec 20 00:31:52 2005 UTC revision 387 by gross, Tue Dec 20 00:37:20 2005 UTC
# Line 90  class BenchmarkSuite(object): Line 90  class BenchmarkSuite(object):
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 suite is run with scale[p] threads. If scale[p]<1 teh p-th problem is omitted.
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      
# Line 183  class Benchmark(object): Line 183  class Benchmark(object):
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 suite is run with scale[p] threads. If scale[p]<1 teh p-th problem is omitted.
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):
# Line 200  class Benchmark(object): Line 200  class Benchmark(object):
200            else:            else:
201               s=scale               s=scale
202            row=[]            row=[]
203            for p in self.__options:            if s>0:
204                os.environ['OMP_NUM_TREADS']=str(s)                for p in self.__options:
205                row.append(r.run(p))                    os.environ['OMP_NUM_THREADS']=str(s)
206                      row.append(r.run(p))
207            self.__results.append(row)            self.__results.append(row)
208     def getHTML(self,filter,level=1):     def getHTML(self,filter,level=1):
209         """         """

Legend:
Removed from v.386  
changed lines
  Added in v.387

  ViewVC Help
Powered by ViewVC 1.1.26