Dear Nicolas,
Nicolas LEMERCIER <lemercie(a)igbmc.fr> writes:
> I am currently trying to use peer2peer GPU memory access with pycuda and I face with problems regarding the syntax.
> My code follow this template:
>
> dev1=cuda.Device(1)
> ctx1=dev1.make_context()
> dev0=cuda.Device(0)
> ctx0=dev0.make_context()
> ctx0.enable_peer_access(ctx1,flags=0)
>
> and here is the error message returned by python.
>
> Traceback (most recent call last):
> File "C:\Users\solid\Documents\peer2peer.py", line 34, in <module>
> ctx0.enable_peer_access(ctx1,flags=0)
> LogicError: cuCtxEnablePeerAccess failed: invalid/unknown error code
>
> I guess the parameter sent to enable_peer_access is not correct but I don't understand the way it works.
first, can you please make sure you send emails of this nature are sent
to the pycuda list.
As far as parameters to this function, there's nothing much to mess
up. As a result, have you checked that peer access is supported by these
devices?
Perhaps add
assert dev1.can_access_peer(dev0)
to make sure that peer access *should* be possible.
Andreas
Dear Geng,
I think the solution is simple. It appears as if you did not have boost installed on your computer, which is a collection of important C++ libraries, some of which (matrix-related?) are used by pycuda. Install the latest boost and you should be okay, fingers crossed! I guess that this is the mistake, although I really would have expected C++ boost to be pre-installed on a standard Ubuntu installation.
Greetings from Ningbo,
Eric
On 10/26/2013 04:49 PM, geng liu wrote:
Dear Developer,
I am LIU Geng from Chinese Academy of Sciences. I am now trying to install pycuda in my Ubuntu system, but I met some problems.
My computer has 2 CUDA enabled GPUs. My system is Lynux Ubuntu 12.04, gcc 4.6.3, python 2.7.3, CUDA 5.5
I followed the instructions from you, but there is an error when I go to "make -j 4". I am sure there is not a compatibility problem, at least for gcc and CUDA.
My installation log is in the attachment, and I'm looking forward to a solution from you.
Thanks.
Best Regards
Liu Geng
Changchun Institue of Optics, Fine Mechanics and Physics,
Chinese Academy of Sciences.
Changchun 130033, Jilin, China
Mobile: 86-0431-15843126536
Email: liugeng.5202004(a)gmail.com<mailto:liugeng.5202004@gmail.com>
--
Dr. Eric Michael Scheffel
Assistant Professor in Economics
Ningbo Nottingham University
Site: http://www.ericscheffel.com
This message and any attachment are intended solely for the addressee and may contain confidential information.
If you have received this message in error, please send it back to me, and immediately delete it.
Please do not use, copy or disclose the information contained in this message or in any attachment.
Any views or opinions expressed by the author of this email do not necessarily reflect the views of The University of Nottingham Ningbo China.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system:
you are advised to perform your own checks.
Email communications with The University of Nottingham Ningbo China may be monitored as permitted by UK and Chinese legislation.
Dear Developer,
I am LIU Geng from Chinese Academy of Sciences. I am now trying to install
pycuda in my Ubuntu system, but I met some problems.
My computer has 2 CUDA enabled GPUs. My system is Lynux Ubuntu 12.04, gcc
4.6.3, python 2.7.3, CUDA 5.5
I followed the instructions from you, but there is an error when I go to
"make -j 4". I am sure there is not a compatibility problem, at least for
gcc and CUDA.
My installation log is in the attachment, and I'm looking forward to a
solution from you.
Thanks.
Best Regards
Liu Geng
Changchun Institue of Optics, Fine Mechanics and Physics,
Chinese Academy of Sciences.
Changchun 130033, Jilin, China
Mobile: 86-0431-15843126536
Email: liugeng.5202004(a)gmail.com
Hi,
I can't get cuda-gdb to stop at breakpoint. Namely, I get
$ cuda-gdb --args python -m pycuda.debug
/usr/share/doc/python-pycuda-doc/examples/demo.py
NVIDIA (R) CUDA Debugger
5.5 release
Portions Copyright (C) 2007-2013 NVIDIA Corporation
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(cuda-gdb) b doublify
Function "doublify" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (doublify) pending.
(cuda-gdb) r
Starting program: /usr/bin/python -m pycuda.debug
/usr/share/doc/python-pycuda-doc/examples/demo.py
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff0001700 (LWP 3395)]
[Context Create of context 0xfb38d0 on Device 0]
*** compiler output in /tmp/tmpiHClwv
[Launch of CUDA Kernel 0 (doublify<<<(1,1,1),(4,4,1)>>>) on Device 0]
original array:
[[-0.04012666 0.32504103 -0.35359469 -1.33113611]
[-0.77782524 1.76319683 1.71368265 1.25119114]
[ 1.13762009 -1.3670094 -0.31529811 -0.29683253]
[-0.48716831 0.80230588 1.03378654 2.5838871 ]]
doubled with kernel:
[[-0.08025332 0.65008205 -0.70718938 -2.66227221]
[-1.55565047 3.52639365 3.4273653 2.50238228]
[ 2.27524018 -2.7340188 -0.63059622 -0.59366506]
[-0.97433662 1.60461175 2.06757307 5.1677742 ]]
[Launch of CUDA Kernel 1 (doublify<<<(1,1,1),(4,4,1)>>>) on Device 0]
doubled with InOut:
[[-0.08025332 0.65008205 -0.70718938 -2.66227221]
[-1.55565047 3.52639365 3.4273653 2.50238228]
[ 2.27524018 -2.7340188 -0.63059622 -0.59366506]
[-0.97433662 1.60461175 2.06757307 5.1677742 ]]
*** compiler output in /tmp/tmp_v2lny
[Launch of CUDA Kernel 2 (axpb<<<(1,1,1),(32,1,1)>>>) on Device 0]
original array:
[[ 0.43130487 0.56232756 0.78714377 -0.8899222 ]
[ 0.12634102 -0.34702763 -0.47055304 -0.35157502]
[ 0.3904736 -0.70519412 -0.00533707 -1.11191225]
[ 1.07405782 0.69153821 0.42390665 -0.45493162]]
doubled with gpuarray:
[[ 0.86260974 1.12465513 1.57428753 -1.7798444 ]
[ 0.25268203 -0.69405526 -0.94110608 -0.70315003]
[ 0.78094721 -1.41038823 -0.01067414 -2.2238245 ]
[ 2.14811563 1.38307643 0.84781331 -0.90986323]]
[Context Pop of context 0xfb38d0 on Device 0]
[Context Push of context 0xfb38d0 on Device 0]
[Context Pop of context 0xfb38d0 on Device 0]
[Context Push of context 0xfb38d0 on Device 0]
[Context Pop of context 0xfb38d0 on Device 0]
[Context Push of context 0xfb38d0 on Device 0]
[Context Pop of context 0xfb38d0 on Device 0]
[Context Push of context 0xfb38d0 on Device 0]
[Termination of CUDA Kernel 2 (axpb<<<(1,1,1),(32,1,1)>>>) on Device 0]
[Termination of CUDA Kernel 1 (doublify<<<(1,1,1),(4,4,1)>>>) on Device 0]
[Termination of CUDA Kernel 0 (doublify<<<(1,1,1),(4,4,1)>>>) on Device 0]
[Context Destroy of context 0xfb38d0 on Device 0]
[Thread 0x7ffff0001700 (LWP 3395) exited]
Program exited normally.
I'm using Debian jessie/sid amd64. I have tried both 319.60 and 325.15
drivers (and many other versions previously), and CUDA toolkit 5.0.35
and 5.5.22. No change on this front. I'm using PyCUDA 2013.1.1.
Any ideas?
Regards,
Vedran
----------------------------------------------------------------------
Dorin Niculescu <niculescu_dorin85(a)yahoo.com><mailto:niculescu_dorin85@yahoo.com> writes:
> I have a new ASUS laptop with optimus enabled NVIDIA 750M card and i want to install pycuda on it. I've installed Ubuntu 12.04,
> Bumblebee+nvidia-319, cuda 5.5 and everything was working great until i've installed pycuda using the ubuntu software center. After that,
> instead of the log in screen ubuntu is showing a perfect black screen. I don't know what happend but i think that is because of the libraries
> which are installed with pycuda.
>
> Is pycuda getting along with bumblebee? This chain Ubuntu 12.04 + Bumblebee + nvidia-319 + cuda5.5 + pycuda should work?
>
> Do you have any solutions ?
Sorry to hear that you're having trouble. However, what you're
describing sounds more like an issue with your distribution than
with PyCUDA. If you could find out somehow what packages were installed
and uninstalled along with PyCUDA, someone on the list *may* be able to
point you in the right direction.
HTH,
Andreas
Dear Both,
I am running pycuda on an up-to-date Slackware distribution on an Optimus laptop (Lenovo Y470) with a gt550m. All works very well here. I am using bumblebee and the "optirun" command. The most common problem people tend to face with their respective Linux distributions is that the cuda drivers (SDK) have traditionally been very picky about which version of GCC they support. Most modern Linux distros will install some version of GCC 4.8 or perhaps even later, but CUDA on Linux afaik currently only supports 4.7 and maybe 4.6, depending on the cuda version installed.
HTH,
Eric
--
Dr. Eric Michael Scheffel
Assistant Professor in Economics
Ningbo Nottingham University
Site: http://www.ericscheffel.com
This message and any attachment are intended solely for the addressee and may contain confidential information.
If you have received this message in error, please send it back to me, and immediately delete it.
Please do not use, copy or disclose the information contained in this message or in any attachment.
Any views or opinions expressed by the author of this email do not necessarily reflect the views of The University of Nottingham Ningbo China.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system:
you are advised to perform your own checks.
Email communications with The University of Nottingham Ningbo China may be monitored as permitted by UK and Chinese legislation.
--------------------------------------------
Dorin,
I had a similar symptom on a desktop running the same Ubuntu release a few weeks ago, and was able to resolve it by purging and reinstalling my nvidia driver and adding nouveau.modeset=0 to GRUB to ensure that the nvidia driver was the only one being used at boot time. The video driver I use was packaged with the cuda5.5 .run file from Nvidia's download page, version 319.37. The pycuda version which shows up for me in the Ubuntu software center is 2012.1.1, which might be causing you problems if that's the one you installed. I am using 2013.1.1, downloaded from https://pypi.python.org/pypi/pycuda .
HTH,
Graham
Hello,
I have a new ASUS laptop with optimus enabled NVIDIA 750M card and i want to install pycuda on it. I've installed Ubuntu 12.04,
Bumblebee+nvidia-319, cuda 5.5 and everything was working great until i've installed pycuda using the ubuntu software center. After that,
instead of the log in screen ubuntu is showing a perfect black screen. I don't know what happend but i think that is because of the libraries
which are installed with pycuda.
Is pycuda getting along with bumblebee? This chain Ubuntu 12.04 + Bumblebee + nvidia-319 + cuda5.5 + pycuda should work?
Do you have any solutions ?
Thank you very much for your time,
Dorin
Matthias Seise <mseise(a)gmx.de> writes:
> Hi,
>
> I'm using pycuda quite a while. Now I'm supposed to distribute my software
> without installing a C++ compiler on all machines. How can I distribute
> "compiled" kernels.
>
> I found the option module_from_file but when I'm using it on the standard
> kernel 'multiply_them' I get
> logicError: cuModuleLoad failed: invalid context
>
> I found the Thread
> http://stackoverflow.com/questions/5918937/pycudathreading-invalid-handles-…
>
> But How do I get the correct function name?
It's generally easier to declare your functions extern "C" than to guess
the (C++-mangled) function names.
HTH,
Andreas
Hi,
I'm using pycuda quite a while. Now I'm supposed to distribute my software
without installing a C++ compiler on all machines. How can I distribute
"compiled" kernels.
I found the option module_from_file but when I'm using it on the standard
kernel 'multiply_them' I get
logicError: cuModuleLoad failed: invalid context
I found the Thread
http://stackoverflow.com/questions/5918937/pycudathreading-invalid-handles-…
But How do I get the correct function name?
Thanks for your help,
Matthias