Hi there,

I am receiving an error of the form:
pycuda._driver.LogicError: cuMemHostAlloc failed: invalid value

when using a python software which uses pycuda. The error occurs after
calling pagelocked_alloc_func(shape=
shape, dtype=dtype, mem_flags=flags)
where shape = 1037400, dtype = dtype([('x', '<u4'), ('y', '<u4'), ('z',
'<u4')]), and flags = 6

I understand that this means something is going wrong when trying to get
pinned host memory, but cannot understand what causes it.

Here is my setup:
PyCUDA version 2012.1, installed via pip
CUDA version 4.2.9
Ubuntu 11.04
Python 2.7.1+
Video card NVidia GTX-260, Compute Capability 1.3

This is in the context of a python software that has worked before, and
pretty much installs itself. I've verified that CUDA runs correctly.

If anyone has advice on how to track why this error is being thrown or
reasons that cause it I would really appreciate it.

For verbosity here is the full error I get when running the software:
INFO:chroma:Building new BVH using recursive grid algorithm.
Traceback (most recent call last):
  File "/home/shoebox/chroma_env/bin/chroma-cam", line 7, in <module>
    execfile(__file__)
  File "/home/shoebox/chroma_env/src/chroma/bin/chroma-cam", line 32, in
<module>
    geometry = chroma.loader.load_geometry_from_string(args[0])
  File "/home/shoebox/chroma_env/src/chroma/chroma/loader.py", line 111, in
load_geometry_from_string
    cuda_device=cuda_device)
  File "/home/shoebox/chroma_env/src/chroma/chroma/loader.py", line 189, in
create_geometry_from_obj
    cuda_device=cuda_device)
  File "/home/shoebox/chroma_env/src/chroma/chroma/loader.py", line 151, in
load_bvh
    bvh = make_recursive_grid_bvh(geometry.mesh, target_degree=3)
  File "/home/shoebox/chroma_env/src/chroma/chroma/bvh/grid.py", line 23,
in make_recursive_grid_bvh
    world_coords, leaf_nodes, morton_codes = create_leaf_nodes(mesh)
  File "/home/shoebox/chroma_env/src/chroma/chroma/gpu/bvh.py", line 52, in
create_leaf_nodes
    write_combined=True)
  File "/home/shoebox/chroma_env/src/chroma/chroma/gpu/tools.py", line 210,
in mapped_empty
    return mapped_alloc(cuda.pagelocked_empty, shape, dtype, write_combined)
  File "/home/shoebox/chroma_env/src/chroma/chroma/gpu/tools.py", line 205,
in mapped_alloc
    array = pagelocked_alloc_func(shape=shape, dtype=dtype, mem_flags=flags)
pycuda._driver.LogicError: cuMemHostAlloc failed: invalid value
-------------------------------------------------------------------
PyCUDA ERROR: The context stack was not empty upon module cleanup.
-------------------------------------------------------------------
A context was still active when the context stack was being
cleaned up. At this point in our execution, CUDA may already
have been deinitialized, so there is no way we can finish
cleanly. The program will be aborted now.
Use Context.pop() to avoid this problem.
-------------------------------------------------------------------
Aborted

- Aaron
[email protected]
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to