Error Message

33 views
Skip to first unread message

0vbb...@gmail.com

unread,
Jun 27, 2016, 2:28:00 PM6/27/16
to chroma-sim
Hi,

I copied and pasted your "Building a Simple detector" example code, into a python file and ran it, then received this error message.

Traceback (most recent call last):
  File "SimpDetect.py", line 113, in <module>
    sim = Simulation(g, geant4_processes=0)
  File "/home/chroma/Desktop/Henry/chroma/sim.py", line 49, in __init__
    self.gpu_geometry = gpu.GPUGeometry(detector)
  File "/home/chroma/Desktop/Henry/chroma/gpu/geometry.py", line 68, in __init__
    np.float32(wavelengths[0])])
  File "/home/chroma/Desktop/Henry/chroma/gpu/tools.py", line 160, in make_gpu_struct
    cuda.memcpy_htod(int(struct)+i, np.intp(int(member)))
TypeError: 'numpy.int64' does not have the buffer interface

I have run this script before on the same computer and have not changed anything since the last time I used it. Does anybody know why I am receiving this error message, or how I can fix it?

Thanks

Andy Mastbaum

unread,
Jun 27, 2016, 2:34:57 PM6/27/16
to chroma-sim
Hello,

If you take a look at this Pull Request: https://bitbucket.org/chroma/chroma/pull-requests/5, it shows the small change required in the file "chroma/gpu/tools.py" to correct this error. (Hopefully this can be merged into the main repository soon, then this will no longer be an issue).

Hope that helps!

Best,
Andy

--
You received this message because you are subscribed to the Google Groups "chroma-sim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chroma-sim+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anthony LaTorre

unread,
Jun 27, 2016, 2:43:25 PM6/27/16
to chroma-sim
Merged!
Reply all
Reply to author
Forward
0 new messages