From c51c2e8d9c9d841af567d8bb57217db3340efb60 Mon Sep 17 00:00:00 2001 From: Anthony LaTorre Date: Sat, 18 Jun 2011 19:47:48 -0400 Subject: forgot to initialize gpu random number states in gputhread.run() --- gputhread.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gputhread.py') diff --git a/gputhread.py b/gputhread.py index 3aa3cb2..0ee0155 100644 --- a/gputhread.py +++ b/gputhread.py @@ -75,8 +75,11 @@ class GPUThread(threading.Thread): context = device.make_context() module = SourceModule(src.kernel, options=['-I' + src.dir], no_extern_c=True, cache_dir=False) propagate = module.get_function('propagate') + init_rng = module.get_function('init_rng') texrefs = self.geometry.load(module) + init_rng(np.int32(1000000), np.int32(0), np.int32(0), block=(self.nblocks,1,1), grid=(1000000//self.nblocks,1)) + while not self.stopped(): try: job = self.jobs.get(block=False, timeout=0.5) -- cgit