Actually there *is* a bug in here, it just hides behind cached code.
It occurs for both cumath calls and SourceModules if you use complex
numbers.

On Windows XP 32 bit (CUDA 2.3, Python 2.6, Microsoft Visual Studio
2008/VS9) with pyCUDA0.94rc I can consistently generate an Internal
Compiler Error like the following:
----
C:/Python26/lib/site-packages/pycuda-0.94rc-py2.6-win32.egg/pycuda/../include/pycuda\pycuda-complex-impl.hpp(350)
: fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'msc1.cpp', line 1411)
 To work around this problem, try simplifying or changing the program
near the locations listed above.
Please choose the Technical Support command on the Visual C++
 Help menu, or open the Technical Support help file for more information
Internal Compiler Error in C:\Program Files\Microsoft Visual Studio
9.0\VC\bin\cl.exe.  You will be prompted to send an
error report to Microsoft later.
----

The problem lies in pycuda-complex-impl.hpp on lines 349-350 and
401-402, these lines are:
__device__ complex<double> tan(const complex<double>& z)
{ return tanT(z, double_limit); }
and
__device__ complex<double> tanh(const complex<double>& z)
{ return tanhT(z, double_limit); }

Commenting out these two blocks and recompiling pyCUDA makes the
problem go away (though of course there's no double precision support
for tan and tanh at that point). I only have a single precision card
so I'm ignoring this problem for now.

These two functions are the only ones that use double_limit:
#define double_limit ::log(DBL_MAX)
which I'm presuming is the culprit. Possibly the choice of DBL_MAX is
the problem, maybe the number needs to be different on Windows 32
bit/msvc?

I'm flagging this so someone else knows what's going on if they hit the error,
Ian.

On 10 May 2010 16:37, Ian Ozsvald <i...@ianozsvald.com> wrote:
> Problem solved - user error had occurred. The MacBook had a full
> checkout of HEAD and worked infe, the Windows machine appeared to have
> everything as well (and git reported being up to date with no
> modifications) but somehow I lacked "}}" at the end of
> pycuda-complex-impl.hpp (which took a fair while to diagnose).
>
> On the up side I do now have a rather good understanding of the
> internals of code generation in pyCUDA and the tan(complex) support is
> absolutely spot-on - many thanks!
>
> Righto, back to the task at hand and sorry for the bad bug report,
> Ian.
>
> On 10 May 2010 08:15, Andreas Klöckner <li...@informa.tiker.net> wrote:
>> On Freitag 07 Mai 2010, Ian Ozsvald wrote:
>>> l error C1001: An internal error has occurred in the compiler.
>>> (compiler file 'msc1.cpp', line 1411)
>>
>> Here's one idea: The code refers to environment-provided trig functions
>> as ::sin, i.e. using the double-colon namespace escape. Perhaps it helps
>> to remove those double colons?
>>
>> Beyond that, I'm not sure I can help--an ICE is a compiler bug.
>>
>> 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
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to