[This mail bounced yesterday, I'm re-posting with a fix]. To follow-up - the problem with the Internal Compiler Error on Windows persists with CUDA 3.0 as well.
One solution is to comment out the two blocks of code that reference double_limit and rebuild pyCUDA. The better solution is to replace: #define DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 in pycuda-complex-impl.hpp with #define DBL_MAX 1.7976931348623158e+308 which is copied from MSVC's float.h. After rebuilding my complex number code works as expected with no Internal Compiler Errors. Andreas - I know you'd prefer a patch but I'm not sure of the right cross-platform/compiler way to add a conditional #define (the original code works fine on my Mac with gcc). I hope this helps (I'll be back with this client in mid June if a fix needs testing). Cheers, Ian. On 13 May 2010 14:11, Ian Ozsvald <i...@ianozsvald.com> wrote: > To follow-up - the problem persists with CUDA 3.0. I've upgraded on > Windows to CUDA 3.0 and nvidia driver 197.45, the internal compiler > error isn't affected. The solution (comment out the two blocks that > reference double_limit) continues to work. > Ian. > > On 12 May 2010 15:53, Ian Ozsvald <i...@ianozsvald.com> wrote: >> 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 >> > > > > -- > 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