16 июля 2011, 20:25 от Andreas Kloeckner <li...@informa.tiker.net>: > On Mon, 11 Jul 2011 10:37:45 +0400, Алексей Гурин <gural...@mail.ru> wrote: > > > > 11 июля 2011, 08:33 от Andreas Kloeckner <li...@informa.tiker.net>: > > > Dear Алексей, > > > > > > On Fri, 08 Jul 2011 10:33:04 +0400, Алексей Гурин wrote: > > > > > > What kind of system are you on? (OS, Bitness, ...) What seems to be the > > > case is that Python's struct module and nvcc disagree about alignment on > > > your system. That's nasty. Unfortunately, I can't seem to provoke a > > > similar bug on my 64-bit Linux system. > > > > > > Andreas > > > > i'm on Ubuntu linux 11.04 32-bit using CUDA 4.0.17. > > Can someone on 32-bit system confirm? What compiler are you using? Can > you try and figure out the string passed to struct.pack() to pack the > arguments? > > Andreas
I use gcc-4.4. Same error occurs when i use pycuda prepare with string "Pdi" and then prepared call of function. ########################## someFunc.prepare('Pdi') someFunc.prepared_call(grid,block,arrayD,1,N) ########################## In this case N=10000 Hex representation of arguments i send to GPU is int N = 10000 = 0x00002710 double 1 = 0x3FF0000000000000 and what i actually receive on GPU function is double 2.1220487890535086e-310 = 0x000027103FF00000 which is a mix of int and double values where four bytes of int goes first. If I put double before other arguments like 'dPi' it works correctly. _______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda