Scratch the last - the same errors occur with the latest master as
listed below. In my haste I didn't remove the already-compiled kernels
(I cleared the wrong cache directory <sigh>).

The fix is to comment out lines 312 and 457 of pycuda-complex.hpp and
recompile, I still get a ton of warning messages (the same declspec
ones as below) but I can run my examples.

i.

In [4]: %run mandelbrot_gpu.py
kernel.cu
C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(209):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(214):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(218):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(222):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(227):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(244):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(251):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(258):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(265):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(274):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(283):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(289):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(295):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(301):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(309):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(312):
error: calling a __device__ function from a __host__ function is not
allowed

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(348):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(354):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(359):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(364):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(370):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(387):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(394):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(401):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(408):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(417):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(428):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(434):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(440):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(446):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(454):
warning: __declspec attributes ignored

C:/Python26/lib/site-packages/pycuda-0.94beta-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex.hpp(457):
error: calling a __device__ function from a __host__ function is not
allowed

2 errors detected in the compilation of
"C:\DOCUME~1\parc\LOCALS~1\Temp/tmpxft_000009ec_00000000-6_kernel.cpp1.ii".
---------------------------------------------------------------------------
CompileError                              Traceback (most recent call last)

C:\Panalytical\pycuda_git\pycuda_master\examples\mandelbrot_gpu.py in <module>()
     69         "output[i] = (z[i]*z[i])+q[i] ",
     70         "complex4",
---> 71         preamble="#include <pycuda-complex.hpp>",)
     72
     73

C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\elementwise.pyc
in __init__(self, arguments, operation, name, keep, options, **kwargs)
    108             name="kernel", keep=False, options=[], **kwargs):
    109         self.func, self.arguments = get_elwise_kernel_and_types(
--> 110             arguments, operation, name, keep, options, **kwargs)
    111
    112         assert [i for i, arg in enumerate(self.arguments)

C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\elementwise.pyc
in get_elwise_kernel_and_types(arguments, operation, name, keep,
options, **kwargs)
     83
     84     mod = get_elwise_module(arguments, operation, name,
---> 85             keep, options, **kwargs)
     86
     87     from pycuda.tools import get_arg_type

C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\elementwise.pyc
in get_elwise_module(arguments, operation, name, keep, options,
preamble, loop_prep, after_loop)
     72             "after_loop": after_loop,
     73             },
---> 74         options=options, keep=keep)
     75
     76 def get_elwise_kernel_and_types(arguments, operation,

C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\compiler.pyc
in __init__(self, source, nvcc, options, keep, no_extern_c, arch,
code, cache_dir, include_dirs)
    226
    227         cubin = compile(source, nvcc, options, keep, no_extern_c,
--> 228                 arch, code, cache_dir, include_dirs)
    229
    230         from pycuda.driver import module_from_buffer

C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\compiler.pyc
in compile(source, nvcc, options, keep, no_extern_c, arch, code,
cache_dir, include_dirs)
    216         options.append("-I"+i)
    217
--> 218     return compile_plain(source, options, keep, nvcc, cache_dir)
    219
    220

C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\compiler.pyc
in compile_plain(source, options, keep, nvcc, cache_dir)
    103         from pycuda.driver import CompileError
    104         raise CompileError("nvcc compilation of %s failed" %
cu_file_path,
--> 105                 cmdline, stdout=stdout, stderr=stderr)
    106
    107     if stdout or stderr:

CompileError: nvcc compilation of
c:\docume~1\parc\locals~1\temp\tmpt_svxm\kernel.cu failed
[command: nvcc --cubin -arch sm_11
-IC:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\..\include\pycuda
kernel.cu]
WARNING: Failure executing file: <mandelbrot_gpu.py>






On 4 March 2010 09:37, Ian Ozsvald <i...@ianozsvald.com> wrote:
> Andreas - the patches work, cheers. Both of my tests (which failed
> yesterday) work first time, no warning messages are shown either
> (yesterday there were heaps of them).
> Much obliged,
> Ian.
>
> On 3 March 2010 21:58, Andreas Klöckner <li...@informa.tiker.net> wrote:
>> On Mittwoch 03 März 2010, Ian Ozsvald wrote:
>>> lude/pycuda\pycuda-complex.hpp(299): error: c
>>> alling a __device__ function from a __host__ function is not allowed
>>
>> I've added a few more fixes to git master. Can you please try it and
>> report back? If it doesn't work, please post the entire error message.
>>
>> Andreas
>>
>>
>
>
>
> --
> Ian Ozsvald (A.I. researcher, screencaster)
> i...@ianozsvald.com
>
> http://IanOzsvald.com
> http://morconsulting.com/
> http://TheScreencastingHandbook.com
> http://ProCasts.co.uk/examples.html
> http://twitter.com/ianozsvald
>



-- 
Ian Ozsvald (A.I. researcher, screencaster)
i...@ianozsvald.com

http://IanOzsvald.com
http://morconsulting.com/
http://TheScreencastingHandbook.com
http://ProCasts.co.uk/examples.html
http://twitter.com/ianozsvald

_______________________________________________
PyCUDA mailing list
pyc...@host304.hostmonster.com
http://host304.hostmonster.com/mailman/listinfo/pycuda_tiker.net

Reply via email to