Hi Matthias,

Matthias Lee <[email protected]> writes:
> I'm working on a bit of pycuda that for image processing. Today I have run
> into an interesting issues, when I run a high number of iterations of my
> code, I end up getting an error executing one of my Elementwise kernels. It
> is not always the same one and can happen at slightly different iterations.
> (these are extraordinarily simple kernels, nothing complicated)
>
> Error:
> pytools.prefork.ExecError: error invoking 'nvcc --preprocess -arch sm_35
> -I/usr/local/lib/python2.7/dist-packages/pycuda-2013.1-py2.7-linux-x86_64.egg/pycuda/cuda
> /tmp/tmplAgMsh.cu --compiler-options -P': [Errno 12] Cannot allocate memory
>
> This error is not directly in the pycuda codebase, but happens in
> pycuda/compiler.py in the preprocess_source function when it calls out to
> pytools/prefork.py
>
> see stack trace: http://pastebin.com/WQUFeTSG
>
> At this point in time I am neither out of memory on the Host(10GB+ free)
> nor on the Device(3GB+ free). I have the feeling this may have something to
> do with stack size or open file-descriptors.
>
> Has anyone seen this before?

No, I haven't--sorry. If you could provide a small script that
reproduces this behavior, I'd have a better chance of figuring out
what's going on.

In the meantime, your report suggests that you're creating
ElementwiseKernel instances in a loop. That's usually a bad idea,
because it incurs a compilation cost (or, at best, a cache lookup cost)
on every trip through the loop. It's usually much better to cache or
reuse a single ElementwiseKernel instance.

HTH,
Andreas

Attachment: pgpyxAqz4tpr_.pgp
Description: PGP signature

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

Reply via email to