Re: [PyCUDA] test_driver.py problem
On Sat, 17 Jul 2010 17:40:27 -0400, Julien Cornebise julien.corneb...@gmail.com wrote: The daemon of forgotten attachment strikes again. Corrected. Sorry about that. On Sat, Jul 17, 2010 at 5:39 PM, Julien Cornebise julien.corneb...@gmail.com wrote: Awesome, thanks Andreas ! Indeed test_driver.py works perfectly now. test_gpuarray.py still fails 10 out of 23, are they the same reason ? [output attached if you want to have a look]. Odd, I can't reproduce these issues on the Fermis I have access to. (a 480 and a couple C2050s) Something is odd, too--these NotImplementedErrors should be gone--did you get a partial git update somehow? (Ian implemented these a while ago IIRC) In any case, that means that the GPU is indeed working good, and that so does pyCUDA, then, thank you ! Have fun in SIAM meeting -- here, enjoying SAMSI Summer Workshop, where the possibilities of GPU to speed-up Bayesian analysis of Pharmacokinetics/Pharmacodynamics (PK/PD) data seem to have interested the PK/PD people, often bothered by the amount of time required by Monte-Carlo methods. Cool--if you end up with a nice application of PyCUDA, please consider adding it to the PyCUDA showcase: http://wiki.tiker.net/PyCuda/ShowCase Andreas pgpII8jQZXrqG.pgp Description: PGP signature ___ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda
Re: [PyCUDA] test_driver.py problem
Odd, I can't reproduce these issues on the Fermis I have access to. (a 480 and a couple C2050s) Something is odd, too--these NotImplementedErrors should be gone--did you get a partial git update somehow? (Ian implemented these a while ago IIRC) Woops, indeed, my bad: I last ran make install on 0.94rc during my tests, not on the latest git. Corrected ! So now indeed test_gpuarray.py only fails 4 tests (29 success): minmax, subset_minmax, sum, and dot. Attached is the output. Looks liike numerical asserts failing... Cool--if you end up with a nice application of PyCUDA, please consider adding it to the PyCUDA showcase: Sure will ! I may have to use Matlab (sigh) and MEX-files for this very project, though, that my collaborators use more easily -- but I'm not against pushing it to python later on ! pyCUDA seems actually much, much more comfortable than using MEX files (not even getting into python vs Matlab, nuff said). Julien cuInit cuDeviceGetCount cuDeviceGetCount cuDeviceGet cuCtxCreate cuCtxGetDevice test session starts platform linux2 -- Python 2.6.5 -- pytest-1.3.2 test path 1: test_gpuarray.py test_gpuarray.py ...F.F.FF = FAILURES == _ TestGPUArray.test_minmax __ def f(*args, **kwargs): import pycuda.driver # appears to be idempotent, i.e. no harm in calling it more than once pycuda.driver.init() ctx = make_default_context() try: assert isinstance(ctx.get_device().name(), str) assert isinstance(ctx.get_device().compute_capability(), tuple) assert isinstance(ctx.get_device().get_attributes(), dict) inner_f(*args, **kwargs) /usr/local/lib/python2.6/dist-packages/pycuda-0.94rc-py2.6-linux-i686.egg/pycuda/tools.py:503: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = test_gpuarray.TestGPUArray instance at 0x935fb0c @mark_cuda_test def test_minmax(self): from pycuda.curandom import rand as curand if has_double_support(): dtypes = [numpy.float64, numpy.float32, numpy.int32] else: dtypes = [numpy.float32, numpy.int32] for what in [min, max]: for dtype in dtypes: a_gpu = curand((20,), dtype) a = a_gpu.get() op_a = getattr(numpy, what)(a) op_a_gpu = getattr(gpuarray, what)(a_gpu).get() assert op_a_gpu == op_a, (op_a_gpu, op_a, dtype, what) E AssertionError: (array(0.00056963879615068436, dtype=float32), 6.0442835e-06, type 'numpy.float32', 'min') test_gpuarray.py:424: AssertionError -- Captured stderr -- cuInit cuDeviceGetCount cuDeviceGetCount cuDeviceGet cuCtxPopCurrent cuCtxCreate cuCtxGetDevice cuDeviceGetName cuCtxGetDevice cuDeviceComputeCapability cuCtxGetDevice cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuCtxGetDevice cuMemAlloc cuCtxGetDevice cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceComputeCapability cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuCtxGetDevice cuDeviceComputeCapability cuModuleLoadDataEx cuModuleGetFunction cuFuncSetBlockShape (md5_rng_float) cuParamSetSize (md5_rng_float) cuFuncSetBlockShape (md5_rng_float) cuParamSetv (md5_rng_float) cuLaunchGrid (md5_rng_float) cuModuleUnload cuMemcpyDtoH cuCtxGetDevice cuDeviceComputeCapability cuModuleLoadDataEx cuModuleGetFunction cuFuncSetBlockShape (reduce_kernel_stage1) cuParamSetSize (reduce_kernel_stage1) cuCtxGetDevice cuDeviceComputeCapability cuModuleLoadDataEx cuModuleGetFunction cuFuncSetBlockShape (reduce_kernel_stage2) cuParamSetSize (reduce_kernel_stage2) cuMemAlloc cuCtxGetDevice cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceComputeCapability cuDeviceGetAttribute cuDeviceGetAttribute cuDeviceGetAttribute cuParamSetv
Re: [PyCUDA] test_driver.py problem
Hi Julien, On Fri, 9 Jul 2010 21:16:36 -0700, Julien Cornebise julien.corneb...@gmail.com wrote: New to pyCuda, and very excited by the possibilities, I'm unfortunately having a LaunchError problem with test_driver.py. I have tried to trace it down using printf() and such, and it seems that the last push over the cliff is in cuda.hpp context::prepare_context_switch(), line 505, a cuCtxPopCurrent returns CUDA_LAUNCH_FAILED -- although CUDA 3.1 Reference Manual p. 412 does not list it as a possible return but adds that it may also return error codes from previous, asynchronous launches., which I hence assume is the case. My rusted C/C++ skills do not allow me to go further, nor to be even sure that's the real problem. I'm using PyCUDA as checked out from git tonight, and Cuda 3.1 on Linux Ubuntu 10.04, with Python 2.6.5, and a brand new Geforce GTX 470. The GPU is fully functioning: I run all CUDA SDK's examples without a problem. I also run pyCUDA test_math.py with no problem. (20 passed) Attached is the output of running python test_driver.py out with CUDA_TRACE = 1. That's how far I've been able to go by myself, so now I'm turning to you: any help much welcome, thank you ! :) Sorry for the late reply--at SIAM AN10 currently. (Btw Bryan: I'll be at your talk later. Anyone else want to meet up?) This should be fixed in git--Fermi GPUs apparently minds misaligned access, which was what one test in there was doing. HTH, Andreas pgpT0D3o3ccPz.pgp Description: PGP signature ___ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda
Re: [PyCUDA] test_driver.py problem
On installing my GTX 480 a couple of weeks back I noticed errors too. test_math.py works fine test_gpuarray.py has soft errors - it looks like the precision of some of the results breaks the assertions test_driver.py has hard erros - the equivalent of a seg fault followed by instability for me requiring a reboot. I'm using WinXP SP3 32 bit, CUDA 3.1, the latest WHQL drivers (257.21) last week and the latest beta (258.96) this week. My pyCUDA is latest as of yesterday. With a GT220 (9th generation) and 9800GT (8th generation) with CUDA 3.1 I don't see these problems. I confess I've ignored them so far so I could push on with my client's problems. I had awful instability issues a few weeks back, I think whenever I hit memory badly (e.g. sending a double but receiving a float) then the system with a GTX 480 becomes very unstable, it locks up a few minutes later requiring a hard reset. For me all the CUDA demos work fine and the pyCUDA examples are fine (I've been using my mandelbrot.py [see wiki] as the main testing point as I'm using complexdouble for my physics code). This is an example of the error I see in test_driver.py that leads to a locked system: c:\python26\lib\site-packages\pycuda-0.94rc-py2.6-win32.egg\pycuda\tools.py:217: RuntimeError 18 failed in 0.61 seconds Error in atexit._run_exitfuncs: Traceback (most recent call last): File c:\python26\lib\atexit.py, line 24, in _run_exitfuncs func(*targs, **kargs) LogicError: cuCtxPopCurrent failed: invalid context Error in sys.exitfunc: Traceback (most recent call last): File c:\python26\lib\atexit.py, line 24, in _run_exitfuncs func(*targs, **kargs) pycuda._driver.LogicError: cuCtxPopCurrent failed: invalid context --- 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. i. On 14 July 2010 20:17, Julien Cornebise julien.corneb...@gmail.com wrote: Thank you very much for the suggestion. However, I am using drivers 256.35, with which CUDA 3.1 seems to work fine: all of the tests coming with the Toolktit runs flawlessly, both those based on CudaRT and those based on driver-mode, as well as the test_math.py pyCuda test. Any other idea please ? Julien On Wed, Jul 14, 2010 at 2:58 PM, Tomasz Rybak bogom...@post.pl wrote: Dnia 2010-07-13, wto o godzinie 11:22 -0400, Julien Cornebise pisze: Dear all, I have been trying with pycuda 0.94rc (instead of latest GIT commit), and the problem stays the same :( And correction: I'm using python 2.6.4 (not 2.6.5) Would anybody have an idea, please ? Any help much appreciated ! Thanks Which version of drivers are you using? I have noticed on Debian that when I am on drivers 195.36.24, CUDA 3.1 does not work, returning library errors. I had to go back to CUDA toolkit 3.0 to get working programs. Maybe this is your problem? Regards. -- Tomasz Rybak bogom...@post.pl GPG/PGP key ID: 2AD5 9860 Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860 http://member.acm.org/~tomaszrybak ___ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda -- Ian Ozsvald (A.I. researcher, screencaster) i...@ianozsvald.com http://IanOzsvald.com http://MorConsulting.com/ http://blog.AICookbook.com/ http://TheScreencastingHandbook.com http://FivePoundApp.com/ http://twitter.com/IanOzsvald ___ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda
Re: [PyCUDA] test_driver.py problem
Dnia 2010-07-13, wto o godzinie 11:22 -0400, Julien Cornebise pisze: Dear all, I have been trying with pycuda 0.94rc (instead of latest GIT commit), and the problem stays the same :( And correction: I'm using python 2.6.4 (not 2.6.5) Would anybody have an idea, please ? Any help much appreciated ! Thanks Which version of drivers are you using? I have noticed on Debian that when I am on drivers 195.36.24, CUDA 3.1 does not work, returning library errors. I had to go back to CUDA toolkit 3.0 to get working programs. Maybe this is your problem? Regards. -- Tomasz Rybak bogom...@post.pl GPG/PGP key ID: 2AD5 9860 Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860 http://member.acm.org/~tomaszrybak signature.asc Description: This is a digitally signed message part ___ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda
Re: [PyCUDA] test_driver.py problem
Dear all, I have been trying with pycuda 0.94rc (instead of latest GIT commit), and the problem stays the same :( And correction: I'm using python 2.6.4 (not 2.6.5) Would anybody have an idea, please ? Any help much appreciated ! Thanks Julien On Sat, Jul 10, 2010 at 12:16 AM, Julien Cornebise julien.corneb...@gmail.com wrote: Hi, New to pyCuda, and very excited by the possibilities, I'm unfortunately having a LaunchError problem with test_driver.py. I have tried to trace it down using printf() and such, and it seems that the last push over the cliff is in cuda.hpp context::prepare_context_switch(), line 505, a cuCtxPopCurrent returns CUDA_LAUNCH_FAILED -- although CUDA 3.1 Reference Manual p. 412 does not list it as a possible return but adds that it may also return error codes from previous, asynchronous launches., which I hence assume is the case. My rusted C/C++ skills do not allow me to go further, nor to be even sure that's the real problem. I'm using PyCUDA as checked out from git tonight, and Cuda 3.1 on Linux Ubuntu 10.04, with Python 2.6.5, and a brand new Geforce GTX 470. The GPU is fully functioning: I run all CUDA SDK's examples without a problem. I also run pyCUDA test_math.py with no problem. (20 passed) Attached is the output of running python test_driver.py out with CUDA_TRACE = 1. That's how far I've been able to go by myself, so now I'm turning to you: any help much welcome, thank you ! :) Julien Cornebise, Ph.D. Postdoctoral Fellow, University of British Columbia http://www.cs.ubc.ca/~cornebis/ ___ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda
Re: [PyCuda] test_driver.py problem
Hi Jyh-Shyong, On Sonntag 14 Dezember 2008, Jyh-Shyong Ho wrote: I just installed pycuda-0.90.2 on my computer and I got the following error message when I ran the program test_drive.py: python test_drive.py Traceback (most recent call last): File test_driver.py, line 2, in module import pycuda.driver as drv File /usr/local/lib64/python2.5/site-packages/pycuda-0.90.2-py2.5-linux-x86_64. egg/pycuda/driver.py, line 1, in module from _driver import * ImportError: /usr/local/lib64/python2.5/site-packages/pycuda-0.90.2-py2.5-linux-x86_64.e gg/pycuda/_driver.so: undefined symbol: _ZN5boost6python9converter8registry9push_backEPFPvP7_objectEPFvS5_PNS1_30rv alue_from_python_stage1_dataEENS0_9type_infoE Likely you have system boost headers installed (like in /usr/include). These probably got picked up for the build and then ended up mismatching those of a separately installed newer boost. Just deinstall the system-wide boost dev stuff using rpm. If that's not the case, then check with ldd /usr/local/lib64/python2.5/site-packages/pycuda-0.90.2-py2.5-linux- x86_64.egg/pycuda/_driver.so that the right boost library is getting picked up and report back. Also, why use an old version (0.90.2) of PyCuda? 0.91.1 is out and fixes numerous bugs. (and has more features) Andreas signature.asc Description: This is a digitally signed message part. ___ PyCuda mailing list PyCuda@tiker.net http://tiker.net/mailman/listinfo/pycuda_tiker.net