Re: [PyCUDA] My modification to PyCUDA

2010-01-07 Thread Andreas Klöckner
On Mittwoch 30 Dezember 2009, Ying Wai (Daniel) Fan wrote: Andreas, I have done some changes to make arithmetic operation works with complex GPUArray objects. The patch is attached. I don't quite agree with your treatment of the complex scalars. Couple possibilities: 1) We ship a fixed

Re: [PyCUDA] Windows runtime error ImportError: DLL load failed: The specified module could not be found.

2010-01-08 Thread Andreas Klöckner
On Freitag 08 Januar 2010, Ian Ozsvald wrote: Can anyone suggest any reasons why boost is looking for python25.dll rather than the 2.6 equivalent? Check boost's project-config.jam. Andreas signature.asc Description: This is a digitally signed message part.

Re: [PyCUDA] PyCUDA on Snow Leopard

2010-01-11 Thread Andreas Klöckner
Hi Bryan, all, On Sonntag 10 Januar 2010, Bryan Catanzaro wrote: I also had this problem. Python on Snow Leopard defaults to a 64-bit executable. You can check this by typing: import sys print sys.maxint If it's ~2 billion, you're running Python in 32-bit mode. If it's a huge number,

Re: [PyCUDA] How do I make a multichannel 1D texture?

2010-01-15 Thread Andreas Klöckner
On Dienstag 12 Januar 2010, Dan Piponi wrote: I'm having trouble figuring out how to make a 4 channel 1D texture for use with tex1D. I can easily make a 2D 4 channel texture, from an MxNx4 numpy 3D array, using make_multichannel_2d_array and bind_array_to_texref. The third axis of the array

Re: [PyCUDA] Compile problems for pycuda on Karmic 64

2010-01-15 Thread Andreas Klöckner
On Freitag 15 Januar 2010, John Zbesko wrote: KeyError: '_driver' http://is.gd/6kvv9 HTH, Andreas signature.asc Description: This is a digitally signed message part. ___ PyCUDA mailing list PyCUDA@tiker.net

Re: [PyCUDA] Get PyCuda 0.93 working on Snow Leopard

2010-01-23 Thread Andreas Klöckner
Hi Krunal, first of all, welcome, and thanks for writing up your experience. I'm sorry that your install was as troublesome as it seems to have been. To make things better for everyone, I would like to ask two favors of you: 1) If there is anything that we can do by default in PyCUDA to make a

Re: [PyCUDA] Get PyCuda 0.93 working on Snow Leopard

2010-01-23 Thread Andreas Klöckner
On Samstag 23 Januar 2010, Krunal Patel wrote: Yes I think the default should be -m32. Done in git. Thanks for your advice. I have done the needful on the wiki pages. Thank you very much for your work! Andreas signature.asc Description: This is a digitally signed message part.

Re: [PyCUDA] Get PyCuda 0.93 working on Snow Leopard

2010-01-23 Thread Andreas Klöckner
On Samstag 23 Januar 2010, Andreas Klöckner wrote: I have done the needful on the wiki pages. Thank you very much for your work! I've hacked the Wiki a little bit--can you please take a quick look? Thanks! Andreas signature.asc Description: This is a digitally signed message part

Re: [PyCUDA] Windows runtime error ImportError: DLL load failed: The specified module could not be found.

2010-01-26 Thread Andreas Klöckner
On Dienstag 26 Januar 2010, Ian Ozsvald wrote: All done: http://wiki.tiker.net/PyCuda/Installation/Windows#Using_Visual_Studio_2008_ .28alternative_on_January_2010.29 Cool. Thanks very much. i. ps. Andreas I still get the REPLY field configured as Andreas Klöckner li...@informa.tiker.net

Re: [PyCUDA] Complex number support?

2010-01-27 Thread Andreas Klöckner
On Mittwoch 27 Januar 2010, Ian Ozsvald wrote: Hi Andreas/Ying Wai, I see a discussion you've had about complex number support: http://www.mail-archive.com/pycuda@tiker.net/msg00788.html I also see the 'complex' tag:

Re: [PyCUDA] Sharing is caring

2010-01-31 Thread Andreas Klöckner
On Sonntag 31 Januar 2010, Per B. Sederberg wrote: Perhaps, similar to the showcase on the wiki, we could add an examples page: http://wiki.tiker.net/PyCuda/ShowCase Andreas, what do you think? Good idea. See http://wiki.tiker.net/PyCuda/Examples The examples/ subdirectory now has a

Re: [PyCUDA] PyCUDA academic citation

2010-01-31 Thread Andreas Klöckner
Hi Imran, On Samstag 30 Januar 2010, Imran Haque wrote: Is there a particular paper or conference presentation that you'd like cited for PyCUDA in academic papers? It's the least we can do for your efforts! http://arxiv.org/abs/0911.3456 We've also submitted this to Parallel Computing

Re: [PyCUDA] Incorrect shared memory size for kernel

2010-02-07 Thread Andreas Klöckner
On Sonntag 07 Februar 2010, Bogdan Opanchuk wrote: .entry test ( .param .u32 __cudaparm_test_out) { .reg .u32 %r3; .reg .f32 %f4; .loc15 192 0 $LBB1_test: .loc15 198 0 ld.param.u32%r1,

Re: [PyCUDA] Installing PyCUDA windows vista x32

2010-02-07 Thread Andreas Klöckner
On Sonntag 07 Februar 2010, Marco André Argenta wrote: C:\Python26\lib\distutils\dist.py:266: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg) I can't say much about the error message, but the warning above makes me suspect that something relating to the

Re: [PyCUDA] Garbage after copying to and from shared memory

2010-02-28 Thread Andreas Klöckner
On Dienstag 09 Februar 2010, Bogdan Opanchuk wrote: Hello, Yet another stupid question. Most probably, I missed something obvious, but anyway - can someone explain why I get some NaN's in output for the program (listed below)? Surprisingly, bug disappears if I send '1' instead of '-1' as a

Re: [PyCUDA] possible bug ?

2010-03-01 Thread Andreas Klöckner
On Montag 01 März 2010, Fabrizio Milo aka misto wrote: I get strange errors on my macbook pro with the 3.0 Cuda I think there is an error invoking get_version should be get_version() diff --git a/pycuda/compiler.py b/pycuda/compiler.py index 140a098..0c13cf2 100644 --- a/pycuda/compiler.py

Re: [PyCUDA] questions on example

2010-03-01 Thread Andreas Klöckner
On Samstag 27 Februar 2010, Xueyu Zhu wrote: 11 const int i = threadIdx.x; I'd suggest you check this line here. :) Andreas signature.asc Description: This is a digitally signed message part. ___ PyCUDA mailing list

Re: [PyCUDA] Installing on Windows XP 64 bit/Microsoft Visual Studio 2008

2010-03-01 Thread Andreas Klöckner
On Montag 01 März 2010, reckoner wrote: The problem I'm having with the above mentioned Using Visual Studio 2008 (alternative on January 2010) instructions is that I cannot get the examples in pycuda to work. It seems to fail at the stage of linking the nvcc-compiled code and I'm not sure

Re: [PyCUDA] possible bug ?

2010-03-01 Thread Andreas Klöckner
On Montag 01 März 2010, Fabrizio Milo aka misto wrote: pycuda._driver.LogicError: cuMemcpyHtoDAsync failed: invalid value Weird. I can't reproduce this on Linux. Anyone on Mac? Btw what is the best way to send you patches? Use a git checkout, commit your changes, then use 'git format-patch'.

Re: [PyCUDA] Installing on Windows XP 64 bit/Microsoft Visual Studio 2008

2010-03-02 Thread Andreas Klöckner
On Dienstag 02 März 2010, reckoner wrote: I ran test_driver.py and it looked like it was working okay, until it caused my screen to pixelate so much that I couldn't read it. Thanks in advance. This shouldn't happen--or rather, the driver should prevent this from happening. AFAIK, GPUs have

Re: [PyCUDA] FFT for PyCuda

2010-03-02 Thread Andreas Klöckner
On Dienstag 02 März 2010, Bogdan Opanchuk wrote: If you'd like pycudafft to be part of PyCUDA itself, we can discuss how that could happen. I am not sure it is necessary. There is *nix ideology, which favors separated functionality. And you will have to add mako templating engine as a

Re: [PyCUDA] Attempts of patches

2010-03-03 Thread Andreas Klöckner
On Mittwoch 03 März 2010, Fabrizio Milo aka misto wrote: Wouldn't benefit performance wise? No. What about creating a Device that is just a Proxy for the real _driver.Device class Device(object): def __init__(self,flags): _driver.init() self._device =

Re: [PyCUDA] OpenGl interop example

2010-03-03 Thread Andreas Klöckner
On Mittwoch 03 März 2010, Fabrizio Milo aka misto wrote: Errata corrige: Seems it can be simply None, but not 0 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, None) Fabrizio The wiki is the 'official' version of the examples, so you are

Re: [PyCUDA] Attempts of patches

2010-03-03 Thread Andreas Klöckner
On Mittwoch 03 März 2010, Fabrizio Milo aka misto wrote: I found the real problem in mac for opengl. Patch in attachment You can remove the previous setup.py logic Done, thanks. I think the design will benefit a lot from having a Device or Context class that manages all the resources on the

Re: [PyCUDA] Patch for error C2143: syntax error : missing '; ' before 'type' on latest master for MSVC

2010-03-03 Thread Andreas Klöckner
On Mittwoch 03 März 2010, Ian Ozsvald wrote: This error is described here: http://andre.stechert.org/urwhatu/2006/01/error_c2143_syn.html MSVC doesn't like C99-style variable declarations in the middle of the function and wants C89 declarations at the start of the function (or so the author

Re: [PyCUDA] Patch for error C2143: syntax error : missing '; ' before 'type' on latest m aster for MSVC

2010-03-03 Thread Andreas Klöckner
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

Re: [PyCUDA] weird bug with exp

2010-03-03 Thread Andreas Klöckner
On Mittwoch 03 März 2010, Dan Goodman wrote: Could it be a 32/64 bit issue? I have a 64 bit Win7 machine, but my Python, numpy, etc. are 32 bit and so I had to compile PyCUDA using 32 bits (but the NVIDIA driver is 64 bit). Probably this shouldn't work at all, but it seems to work fine for

Re: [PyCUDA] Other Small patches

2010-03-03 Thread Andreas Klöckner
On Mittwoch 03 März 2010, Fabrizio Milo aka misto wrote: I think would be nice to alert the user if they are trying to pass a numpy.array directly to the kernel. Regarding the 'yet' in the error message: This works when using In/Out/InOut, but direct passing will otherwise never be supported.

Re: [PyCUDA] test_gpuarray.py is failing

2010-03-03 Thread Andreas Klöckner
On Mittwoch 03 März 2010, Fabrizio Milo aka misto wrote: Hi folks Test gpu_array is failing on my Macos, in attachment a small patch that fixes a bug in one of the tests and my gzipped-output running Patch: applied, thanks. I can't reproduce your issue, though--this works for me. What GPU,

Re: [PyCUDA] More Patches, and cuda.init() elimination

2010-03-03 Thread Andreas Klöckner
On Mittwoch 03 März 2010, Fabrizio Milo aka misto wrote: In attachment more patches. The big one is the 006, which eliminates the need of calling esplicitly cuda.init(). The cuInit functions gets called upon _driver import in the init_driver Python-Module function. a) This would break a

Re: [PyCUDA] Int detection in function kernel invocation

2010-03-04 Thread Andreas Klöckner
On Donnerstag 04 März 2010, Fabrizio Milo aka misto wrote: Hi, I had to add the patch in attachment to make work a kernel like void kernel( float* out, int size){ } Unless you're using prepared invocation, you have to use Numpy's sized integers/floats:

Re: [PyCUDA] Patch for error C2143: syntax error : missing '; ' before 'type' on latest master for MSVC

2010-03-04 Thread Andreas Klöckner
On Donnerstag 04 März 2010, Ian Ozsvald wrote: 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

Re: [PyCUDA] More Patches, and cuda.init() elimination

2010-03-04 Thread Andreas Klöckner
On Donnerstag 04 März 2010, Imran Haque wrote: Fabrizio Milo aka misto wrote: does anyone has an example of a program where doesn't use the cuda.autoimport before using any of the pycuda.* ? Yes, my library (shameless plug: https://simtk.org/home/siml) Cool--I've added that to

Re: [PyCUDA] More Patches, and cuda.init() elimination

2010-03-04 Thread Andreas Klöckner
On Donnerstag 04 März 2010, Fabrizio Milo aka misto wrote: The work around should simple be to import pycuda after the fork. Importing before would be useless, because for sure you can't initialize cuInit and thus can't use any cu* function.. Or I am missing something ? Imports might happen

Re: [PyCUDA] Patch for error C2143: syntax error : missing '; ' before 'type' on latest master for MSVC

2010-03-05 Thread Andreas Klöckner
On Freitag 05 März 2010, Ian Ozsvald wrote: Ok, I stepped back to my last working master copy from a few days back. I downloaded the raw blobs of your new changes via: http://git.tiker.net/pycuda.git/commitdiff/c3d5f8178f71271b8689915bc2d1122e 0f7b1f52 and then recompiled pyCUDA, deleted the

Re: [PyCUDA] pycuda 0.93 - Snow Leopard - error: invalid command 'bdist_egg'

2010-03-08 Thread Andreas Klöckner
On Montag 08 März 2010, Daniel Kubas wrote: Hi Andreas, yes I built the boost library (1.39) with the recommended flag 'architecture=x86' and even omitting '--with-libraries=signals,thread,python' If you haven't tried this already: Try poking at PyCUDA's _driver.so with 'otool -L'

Re: [PyCUDA] pycuda 0.93 - Snow Leopard - error: invalid command 'bdist_egg'

2010-03-08 Thread Andreas Klöckner
On Montag 08 März 2010, Daniel Kubas wrote: Hi, It works now! Glad to hear that. (got this trick from http://mail.python.org/pipermail/python-list/2009-October/1222481.html) Bryan also put that trick on http://wiki.tiker.net/PyCuda/Installation/Mac#Notes_about_Snow_Leopard a while ago, I

Re: [PyCUDA] Issue running test cases on Windows Vista 64 bit

2010-03-11 Thread Andreas Klöckner
On Donnerstag 11 März 2010, Conway, Nicholas J wrote: Installed distribute instead of setuptools and that fixed the quirks during installation, but did not fix the problem when running the test. This made sure pycuda was properly installed in the site-packages directory. I update my

Re: [PyCUDA] Issue running test cases on Windows Vista 64 bit

2010-03-11 Thread Andreas Klöckner
On Donnerstag 11 März 2010, Conway, Nicholas J wrote: Also tried CUDA 3.0 beta with the luck that it ran and crashes python during test_driver.py Did you recompile PyCUDA? Unfortunately, you need to delete the 'build' directory to be able to rebuild from scratch--distutils is unaware of

Re: [PyCUDA] complementary error function erfc

2010-03-15 Thread Andreas Klöckner
On Sonntag 14 März 2010, Faisal Moledina wrote: Hello PyCUDA list, I'm just starting out with PyCUDA and have not used much more than gpuarray and cumath. In fact, I have yet to program my own CUDA kernel. I'm wondering if there is a built-in erfc method for a gpuarray. If PyCUDA doesn't

Re: [PyCUDA] pyCuda with python 2.4

2010-03-16 Thread Andreas Klöckner
On Mittwoch 17 März 2010, Daniel Chia wrote: HI Andreas, I did, however I need to define PY_SSIZE_T_MAX to get it to build. However I can't test the code as I don't have root access, so it seems I can't install pytools, cos it can't patch setuptools. I might try installing a

Re: [PyCUDA] RuntimeError: cuInit failed: no device

2010-03-18 Thread Andreas Klöckner
On Donnerstag 18 März 2010, jade mackay wrote: I get the following error. Can anyone point me in the right direction to resolve this? import pycuda.autoinit Traceback (most recent call last): File stdin, line 1, in module File

Re: [PyCUDA] Problems with Context stack autoinit

2010-03-25 Thread Andreas Klöckner
On Donnerstag 25 März 2010, Bryan Catanzaro wrote: Hi All - I've been getting problems with the following error: terminate called after throwing an instance of 'cuda::error' what(): cuCtxPushCurrent failed: invalid value After poking around, I discovered that context.pop(), registered

Re: [PyCUDA] Problems with Context stack autoinit

2010-03-26 Thread Andreas Klöckner
On Freitag 26 März 2010, Bryan Catanzaro wrote: I've attached the trace. Lines beginning with --- are added instrumentation that I put in autoinit.py and cuda.hpp. Also, my workaround has now failed - with some versions of the code the attempt to push a bad context happened in

Re: [PyCUDA] E LogicError: cuModuleLoadDataEx failed: invalid image - with test_driver.py

2010-03-27 Thread Andreas Klöckner
On Sonntag 28 März 2010, Catalin Patulea wrote: Sorry to butt in.. Reckoner, can you try again after applying the attached patch? It should address the invalid image errors. Catalin Good point! Thanks for the patch, applied to git master. Andreas signature.asc Description: This is a

[PyCUDA] [ANN] 0.94rc -- please test

2010-03-28 Thread Andreas Klöckner
Hi all, PyCUDA's present release version (0.93) is starting to show its age, and so I've just rolled a release candidate for 0.94, after tying up a few loose ends--such as complete CUDA 3.0 support. Please help make sure 0.94 is solid. Go to http://pypi.python.org/pypi/pycuda/0.94rc to download

Re: [PyCUDA] Trim down boost library?

2010-03-30 Thread Andreas Klöckner
On Dienstag 30 März 2010, reckoner wrote: Hi, I built the boost 1.38 libraries from source following the instructions on the wiki, but this generated about 5 GB of material. Do I need all of it, or can I trim this down? These here are the boost headers that PyCUDA includes.

Re: [PyCUDA] installed_path incorrect in pycuda/compiler.py

2010-04-01 Thread Andreas Klöckner
On Donnerstag 01 April 2010, MinRK wrote: The `installed_path' variable in `_find_pycuda_include_path' in pycuda/compiler.py appears to be incorrect, or at least not sufficiently general, because it does not find the install location on my machines (OSX 10.6/Python 2.6.1 and Ubuntu 9.10/Python

Re: [PyCUDA] cuBLAS on gpuarray

2010-04-12 Thread Andreas Klöckner
On Montag 12 April 2010, Bryan Catanzaro wrote: The only difference here is that at exit, we're detaching from the cuda context instead of popping it as pycuda.autoinit does. That gets rid of the error, although it's probably not the correct solution to the problem. detach() is not right if

Re: [PyCUDA] Debian packaging of PyCUDA

2010-05-05 Thread Andreas Klöckner
On Dienstag 04 Mai 2010, Tomasz Rybak wrote: Hello, I have begun creating Debian PyCUDA (0.94 from GIT) package. It is my first Debian package and I was cheating by looking at other Python modules, but it seems to work, at least on my machine. In few days I should be able to check on another

Re: [PyCUDA] creating a new view of a GPUArray

2010-05-05 Thread Andreas Klöckner
On Donnerstag 29 April 2010, Amir wrote: I would like to create different views of a GPUArray. I have no idea how to do it. 1D slicing logic already exists. See GPUArray.__getitem__ on how it's done. Let A be a 2D float32 c-continuous array. How do I create a 1D view of one of its rows? I am

Re: [PyCUDA] How to manually free GPUarray to avoid leak?

2010-05-05 Thread Andreas Klöckner
On Sonntag 25 April 2010, gerald wrong wrote: Can I manually free GPUarray instances? In addition to Bogdan's comments (which are more likely to help you with what you're seeing): If you must free the memory by hand, you can use ary.gpudata.free() to do so. HTH, Andreas signature.asc

Re: [PyCUDA] 32-bit PyCUDA on Snow Leopard

2010-05-05 Thread Andreas Klöckner
Hi Per, all, On Dienstag 20 April 2010, Per B. Sederberg wrote: Although it is not ideal and it took me many hours to figure out (as opposed to the 5 minutes it takes on Debian), I've been able to get PyCUDA and CUDA 3.0 working with 32-bit Enthought Python on Snow Leopard. thanks very much

Re: [PyCUDA] Mailing list move

2010-05-06 Thread Andreas Klöckner
On Donnerstag 06 Mai 2010, Andreas Klöckner wrote: Hi all, just a quick heads-up that I will be moving the PyCUDA list to a different server today. There might be a short period where the list is unavailable, but I'll try to keep this minimal. All should be back to normal by tonight

Re: [PyCUDA] Why is cumath slower than an ElementwiseKernel? Is data copied back after each operation?

2010-05-06 Thread Andreas Klöckner
On Donnerstag 06 Mai 2010, Ian Ozsvald wrote: I've been speed testing some code to understand the complexity/speed trade-off of various approaches. I want to offer my colleagues the easiest way to use a GPU to get a decent speed-up without forcing anyone to write C-like code if possible. A

Re: [PyCUDA] Are sin/log supported for complex number (0.94rc)? Odd results...

2010-05-06 Thread Andreas Klöckner
On Montag 19 April 2010, Ian Ozsvald wrote: I find myself out of my depth again. I'm playing with complex numbers using 0.94rc (on Windows XP with CUDA 2.3). I've successfully used simple operations (addition, multiplication) on complex numbers, that resulted in the Mandelbrot example in the

Re: [PyCUDA] pycuda and cuda 64 bits on mac SL

2010-05-06 Thread Andreas Klöckner
On Montag 12 April 2010, Alan wrote: Hi there, Finally nVidia released Cuda (partially) 3.0 in 64 bits for Mac (not beta version!) Hi Alan, all, has there been progress on this? Has anyone gotten 64-bit PyCUDA to work on Snow Leopard? If not, any idea what might be wrong? Andreas

[PyCUDA] Windows binaries

2010-05-09 Thread Andreas Klöckner
Hi team, I just discovered that Christoph Gohlke at UC Irvine distributes Windows binaries for PyCUDA, here: http://www.lfd.uci.edu/~gohlke/pythonlibs/ This looks like a good page to keep bookmarked if you're on Windows, though obviously I don't know how well the packages on that page actually

Re: [PyCUDA] nvcc is not searched in cuda root dir.

2010-05-10 Thread Andreas Klöckner
On Sonntag 09 Mai 2010, Ilya Gluhovsky wrote: On Sonntag 04 Oktober 2009, Michal wrote: Hi, during pycuda configuration it is possible to specify cuda root dir. I think that pycuda should add cuda_root_dir/bin to its PATH, so I wouldn't get errors like : OSError: nvcc was not found (is

<    1   2