[opensuse] NVIDIA nvcc (CUDA compiler) on Tumbleweed, and gcc versions
I have installed the NVIDIA CUDA RPMS on Tumbleweed. Although they are packaged by NVIDIA for Leap 15.1, they seem to have installed. I am trying to build some neural network software (https://pjreddie.com/darknet/yolo/). It works quite well as just a CPU-based program. However, I am hoping to use this to process many 10s of thousands of high-resolution images. So I want/need to build it with CUDA/GPU support. When running nvcc, I get a message that it does not support gcc versions newer than 8. On Tumbleweed, I have gcc 9. As one does. What is the best way to have two versions of gcc installed? I'm not sure exactly which gcc components nvcc uses. So I guess it would be the most of gcc8. Is it possible to install gcc8 in such a way that it does not become the default compiler? I plan on using it only for this purpose. The result should be a DSO library that I can then link against in my applications when they are built with gcc 9 or whatever the Tumbleweed default compiler is. As an alternative, anyone know if the CUDA package (https://build.opensuse.org/package/show/home%3ABumblebee-Project%3AnVidia%3A...) in can be used in OBS? As it downloads things, I suspect OBS will not allow this. No idea. I also would need the version of gcc that CUDA 9 requires. Then I could build the package there, and have a new openSUSE package to boot. Pros and cons of both approaches? -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, In the Message; Subject : [opensuse] NVIDIA nvcc (CUDA compiler) on Tumbleweed, and gcc versions Message-ID : <CANkOqwMPGLB+4bjj3tJDWxRp0vfNyD1AEpEpO+Jms_CxZDeRLg@mail.gmail.com> Date & Time: Tue, 3 Mar 2020 08:55:29 +0100 [RO] == Roger Oberholtzer <roger.oberholtzer@gmail.com> has written: RO> I have installed the NVIDIA CUDA RPMS on Tumbleweed. Although they are RO> packaged by NVIDIA for Leap 15.1, they seem to have installed. [...] RO> What is the best way to have two versions of gcc installed? How about using the 'update-alteenatives'? Regards, --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ galaxy.dti.ne.jp ┃\/彡 ┗━━┛ "Bill! You married with Computer. Not with Me!" "No..., with money." -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Mar 3, 2020 at 12:06 PM Masaru Nomiya <nomiya@galaxy.dti.ne.jp> wrote:
RO> What is the best way to have two versions of gcc installed?
How about using the 'update-alteenatives'?
There is always that. I was hoping that I could build this in a Makefile where I select the version of gcc to use. As gcc is many components (compiler, assembler, linker, etc), would one need to do this for each? Or is it a more general thing? -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Mar 3, 2020 at 12:06 PM Masaru Nomiya <nomiya@galaxy.dti.ne.jp> wrote:
Hello,
In the Message;
Subject : [opensuse] NVIDIA nvcc (CUDA compiler) on Tumbleweed, and gcc versions Message-ID : <CANkOqwMPGLB+4bjj3tJDWxRp0vfNyD1AEpEpO+Jms_CxZDeRLg@mail.gmail.com> Date & Time: Tue, 3 Mar 2020 08:55:29 +0100
[RO] == Roger Oberholtzer <roger.oberholtzer@gmail.com> has written:
RO> I have installed the NVIDIA CUDA RPMS on Tumbleweed. Although they are RO> packaged by NVIDIA for Leap 15.1, they seem to have installed. [...] RO> What is the best way to have two versions of gcc installed?
How about using the 'update-alteenatives'?
Another thing is, what happens when an update for one of the compilers is installed. Let's say I have both gcc8 and gcc9 installed. I have gcc9 as my default. What happens when an update for gcc8 is installed? Does it now become the default? Where will /usr/bin/gcc be pointing? With gcc9, it is like this: lrwxrwxrwx 1 root root 5 Oct 8 14:11 /usr/bin/gcc -> gcc-9 -rwxr-xr-x 1 root root 760456 Feb 4 22:14 /usr/bin/gcc-9 lrwxrwxrwx 1 root root 8 Oct 8 14:11 /usr/bin/gcc-ar -> gcc-ar-9 -rwxr-xr-x 1 root root 27064 Feb 4 22:14 /usr/bin/gcc-ar-9 lrwxrwxrwx 1 root root 8 Oct 8 14:11 /usr/bin/gcc-nm -> gcc-nm-9 -rwxr-xr-x 1 root root 27056 Feb 4 22:14 /usr/bin/gcc-nm-9 lrwxrwxrwx 1 root root 12 Oct 8 14:11 /usr/bin/gcc-ranlib -> gcc-ranlib-9 -rwxr-xr-x 1 root root 27072 Feb 4 22:14 /usr/bin/gcc-ranlib-9 What happens after gcc8 is updated? -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 3 Mar 2020 13:24:23 +0100 Roger Oberholtzer <roger.oberholtzer@gmail.com> wrote:
On Tue, Mar 3, 2020 at 12:06 PM Masaru Nomiya <nomiya@galaxy.dti.ne.jp> wrote:
Hello,
In the Message;
Subject : [opensuse] NVIDIA nvcc (CUDA compiler) on Tumbleweed, and gcc versions Message-ID : <CANkOqwMPGLB+4bjj3tJDWxRp0vfNyD1AEpEpO+Jms_CxZDeRLg@mail.gmail.com> Date & Time: Tue, 3 Mar 2020 08:55:29 +0100
[RO] == Roger Oberholtzer <roger.oberholtzer@gmail.com> has written:
RO> I have installed the NVIDIA CUDA RPMS on Tumbleweed. Although RO> they are packaged by NVIDIA for Leap 15.1, they seem to have RO> installed. [...] RO> What is the best way to have two versions of gcc installed?
How about using the 'update-alteenatives'?
Another thing is, what happens when an update for one of the compilers is installed. Let's say I have both gcc8 and gcc9 installed. I have gcc9 as my default. What happens when an update for gcc8 is installed? Does it now become the default? Where will /usr/bin/gcc be pointing?
With gcc9, it is like this:
lrwxrwxrwx 1 root root 5 Oct 8 14:11 /usr/bin/gcc -> gcc-9 -rwxr-xr-x 1 root root 760456 Feb 4 22:14 /usr/bin/gcc-9 lrwxrwxrwx 1 root root 8 Oct 8 14:11 /usr/bin/gcc-ar -> gcc-ar-9 -rwxr-xr-x 1 root root 27064 Feb 4 22:14 /usr/bin/gcc-ar-9 lrwxrwxrwx 1 root root 8 Oct 8 14:11 /usr/bin/gcc-nm -> gcc-nm-9 -rwxr-xr-x 1 root root 27056 Feb 4 22:14 /usr/bin/gcc-nm-9 lrwxrwxrwx 1 root root 12 Oct 8 14:11 /usr/bin/gcc-ranlib -> gcc-ranlib-9 -rwxr-xr-x 1 root root 27072 Feb 4 22:14 /usr/bin/gcc-ranlib-9
What happens after gcc8 is updated?
Don't know much about it but maybe it is easier to isolate the extra gcc in a VM? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Mar 3, 2020 at 3:58 PM Dave Howorth <dave@howorth.org.uk> wrote:
Don't know much about it but maybe it is easier to isolate the extra gcc in a VM?
I decided to see what happened on a test computer. This is what I did: 1. Installed cuda-repo-opensuse15-10-2-local-10.2.89-440.33.01-1.0-1.x86_64.rpm, from NVIDIA. It really adds a local repo with all the RPMs. That's why it's >2.6GB 2. Installed the RPMS actually needed (256 MB) from the above repo. 3. Added gcc8 and gcc8-c++ from OBS. The existing links to gcc 9 remained unchanged. This was my worry. Release 8 is installed along side of release 9, and release 9 seems to remain the default. 4. When running nvcc, add this to the command line: -ccbin=gcc-8 5. My library and program compiled without error. It just needs the libcuda.so.1 that gets installed as part of the NVIDIA driver (it used a stub library to complete the compile). Updating my system from Nouveau to NVIDIA is next. Then I will be able to test that all this results in functioning software. So I guess my question was answered. But there is still more to do before I can say CUDA is doing what I need it to do... -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 03/03/20 22:10, Roger Oberholtzer wrote:
On Tue, Mar 3, 2020 at 3:58 PM Dave Howorth <dave@howorth.org.uk> wrote:
Don't know much about it but maybe it is easier to isolate the extra gcc in a VM?
I decided to see what happened on a test computer. This is what I did:
1. Installed cuda-repo-opensuse15-10-2-local-10.2.89-440.33.01-1.0-1.x86_64.rpm, from NVIDIA. It really adds a local repo with all the RPMs. That's why it's >2.6GB
2. Installed the RPMS actually needed (256 MB) from the above repo.
3. Added gcc8 and gcc8-c++ from OBS. The existing links to gcc 9 remained unchanged. This was my worry. Release 8 is installed along side of release 9, and release 9 seems to remain the default.
4. When running nvcc, add this to the command line: -ccbin=gcc-8
5. My library and program compiled without error. It just needs the libcuda.so.1 that gets installed as part of the NVIDIA driver (it used a stub library to complete the compile). Updating my system from Nouveau to NVIDIA is next. Then I will be able to test that all this results in functioning software.
So I guess my question was answered. But there is still more to do before I can say CUDA is doing what I need it to do...
I simply removed the #if gcc version check in the CUDA headers. It worked fine with Tumbleweed's gcc 9 for now, but unless I find an error (i.e. the actual reason why NVIDIA wants to avoid gcc 9), I will not install two compilers. -- Christoph Feck -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Christoph Feck
-
Dave Howorth
-
Masaru Nomiya
-
Roger Oberholtzer