summaryrefslogtreecommitdiff
path: root/benchmark.py
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-09-10 15:06:20 -0400
committerStan Seibert <stan@mtrr.org>2011-09-10 15:06:20 -0400
commitc7144c23df44907327f5b112e62904ed244f9b27 (patch)
tree6ce340086ba8a2febbe9126d9b3c0ecb3cfb73e4 /benchmark.py
parent4c554d621d9b66c595397a0667d212bc4ea57be1 (diff)
parent254a0713a85c869e96425522df4ae182f3ab8e13 (diff)
downloadchroma-c7144c23df44907327f5b112e62904ed244f9b27.tar.gz
chroma-c7144c23df44907327f5b112e62904ed244f9b27.tar.bz2
chroma-c7144c23df44907327f5b112e62904ed244f9b27.zip
merge
Diffstat (limited to 'benchmark.py')
-rwxr-xr-xbenchmark.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/benchmark.py b/benchmark.py
index 9f90c7b..5a344bf 100755
--- a/benchmark.py
+++ b/benchmark.py
@@ -152,23 +152,23 @@ if __name__ == '__main__':
from chroma import detectors
import gc
- lbne = detectors.build_lbne_200kton()
+ lbne = detectors.lbne()
lbne.build(bits=11)
- gpu_instance = gpu.GPU()
+ context = gpu.create_cuda_context()
gpu_geometry = gpu.GPUGeometry(lbne)
- gpu_instance.print_mem_info()
print '%s ray intersections/sec.' % \
tools.ufloat_to_str(intersect(gpu_geometry))
+ # run garbage collection since there is a reference loop
+ # in the GPUArray class.
gc.collect()
- gpu_instance.print_mem_info()
print '%s photons loaded/sec.' % tools.ufloat_to_str(load_photons())
gc.collect()
- gpu_instance.print_mem_info()
print '%s photons propagated/sec.' % \
tools.ufloat_to_str(propagate(gpu_geometry))
gc.collect()
- gpu_instance.print_mem_info()
print '%s 100 MeV events histogrammed/s' % \
tools.ufloat_to_str(pdf(gpu_geometry, max(lbne.pmtids)))
+
+ context.pop()