Csound Csound-dev Csound-tekno Search About

[Csnd-dev] CUDA related build error

Date2016-12-02 09:41
FromAnders Genell
Subject[Csnd-dev] CUDA related build error
Hi!

This is perhaps mostly directed towards Victor since it concerns CUDA.

I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.

I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.

Is there a way to test for funtionality in my current gpu&cuda configuration?

Best regards,
Anders

1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
-- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
/usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
  Error generating file
  /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o


Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Date2016-12-02 09:56
FromVictor Lazzarini
SubjectRe: [Csnd-dev] CUDA related build error
That message does not really tell us why it failed. The build is not normally bothered
whether you have a GPU and what type it is. It just depends on having CUDA, so it
should normally build if it is all set up to be built.

There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
Csound to be installed so that the headers can be found (and CUDA of course).
This removes cmake issues out of the equation.

You can also run each command in the build.sh file separately to see exactly what
the matter is, if needed.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 2 Dec 2016, at 09:41, Anders Genell  wrote:
> 
> Hi!
> 
> This is perhaps mostly directed towards Victor since it concerns CUDA.
> 
> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
> 
> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
> 
> Is there a way to test for funtionality in my current gpu&cuda configuration?
> 
> Best regards,
> Anders
> 
> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>   Error generating file
>   /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> 
> 
> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed

Date2016-12-02 10:12
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').

I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.

I'll be back.

Regards,
/Anders

On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
That message does not really tell us why it failed. The build is not normally bothered
whether you have a GPU and what type it is. It just depends on having CUDA, so it
should normally build if it is all set up to be built.

There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
Csound to be installed so that the headers can be found (and CUDA of course).
This removes cmake issues out of the equation.

You can also run each command in the build.sh file separately to see exactly what
the matter is, if needed.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 2 Dec 2016, at 09:41, Anders Genell <anders.genell@GMAIL.COM> wrote:
>
> Hi!
>
> This is perhaps mostly directed towards Victor since it concerns CUDA.
>
> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>
> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>
> Is there a way to test for funtionality in my current gpu&cuda configuration?
>
> Best regards,
> Anders
>
> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>   Error generating file
>   /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>
>
> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2


Date2016-12-02 10:25
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
Well, this time there was another error:

[ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
 #error -- unsupported GNU version! gcc 4.9 and up are not supported!
  ^
CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
  Error generating
  /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o


Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell <anders.genell@gmail.com> wrote:
Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').

I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.

I'll be back.

Regards,
/Anders

On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
That message does not really tell us why it failed. The build is not normally bothered
whether you have a GPU and what type it is. It just depends on having CUDA, so it
should normally build if it is all set up to be built.

There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
Csound to be installed so that the headers can be found (and CUDA of course).
This removes cmake issues out of the equation.

You can also run each command in the build.sh file separately to see exactly what
the matter is, if needed.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 2 Dec 2016, at 09:41, Anders Genell <anders.genell@GMAIL.COM> wrote:
>
> Hi!
>
> This is perhaps mostly directed towards Victor since it concerns CUDA.
>
> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>
> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>
> Is there a way to test for funtionality in my current gpu&cuda configuration?
>
> Best regards,
> Anders
>
> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>   Error generating file
>   /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>
>
> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2



Date2016-12-02 10:40
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.

Regards,
Anders

On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell <anders.genell@gmail.com> wrote:
Well, this time there was another error:

[ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
 #error -- unsupported GNU version! gcc 4.9 and up are not supported!
  ^
CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
  Error generating
  /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o


Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell <anders.genell@gmail.com> wrote:
Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').

I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.

I'll be back.

Regards,
/Anders

On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
That message does not really tell us why it failed. The build is not normally bothered
whether you have a GPU and what type it is. It just depends on having CUDA, so it
should normally build if it is all set up to be built.

There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
Csound to be installed so that the headers can be found (and CUDA of course).
This removes cmake issues out of the equation.

You can also run each command in the build.sh file separately to see exactly what
the matter is, if needed.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 2 Dec 2016, at 09:41, Anders Genell <anders.genell@GMAIL.COM> wrote:
>
> Hi!
>
> This is perhaps mostly directed towards Victor since it concerns CUDA.
>
> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>
> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>
> Is there a way to test for funtionality in my current gpu&cuda configuration?
>
> Best regards,
> Anders
>
> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>   Error generating file
>   /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>
>
> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2




Date2016-12-02 10:47
FromVictor Lazzarini
SubjectRe: [Csnd-dev] CUDA related build error
What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study 
gpgpu processing.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 2 Dec 2016, at 10:40, Anders Genell  wrote:
> 
> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
> 
> Regards,
> Anders
> 
> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell  wrote:
> Well, this time there was another error:
> 
> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>                  from :0:
> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>  #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>   ^
> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>   Error generating
>   /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> 
> 
> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell  wrote:
> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
> 
> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
> 
> I'll be back.
> 
> Regards,
> /Anders
> 
> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini  wrote:
> That message does not really tell us why it failed. The build is not normally bothered
> whether you have a GPU and what type it is. It just depends on having CUDA, so it
> should normally build if it is all set up to be built.
> 
> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
> Csound to be installed so that the headers can be found (and CUDA of course).
> This removes cmake issues out of the equation.
> 
> You can also run each command in the build.sh file separately to see exactly what
> the matter is, if needed.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
> 
> > On 2 Dec 2016, at 09:41, Anders Genell  wrote:
> >
> > Hi!
> >
> > This is perhaps mostly directed towards Victor since it concerns CUDA.
> >
> > I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
> >
> > I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
> >
> > Is there a way to test for funtionality in my current gpu&cuda configuration?
> >
> > Best regards,
> > Anders
> >
> > 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
> > -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> > /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> > CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
> >   Error generating file
> >   /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> >
> >
> > Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
> > make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
> > CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
> > make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
> > Makefile:160: recipe for target 'all' failed
> > make: *** [all] Error 2
> 
> 

Date2016-12-02 11:02
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
Yes, I'm leaning towards something similar, but I was given this laptop for free, and thought it could make a decent test bed. I'll give it another go after reinstalling and see where that leads me. Otherwise I'll invest in a graphics card to put in some old PC of which I can propably find plenty, though I would prefer some portability.

My goal is to hook up a RME Fireface UCX and do multi channel cross-over filtering and room correction tests. I was thinking of using the cuda version of pconvolve and run in a CsLadspa configuration hosted by jackrack or similar. Then I might be able to compare performance with brutefir.

Regards,
/Anders

   

On Fri, Dec 2, 2016 at 11:47 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study
gpgpu processing.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 2 Dec 2016, at 10:40, Anders Genell <anders.genell@GMAIL.COM> wrote:
>
> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>
> Regards,
> Anders
>
> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell <anders.genell@gmail.com> wrote:
> Well, this time there was another error:
>
> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>                  from <command-line>:0:
> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>  #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>   ^
> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>   Error generating
>   /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>
>
> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2
>
> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell <anders.genell@gmail.com> wrote:
> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>
> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>
> I'll be back.
>
> Regards,
> /Anders
>
> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> That message does not really tell us why it failed. The build is not normally bothered
> whether you have a GPU and what type it is. It just depends on having CUDA, so it
> should normally build if it is all set up to be built.
>
> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
> Csound to be installed so that the headers can be found (and CUDA of course).
> This removes cmake issues out of the equation.
>
> You can also run each command in the build.sh file separately to see exactly what
> the matter is, if needed.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
> > On 2 Dec 2016, at 09:41, Anders Genell <anders.genell@GMAIL.COM> wrote:
> >
> > Hi!
> >
> > This is perhaps mostly directed towards Victor since it concerns CUDA.
> >
> > I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
> >
> > I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
> >
> > Is there a way to test for funtionality in my current gpu&cuda configuration?
> >
> > Best regards,
> > Anders
> >
> > 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
> > -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> > /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> > CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
> >   Error generating file
> >   /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
> >
> >
> > Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
> > make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
> > CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
> > make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
> > Makefile:160: recipe for target 'all' failed
> > make: *** [all] Error 2
>
>
>


Date2016-12-04 11:31
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
Just to report back:
I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence. 
Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those. 

When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next. 

Regards,
Anders 


> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini :
> 
> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study 
> gpgpu processing.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952 
> 
>> On 2 Dec 2016, at 10:40, Anders Genell  wrote:
>> 
>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>> 
>> Regards,
>> Anders
>> 
>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell  wrote:
>> Well, this time there was another error:
>> 
>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>                 from :0:
>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>  ^
>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>  Error generating
>>  /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>> 
>> 
>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>> Makefile:160: recipe for target 'all' failed
>> make: *** [all] Error 2
>> 
>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell  wrote:
>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>> 
>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>> 
>> I'll be back.
>> 
>> Regards,
>> /Anders
>> 
>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini  wrote:
>> That message does not really tell us why it failed. The build is not normally bothered
>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>> should normally build if it is all set up to be built.
>> 
>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>> Csound to be installed so that the headers can be found (and CUDA of course).
>> This removes cmake issues out of the equation.
>> 
>> You can also run each command in the build.sh file separately to see exactly what
>> the matter is, if needed.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 2 Dec 2016, at 09:41, Anders Genell  wrote:
>>> 
>>> Hi!
>>> 
>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>> 
>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>> 
>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>> 
>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>> 
>>> Best regards,
>>> Anders
>>> 
>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>  Error generating file
>>>  /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>> 
>>> 
>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>> Makefile:160: recipe for target 'all' failed
>>> make: *** [all] Error 2
>> 
>> 

Date2016-12-04 12:52
FromVictor Lazzarini
SubjectRe: [Csnd-dev] CUDA related build error
The message is in the code of one opcode and not the other, so that's not the problem.

Did you select the correct compute capability etc when you build the opcode?
We usually get zeros if the code does not
run properly in the GPU (unless there is
a simpler explanation, like issues in the
CSD code).


Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Dec 2016, at 11:31, Anders Genell  wrote:
> 
> Just to report back:
> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence. 
> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those. 
> 
> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next. 
> 
> Regards,
> Anders 
> 
> 
>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini :
>> 
>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study 
>> gpgpu processing.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952 
>> 
>>> On 2 Dec 2016, at 10:40, Anders Genell  wrote:
>>> 
>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>> 
>>> Regards,
>>> Anders
>>> 
>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell  wrote:
>>> Well, this time there was another error:
>>> 
>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>                from :0:
>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>> ^
>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>> Error generating
>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>> 
>>> 
>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>> Makefile:160: recipe for target 'all' failed
>>> make: *** [all] Error 2
>>> 
>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell  wrote:
>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>> 
>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>> 
>>> I'll be back.
>>> 
>>> Regards,
>>> /Anders
>>> 
>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini  wrote:
>>> That message does not really tell us why it failed. The build is not normally bothered
>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>> should normally build if it is all set up to be built.
>>> 
>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>> This removes cmake issues out of the equation.
>>> 
>>> You can also run each command in the build.sh file separately to see exactly what
>>> the matter is, if needed.
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>> 
>>>> On 2 Dec 2016, at 09:41, Anders Genell  wrote:
>>>> 
>>>> Hi!
>>>> 
>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>> 
>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>> 
>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>> 
>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>> 
>>>> Best regards,
>>>> Anders
>>>> 
>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>> Error generating file
>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>> 
>>>> 
>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>> Makefile:160: recipe for target 'all' failed
>>>> make: *** [all] Error 2
>>> 
>>> 

Date2016-12-04 13:45
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
I didn't really choose anything other than setting CUDA_TOOLKIT_ROOT_DIR and adding a -DBUILD_CUDA_OPCODES flag to cmake. How does one select compute capability?

Regards,
Anders

> 4 dec. 2016 kl. 13:52 skrev Victor Lazzarini :
> 
> The message is in the code of one opcode and not the other, so that's not the problem.
> 
> Did you select the correct compute capability etc when you build the opcode?
> We usually get zeros if the code does not
> run properly in the GPU (unless there is
> a simpler explanation, like issues in the
> CSD code).
> 
> 
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
> 
>> On 4 Dec 2016, at 11:31, Anders Genell  wrote:
>> 
>> Just to report back:
>> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence. 
>> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those. 
>> 
>> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next. 
>> 
>> Regards,
>> Anders 
>> 
>> 
>>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini :
>>> 
>>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study 
>>> gpgpu processing.
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952 
>>> 
>>>> On 2 Dec 2016, at 10:40, Anders Genell  wrote:
>>>> 
>>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>>> 
>>>> Regards,
>>>> Anders
>>>> 
>>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell  wrote:
>>>> Well, this time there was another error:
>>>> 
>>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>>               from :0:
>>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>> ^
>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>>> Error generating
>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>> 
>>>> 
>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>> Makefile:160: recipe for target 'all' failed
>>>> make: *** [all] Error 2
>>>> 
>>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell  wrote:
>>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>>> 
>>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>>> 
>>>> I'll be back.
>>>> 
>>>> Regards,
>>>> /Anders
>>>> 
>>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini  wrote:
>>>> That message does not really tell us why it failed. The build is not normally bothered
>>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>>> should normally build if it is all set up to be built.
>>>> 
>>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>>> This removes cmake issues out of the equation.
>>>> 
>>>> You can also run each command in the build.sh file separately to see exactly what
>>>> the matter is, if needed.
>>>> ========================
>>>> Prof. Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>> Maynooth University,
>>>> Maynooth, Co Kildare, Ireland
>>>> Tel: 00 353 7086936
>>>> Fax: 00 353 1 7086952
>>>> 
>>>>> On 2 Dec 2016, at 09:41, Anders Genell  wrote:
>>>>> 
>>>>> Hi!
>>>>> 
>>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>>> 
>>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>>> 
>>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>>> 
>>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>>> 
>>>>> Best regards,
>>>>> Anders
>>>>> 
>>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>>> Error generating file
>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>> 
>>>>> 
>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>> Makefile:160: recipe for target 'all' failed
>>>>> make: *** [all] Error 2
>>>> 
>>>> 

Date2016-12-04 13:57
FromVictor Lazzarini
SubjectRe: [Csnd-dev] CUDA related build error
You might need to edit the CMakeFiles.txt in Opcodes/cuda (if there is one there, I can't recall) or in Opcodes. I think it is all set for 3 as a minimum.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Dec 2016, at 13:46, Anders Genell  wrote:
> 
> I didn't really choose anything other than setting CUDA_TOOLKIT_ROOT_DIR and adding a -DBUILD_CUDA_OPCODES flag to cmake. How does one select compute capability?
> 
> Regards,
> Anders
> 
>> 4 dec. 2016 kl. 13:52 skrev Victor Lazzarini :
>> 
>> The message is in the code of one opcode and not the other, so that's not the problem.
>> 
>> Did you select the correct compute capability etc when you build the opcode?
>> We usually get zeros if the code does not
>> run properly in the GPU (unless there is
>> a simpler explanation, like issues in the
>> CSD code).
>> 
>> 
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>> 
>>> On 4 Dec 2016, at 11:31, Anders Genell  wrote:
>>> 
>>> Just to report back:
>>> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence. 
>>> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those. 
>>> 
>>> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next. 
>>> 
>>> Regards,
>>> Anders 
>>> 
>>> 
>>>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini :
>>>> 
>>>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>>>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study 
>>>> gpgpu processing.
>>>> ========================
>>>> Prof. Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>> Maynooth University,
>>>> Maynooth, Co Kildare, Ireland
>>>> Tel: 00 353 7086936
>>>> Fax: 00 353 1 7086952 
>>>> 
>>>>> On 2 Dec 2016, at 10:40, Anders Genell  wrote:
>>>>> 
>>>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>>>> 
>>>>> Regards,
>>>>> Anders
>>>>> 
>>>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell  wrote:
>>>>> Well, this time there was another error:
>>>>> 
>>>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>>>              from :0:
>>>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>> ^
>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>>>> Error generating
>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>> 
>>>>> 
>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>> Makefile:160: recipe for target 'all' failed
>>>>> make: *** [all] Error 2
>>>>> 
>>>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell  wrote:
>>>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>>>> 
>>>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>>>> 
>>>>> I'll be back.
>>>>> 
>>>>> Regards,
>>>>> /Anders
>>>>> 
>>>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini  wrote:
>>>>> That message does not really tell us why it failed. The build is not normally bothered
>>>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>>>> should normally build if it is all set up to be built.
>>>>> 
>>>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>>>> This removes cmake issues out of the equation.
>>>>> 
>>>>> You can also run each command in the build.sh file separately to see exactly what
>>>>> the matter is, if needed.
>>>>> ========================
>>>>> Prof. Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>> Maynooth University,
>>>>> Maynooth, Co Kildare, Ireland
>>>>> Tel: 00 353 7086936
>>>>> Fax: 00 353 1 7086952
>>>>> 
>>>>>> On 2 Dec 2016, at 09:41, Anders Genell  wrote:
>>>>>> 
>>>>>> Hi!
>>>>>> 
>>>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>>>> 
>>>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>>>> 
>>>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>>>> 
>>>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>>>> 
>>>>>> Best regards,
>>>>>> Anders
>>>>>> 
>>>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>>>> Error generating file
>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>> 
>>>>>> 
>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>> make: *** [all] Error 2
>>>>> 
>>>>> 

Date2016-12-04 13:58
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
I'll try that, thanks!

> 4 dec. 2016 kl. 14:57 skrev Victor Lazzarini :
> 
> You might need to edit the CMakeFiles.txt in Opcodes/cuda (if there is one there, I can't recall) or in Opcodes. I think it is all set for 3 as a minimum.
> 
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
> 
>> On 4 Dec 2016, at 13:46, Anders Genell  wrote:
>> 
>> I didn't really choose anything other than setting CUDA_TOOLKIT_ROOT_DIR and adding a -DBUILD_CUDA_OPCODES flag to cmake. How does one select compute capability?
>> 
>> Regards,
>> Anders
>> 
>>> 4 dec. 2016 kl. 13:52 skrev Victor Lazzarini :
>>> 
>>> The message is in the code of one opcode and not the other, so that's not the problem.
>>> 
>>> Did you select the correct compute capability etc when you build the opcode?
>>> We usually get zeros if the code does not
>>> run properly in the GPU (unless there is
>>> a simpler explanation, like issues in the
>>> CSD code).
>>> 
>>> 
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>> 
>>>> On 4 Dec 2016, at 11:31, Anders Genell  wrote:
>>>> 
>>>> Just to report back:
>>>> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence. 
>>>> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those. 
>>>> 
>>>> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next. 
>>>> 
>>>> Regards,
>>>> Anders 
>>>> 
>>>> 
>>>>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini :
>>>>> 
>>>>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>>>>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study 
>>>>> gpgpu processing.
>>>>> ========================
>>>>> Prof. Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>> Maynooth University,
>>>>> Maynooth, Co Kildare, Ireland
>>>>> Tel: 00 353 7086936
>>>>> Fax: 00 353 1 7086952 
>>>>> 
>>>>>> On 2 Dec 2016, at 10:40, Anders Genell  wrote:
>>>>>> 
>>>>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>>>>> 
>>>>>> Regards,
>>>>>> Anders
>>>>>> 
>>>>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell  wrote:
>>>>>> Well, this time there was another error:
>>>>>> 
>>>>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>>>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>>>>             from :0:
>>>>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>> ^
>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>>>>> Error generating
>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>> 
>>>>>> 
>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>> make: *** [all] Error 2
>>>>>> 
>>>>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell  wrote:
>>>>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>>>>> 
>>>>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>>>>> 
>>>>>> I'll be back.
>>>>>> 
>>>>>> Regards,
>>>>>> /Anders
>>>>>> 
>>>>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini  wrote:
>>>>>> That message does not really tell us why it failed. The build is not normally bothered
>>>>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>>>>> should normally build if it is all set up to be built.
>>>>>> 
>>>>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>>>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>>>>> This removes cmake issues out of the equation.
>>>>>> 
>>>>>> You can also run each command in the build.sh file separately to see exactly what
>>>>>> the matter is, if needed.
>>>>>> ========================
>>>>>> Prof. Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>> Maynooth University,
>>>>>> Maynooth, Co Kildare, Ireland
>>>>>> Tel: 00 353 7086936
>>>>>> Fax: 00 353 1 7086952
>>>>>> 
>>>>>>> On 2 Dec 2016, at 09:41, Anders Genell  wrote:
>>>>>>> 
>>>>>>> Hi!
>>>>>>> 
>>>>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>>>>> 
>>>>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>>>>> 
>>>>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>>>>> 
>>>>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>>>>> 
>>>>>>> Best regards,
>>>>>>> Anders
>>>>>>> 
>>>>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>>>>> Error generating file
>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>> 
>>>>>>> 
>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>> make: *** [all] Error 2
>>>>>> 
>>>>>> 

Date2016-12-04 15:46
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
Just to be clear, that would entail changing all -arch=sm_XX to -arch=sm_12, is that correct?

Regards,
Anders

> 4 dec. 2016 kl. 14:57 skrev Victor Lazzarini :
> 
> You might need to edit the CMakeFiles.txt in Opcodes/cuda (if there is one there, I can't recall) or in Opcodes. I think it is all set for 3 as a minimum.
> 
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
> 
>> On 4 Dec 2016, at 13:46, Anders Genell  wrote:
>> 
>> I didn't really choose anything other than setting CUDA_TOOLKIT_ROOT_DIR and adding a -DBUILD_CUDA_OPCODES flag to cmake. How does one select compute capability?
>> 
>> Regards,
>> Anders
>> 
>>> 4 dec. 2016 kl. 13:52 skrev Victor Lazzarini :
>>> 
>>> The message is in the code of one opcode and not the other, so that's not the problem.
>>> 
>>> Did you select the correct compute capability etc when you build the opcode?
>>> We usually get zeros if the code does not
>>> run properly in the GPU (unless there is
>>> a simpler explanation, like issues in the
>>> CSD code).
>>> 
>>> 
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>> 
>>>> On 4 Dec 2016, at 11:31, Anders Genell  wrote:
>>>> 
>>>> Just to report back:
>>>> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence. 
>>>> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those. 
>>>> 
>>>> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next. 
>>>> 
>>>> Regards,
>>>> Anders 
>>>> 
>>>> 
>>>>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini :
>>>>> 
>>>>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>>>>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study 
>>>>> gpgpu processing.
>>>>> ========================
>>>>> Prof. Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>> Maynooth University,
>>>>> Maynooth, Co Kildare, Ireland
>>>>> Tel: 00 353 7086936
>>>>> Fax: 00 353 1 7086952 
>>>>> 
>>>>>> On 2 Dec 2016, at 10:40, Anders Genell  wrote:
>>>>>> 
>>>>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>>>>> 
>>>>>> Regards,
>>>>>> Anders
>>>>>> 
>>>>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell  wrote:
>>>>>> Well, this time there was another error:
>>>>>> 
>>>>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>>>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>>>>             from :0:
>>>>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>> ^
>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>>>>> Error generating
>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>> 
>>>>>> 
>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>> make: *** [all] Error 2
>>>>>> 
>>>>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell  wrote:
>>>>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>>>>> 
>>>>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>>>>> 
>>>>>> I'll be back.
>>>>>> 
>>>>>> Regards,
>>>>>> /Anders
>>>>>> 
>>>>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini  wrote:
>>>>>> That message does not really tell us why it failed. The build is not normally bothered
>>>>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>>>>> should normally build if it is all set up to be built.
>>>>>> 
>>>>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>>>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>>>>> This removes cmake issues out of the equation.
>>>>>> 
>>>>>> You can also run each command in the build.sh file separately to see exactly what
>>>>>> the matter is, if needed.
>>>>>> ========================
>>>>>> Prof. Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>> Maynooth University,
>>>>>> Maynooth, Co Kildare, Ireland
>>>>>> Tel: 00 353 7086936
>>>>>> Fax: 00 353 1 7086952
>>>>>> 
>>>>>>> On 2 Dec 2016, at 09:41, Anders Genell  wrote:
>>>>>>> 
>>>>>>> Hi!
>>>>>>> 
>>>>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>>>>> 
>>>>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>>>>> 
>>>>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>>>>> 
>>>>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>>>>> 
>>>>>>> Best regards,
>>>>>>> Anders
>>>>>>> 
>>>>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>>>>> Error generating file
>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>> 
>>>>>>> 
>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>> make: *** [all] Error 2
>>>>>> 
>>>>>> 

Date2016-12-04 17:22
FromVictor Lazzarini
SubjectRe: [Csnd-dev] CUDA related build error
yes, whatever is the right value for your card

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Dec 2016, at 15:47, Anders Genell  wrote:
> 
> Just to be clear, that would entail changing all -arch=sm_XX to -arch=sm_12, is that correct?
> 
> Regards,
> Anders
> 
>> 4 dec. 2016 kl. 14:57 skrev Victor Lazzarini :
>> 
>> You might need to edit the CMakeFiles.txt in Opcodes/cuda (if there is one there, I can't recall) or in Opcodes. I think it is all set for 3 as a minimum.
>> 
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>> 
>>> On 4 Dec 2016, at 13:46, Anders Genell  wrote:
>>> 
>>> I didn't really choose anything other than setting CUDA_TOOLKIT_ROOT_DIR and adding a -DBUILD_CUDA_OPCODES flag to cmake. How does one select compute capability?
>>> 
>>> Regards,
>>> Anders
>>> 
>>>> 4 dec. 2016 kl. 13:52 skrev Victor Lazzarini :
>>>> 
>>>> The message is in the code of one opcode and not the other, so that's not the problem.
>>>> 
>>>> Did you select the correct compute capability etc when you build the opcode?
>>>> We usually get zeros if the code does not
>>>> run properly in the GPU (unless there is
>>>> a simpler explanation, like issues in the
>>>> CSD code).
>>>> 
>>>> 
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>> 
>>>>> On 4 Dec 2016, at 11:31, Anders Genell  wrote:
>>>>> 
>>>>> Just to report back:
>>>>> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence. 
>>>>> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those. 
>>>>> 
>>>>> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next. 
>>>>> 
>>>>> Regards,
>>>>> Anders 
>>>>> 
>>>>> 
>>>>>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini :
>>>>>> 
>>>>>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>>>>>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study 
>>>>>> gpgpu processing.
>>>>>> ========================
>>>>>> Prof. Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>> Maynooth University,
>>>>>> Maynooth, Co Kildare, Ireland
>>>>>> Tel: 00 353 7086936
>>>>>> Fax: 00 353 1 7086952 
>>>>>> 
>>>>>>> On 2 Dec 2016, at 10:40, Anders Genell  wrote:
>>>>>>> 
>>>>>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>>>>>> 
>>>>>>> Regards,
>>>>>>> Anders
>>>>>>> 
>>>>>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell  wrote:
>>>>>>> Well, this time there was another error:
>>>>>>> 
>>>>>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>>>>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>>>>>            from :0:
>>>>>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> ^
>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>>>>>> Error generating
>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>> 
>>>>>>> 
>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>> make: *** [all] Error 2
>>>>>>> 
>>>>>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell  wrote:
>>>>>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>>>>>> 
>>>>>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>>>>>> 
>>>>>>> I'll be back.
>>>>>>> 
>>>>>>> Regards,
>>>>>>> /Anders
>>>>>>> 
>>>>>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini  wrote:
>>>>>>> That message does not really tell us why it failed. The build is not normally bothered
>>>>>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>>>>>> should normally build if it is all set up to be built.
>>>>>>> 
>>>>>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>>>>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>>>>>> This removes cmake issues out of the equation.
>>>>>>> 
>>>>>>> You can also run each command in the build.sh file separately to see exactly what
>>>>>>> the matter is, if needed.
>>>>>>> ========================
>>>>>>> Prof. Victor Lazzarini
>>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>>> Maynooth University,
>>>>>>> Maynooth, Co Kildare, Ireland
>>>>>>> Tel: 00 353 7086936
>>>>>>> Fax: 00 353 1 7086952
>>>>>>> 
>>>>>>>> On 2 Dec 2016, at 09:41, Anders Genell  wrote:
>>>>>>>> 
>>>>>>>> Hi!
>>>>>>>> 
>>>>>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>>>>>> 
>>>>>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>>>>>> 
>>>>>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>>>>>> 
>>>>>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>>>>>> 
>>>>>>>> Best regards,
>>>>>>>> Anders
>>>>>>>> 
>>>>>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>>>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>>>>>> Error generating file
>>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>>> make: *** [all] Error 2
>>>>>>> 
>>>>>>> 

Date2016-12-04 18:18
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
Alas!
It seems the needed support might not be available for sm_12...

[ 65%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop1.dir//./cudaop1_generated_adsyn.cu.o
nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release.
nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release.
/home/anders/src/csound/Opcodes/cuda/adsyn.cu(110): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (float *, float)


Regards,
Anders

On Sun, Dec 4, 2016 at 6:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
yes, whatever is the right value for your card

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Dec 2016, at 15:47, Anders Genell <anders.genell@GMAIL.COM> wrote:
>
> Just to be clear, that would entail changing all -arch=sm_XX to -arch=sm_12, is that correct?
>
> Regards,
> Anders
>
>> 4 dec. 2016 kl. 14:57 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>
>> You might need to edit the CMakeFiles.txt in Opcodes/cuda (if there is one there, I can't recall) or in Opcodes. I think it is all set for 3 as a minimum.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 4 Dec 2016, at 13:46, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>
>>> I didn't really choose anything other than setting CUDA_TOOLKIT_ROOT_DIR and adding a -DBUILD_CUDA_OPCODES flag to cmake. How does one select compute capability?
>>>
>>> Regards,
>>> Anders
>>>
>>>> 4 dec. 2016 kl. 13:52 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>>>
>>>> The message is in the code of one opcode and not the other, so that's not the problem.
>>>>
>>>> Did you select the correct compute capability etc when you build the opcode?
>>>> We usually get zeros if the code does not
>>>> run properly in the GPU (unless there is
>>>> a simpler explanation, like issues in the
>>>> CSD code).
>>>>
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>> On 4 Dec 2016, at 11:31, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>
>>>>> Just to report back:
>>>>> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence.
>>>>> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those.
>>>>>
>>>>> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next.
>>>>>
>>>>> Regards,
>>>>> Anders
>>>>>
>>>>>
>>>>>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>>>>>
>>>>>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>>>>>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study
>>>>>> gpgpu processing.
>>>>>> ========================
>>>>>> Prof. Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>> Maynooth University,
>>>>>> Maynooth, Co Kildare, Ireland
>>>>>> Tel: 00 353 7086936
>>>>>> Fax: 00 353 1 7086952
>>>>>>
>>>>>>> On 2 Dec 2016, at 10:40, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>>>
>>>>>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Anders
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell <anders.genell@gmail.com> wrote:
>>>>>>> Well, this time there was another error:
>>>>>>>
>>>>>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>>>>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>>>>>            from <command-line>:0:
>>>>>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> ^
>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>>>>>> Error generating
>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>
>>>>>>>
>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>> make: *** [all] Error 2
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell <anders.genell@gmail.com> wrote:
>>>>>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>>>>>>
>>>>>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>>>>>>
>>>>>>> I'll be back.
>>>>>>>
>>>>>>> Regards,
>>>>>>> /Anders
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>>>>>>> That message does not really tell us why it failed. The build is not normally bothered
>>>>>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>>>>>> should normally build if it is all set up to be built.
>>>>>>>
>>>>>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>>>>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>>>>>> This removes cmake issues out of the equation.
>>>>>>>
>>>>>>> You can also run each command in the build.sh file separately to see exactly what
>>>>>>> the matter is, if needed.
>>>>>>> ========================
>>>>>>> Prof. Victor Lazzarini
>>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>>> Maynooth University,
>>>>>>> Maynooth, Co Kildare, Ireland
>>>>>>> Tel: 00 353 7086936
>>>>>>> Fax: 00 353 1 7086952
>>>>>>>
>>>>>>>> On 2 Dec 2016, at 09:41, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>>>>
>>>>>>>> Hi!
>>>>>>>>
>>>>>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>>>>>>
>>>>>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>>>>>>
>>>>>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>>>>>>
>>>>>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Anders
>>>>>>>>
>>>>>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>>>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>>>>>> Error generating file
>>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>>
>>>>>>>>
>>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>>> make: *** [all] Error 2
>>>>>>>
>>>>>>>
>>>>>>>


Date2016-12-04 19:39
FromVictor Lazzarini
SubjectRe: [Csnd-dev] CUDA related build error
Now I remember why it was set up
as 3.0 as the minimum.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 4 Dec 2016, at 18:19, Anders Genell <anders.genell@GMAIL.COM> wrote:

Alas!
It seems the needed support might not be available for sm_12...

[ 65%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop1.dir//./cudaop1_generated_adsyn.cu.o
nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release.
nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release.
/home/anders/src/csound/Opcodes/cuda/adsyn.cu(110): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (float *, float)


Regards,
Anders

On Sun, Dec 4, 2016 at 6:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
yes, whatever is the right value for your card

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Dec 2016, at 15:47, Anders Genell <anders.genell@GMAIL.COM> wrote:
>
> Just to be clear, that would entail changing all -arch=sm_XX to -arch=sm_12, is that correct?
>
> Regards,
> Anders
>
>> 4 dec. 2016 kl. 14:57 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>
>> You might need to edit the CMakeFiles.txt in Opcodes/cuda (if there is one there, I can't recall) or in Opcodes. I think it is all set for 3 as a minimum.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 4 Dec 2016, at 13:46, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>
>>> I didn't really choose anything other than setting CUDA_TOOLKIT_ROOT_DIR and adding a -DBUILD_CUDA_OPCODES flag to cmake. How does one select compute capability?
>>>
>>> Regards,
>>> Anders
>>>
>>>> 4 dec. 2016 kl. 13:52 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>>>
>>>> The message is in the code of one opcode and not the other, so that's not the problem.
>>>>
>>>> Did you select the correct compute capability etc when you build the opcode?
>>>> We usually get zeros if the code does not
>>>> run properly in the GPU (unless there is
>>>> a simpler explanation, like issues in the
>>>> CSD code).
>>>>
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>> On 4 Dec 2016, at 11:31, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>
>>>>> Just to report back:
>>>>> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence.
>>>>> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those.
>>>>>
>>>>> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next.
>>>>>
>>>>> Regards,
>>>>> Anders
>>>>>
>>>>>
>>>>>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>>>>>
>>>>>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>>>>>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study
>>>>>> gpgpu processing.
>>>>>> ========================
>>>>>> Prof. Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>> Maynooth University,
>>>>>> Maynooth, Co Kildare, Ireland
>>>>>> Tel: 00 353 7086936
>>>>>> Fax: 00 353 1 7086952
>>>>>>
>>>>>>> On 2 Dec 2016, at 10:40, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>>>
>>>>>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Anders
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell <anders.genell@gmail.com> wrote:
>>>>>>> Well, this time there was another error:
>>>>>>>
>>>>>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>>>>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>>>>>            from <command-line>:0:
>>>>>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> ^
>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>>>>>> Error generating
>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>
>>>>>>>
>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>> make: *** [all] Error 2
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell <anders.genell@gmail.com> wrote:
>>>>>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>>>>>>
>>>>>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>>>>>>
>>>>>>> I'll be back.
>>>>>>>
>>>>>>> Regards,
>>>>>>> /Anders
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>>>>>>> That message does not really tell us why it failed. The build is not normally bothered
>>>>>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>>>>>> should normally build if it is all set up to be built.
>>>>>>>
>>>>>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>>>>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>>>>>> This removes cmake issues out of the equation.
>>>>>>>
>>>>>>> You can also run each command in the build.sh file separately to see exactly what
>>>>>>> the matter is, if needed.
>>>>>>> ========================
>>>>>>> Prof. Victor Lazzarini
>>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>>> Maynooth University,
>>>>>>> Maynooth, Co Kildare, Ireland
>>>>>>> Tel: 00 353 7086936
>>>>>>> Fax: 00 353 1 7086952
>>>>>>>
>>>>>>>> On 2 Dec 2016, at 09:41, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>>>>
>>>>>>>> Hi!
>>>>>>>>
>>>>>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>>>>>>
>>>>>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>>>>>>
>>>>>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>>>>>>
>>>>>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Anders
>>>>>>>>
>>>>>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>>>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>>>>>> Error generating file
>>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>>
>>>>>>>>
>>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>>> make: *** [all] Error 2
>>>>>>>
>>>>>>>
>>>>>>>


Date2016-12-04 20:00
FromAnders Genell
SubjectRe: [Csnd-dev] CUDA related build error
Oh well, it was worth a try. Thanks for the assistance. I'll aim for the stationary PC solution instead. 

Regards,
Anders

4 dec. 2016 kl. 20:39 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:

Now I remember why it was set up
as 3.0 as the minimum.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 4 Dec 2016, at 18:19, Anders Genell <anders.genell@GMAIL.COM> wrote:

Alas!
It seems the needed support might not be available for sm_12...

[ 65%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop1.dir//./cudaop1_generated_adsyn.cu.o
nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release.
nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release.
/home/anders/src/csound/Opcodes/cuda/adsyn.cu(110): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (float *, float)


Regards,
Anders

On Sun, Dec 4, 2016 at 6:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
yes, whatever is the right value for your card

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Dec 2016, at 15:47, Anders Genell <anders.genell@GMAIL.COM> wrote:
>
> Just to be clear, that would entail changing all -arch=sm_XX to -arch=sm_12, is that correct?
>
> Regards,
> Anders
>
>> 4 dec. 2016 kl. 14:57 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>
>> You might need to edit the CMakeFiles.txt in Opcodes/cuda (if there is one there, I can't recall) or in Opcodes. I think it is all set for 3 as a minimum.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 4 Dec 2016, at 13:46, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>
>>> I didn't really choose anything other than setting CUDA_TOOLKIT_ROOT_DIR and adding a -DBUILD_CUDA_OPCODES flag to cmake. How does one select compute capability?
>>>
>>> Regards,
>>> Anders
>>>
>>>> 4 dec. 2016 kl. 13:52 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>>>
>>>> The message is in the code of one opcode and not the other, so that's not the problem.
>>>>
>>>> Did you select the correct compute capability etc when you build the opcode?
>>>> We usually get zeros if the code does not
>>>> run properly in the GPU (unless there is
>>>> a simpler explanation, like issues in the
>>>> CSD code).
>>>>
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>> On 4 Dec 2016, at 11:31, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>
>>>>> Just to report back:
>>>>> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence.
>>>>> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those.
>>>>>
>>>>> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next.
>>>>>
>>>>> Regards,
>>>>> Anders
>>>>>
>>>>>
>>>>>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>>>>>
>>>>>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>>>>>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study
>>>>>> gpgpu processing.
>>>>>> ========================
>>>>>> Prof. Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>> Maynooth University,
>>>>>> Maynooth, Co Kildare, Ireland
>>>>>> Tel: 00 353 7086936
>>>>>> Fax: 00 353 1 7086952
>>>>>>
>>>>>>> On 2 Dec 2016, at 10:40, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>>>
>>>>>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Anders
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell <anders.genell@gmail.com> wrote:
>>>>>>> Well, this time there was another error:
>>>>>>>
>>>>>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>>>>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>>>>>            from <command-line>:0:
>>>>>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> ^
>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>>>>>> Error generating
>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>
>>>>>>>
>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>> make: *** [all] Error 2
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell <anders.genell@gmail.com> wrote:
>>>>>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>>>>>>
>>>>>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>>>>>>
>>>>>>> I'll be back.
>>>>>>>
>>>>>>> Regards,
>>>>>>> /Anders
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>>>>>>> That message does not really tell us why it failed. The build is not normally bothered
>>>>>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>>>>>> should normally build if it is all set up to be built.
>>>>>>>
>>>>>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>>>>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>>>>>> This removes cmake issues out of the equation.
>>>>>>>
>>>>>>> You can also run each command in the build.sh file separately to see exactly what
>>>>>>> the matter is, if needed.
>>>>>>> ========================
>>>>>>> Prof. Victor Lazzarini
>>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>>> Maynooth University,
>>>>>>> Maynooth, Co Kildare, Ireland
>>>>>>> Tel: 00 353 7086936
>>>>>>> Fax: 00 353 1 7086952
>>>>>>>
>>>>>>>> On 2 Dec 2016, at 09:41, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>>>>
>>>>>>>> Hi!
>>>>>>>>
>>>>>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>>>>>>
>>>>>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>>>>>>
>>>>>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>>>>>>
>>>>>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Anders
>>>>>>>>
>>>>>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>>>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>>>>>> Error generating file
>>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>>
>>>>>>>>
>>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>>> make: *** [all] Error 2
>>>>>>>
>>>>>>>
>>>>>>>


Date2016-12-04 20:37
FromVictor Lazzarini
SubjectRe: [Csnd-dev] CUDA related build error
We have a GTX 750 ti and a GT 730 in two
desktop boxes. They do the job, but I guess
there might be newer more powerful cards now.

I chose the 750 because it seemed the most
powerful card that could be powered by
the pci express (and therefore did no need
a psu replacement). I also needed a
low profile card to fit in the box.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 4 Dec 2016, at 20:01, Anders Genell <anders.genell@GMAIL.COM> wrote:

Oh well, it was worth a try. Thanks for the assistance. I'll aim for the stationary PC solution instead. 

Regards,
Anders

4 dec. 2016 kl. 20:39 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:

Now I remember why it was set up
as 3.0 as the minimum.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 4 Dec 2016, at 18:19, Anders Genell <anders.genell@GMAIL.COM> wrote:

Alas!
It seems the needed support might not be available for sm_12...

[ 65%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop1.dir//./cudaop1_generated_adsyn.cu.o
nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release.
nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release.
/home/anders/src/csound/Opcodes/cuda/adsyn.cu(110): error: no instance of overloaded function "atomicAdd" matches the argument list
            argument types are: (float *, float)


Regards,
Anders

On Sun, Dec 4, 2016 at 6:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
yes, whatever is the right value for your card

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Dec 2016, at 15:47, Anders Genell <anders.genell@GMAIL.COM> wrote:
>
> Just to be clear, that would entail changing all -arch=sm_XX to -arch=sm_12, is that correct?
>
> Regards,
> Anders
>
>> 4 dec. 2016 kl. 14:57 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>
>> You might need to edit the CMakeFiles.txt in Opcodes/cuda (if there is one there, I can't recall) or in Opcodes. I think it is all set for 3 as a minimum.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 4 Dec 2016, at 13:46, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>
>>> I didn't really choose anything other than setting CUDA_TOOLKIT_ROOT_DIR and adding a -DBUILD_CUDA_OPCODES flag to cmake. How does one select compute capability?
>>>
>>> Regards,
>>> Anders
>>>
>>>> 4 dec. 2016 kl. 13:52 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>>>
>>>> The message is in the code of one opcode and not the other, so that's not the problem.
>>>>
>>>> Did you select the correct compute capability etc when you build the opcode?
>>>> We usually get zeros if the code does not
>>>> run properly in the GPU (unless there is
>>>> a simpler explanation, like issues in the
>>>> CSD code).
>>>>
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>> On 4 Dec 2016, at 11:31, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>
>>>>> Just to report back:
>>>>> I got the build working with Ubuntu 14.04 and CUDA 6.5. The cuda opcodes are built and csound finds them when copied to the proper location. However, when trying to adapt e.g. the cudapconv.csd example to sound files (I used one of the impulse responses freely available online as mentioned in another thread) the result is silence - overall amplitudes reported as 0.0. When using the cudaconv opcode I get a message it is using nvidia nvs 3100m in the terminal, so it seems to communicate with the graphics card, but there is still silence. When using the cudapconv opcode there is no such message, and there is just silence.
>>>>> Using ordinary pconvolve works fine using the same sound files, so there doesn't seem to be anything wrong with those.
>>>>>
>>>>> When I installed cuda toolkit 6.5 the nvidia-340 driver was deactivated and it seems the 361 driver was installed. The 361 driver doesn't support the nvs3200m card, however, so I reinstalled the 340 driver, but I am wondering if there is some discrepancy between cuda and nvidia driver. I don't get any error messages when running the cuda opcodes though, so I don't really know where to go next.
>>>>>
>>>>> Regards,
>>>>> Anders
>>>>>
>>>>>
>>>>>> 2 dec. 2016 kl. 11:47 skrev Victor Lazzarini <Victor.Lazzarini@NUIM.IE>:
>>>>>>
>>>>>> What I have done here is that I got an old PC (actually two) and spent ~100 euros on two decent
>>>>>> new/current NVIDIA cards (no need to go beyond too much that) and set up two nice workstations to study
>>>>>> gpgpu processing.
>>>>>> ========================
>>>>>> Prof. Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>> Maynooth University,
>>>>>> Maynooth, Co Kildare, Ireland
>>>>>> Tel: 00 353 7086936
>>>>>> Fax: 00 353 1 7086952
>>>>>>
>>>>>>> On 2 Dec 2016, at 10:40, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>>>
>>>>>>> Well, installing gcc < 4.9 on Ubuntu 16.04 seems a hassle. Nvidia only provides CUDA 6.5 for 12.04 and 14.04, so I will likely install 14.04 on the laptop to have everything in sync. I'll return with a report once all is up and running again.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Anders
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 11:25 AM, Anders Genell <anders.genell@gmail.com> wrote:
>>>>>>> Well, this time there was another error:
>>>>>>>
>>>>>>> [ 61%] Building NVCC (Device) object Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o
>>>>>>> In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,
>>>>>>>            from <command-line>:0:
>>>>>>> /usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> #error -- unsupported GNU version! gcc 4.9 and up are not supported!
>>>>>>> ^
>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:207 (message):
>>>>>>> Error generating
>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>
>>>>>>>
>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:63: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>> make: *** [all] Error 2
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 11:12 AM, Anders Genell <anders.genell@gmail.com> wrote:
>>>>>>> Well, upon researching a bit I found that the NVS3100M has "compute capability" limited to 1.2, (http://www.nvidia.com/object/nvs_techspecs.html) which is supported in the older CUDA 6.5 but not in more recent versions (https://en.wikipedia.org/wiki/CUDA: 'CUDA SDK 6.5: Last Version with support for Tesla with Compute Capability 1.x').
>>>>>>>
>>>>>>> I'll install this instead and will have another go, and if it still fails I'll start trying with the build.sh script.
>>>>>>>
>>>>>>> I'll be back.
>>>>>>>
>>>>>>> Regards,
>>>>>>> /Anders
>>>>>>>
>>>>>>> On Fri, Dec 2, 2016 at 10:56 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>>>>>>> That message does not really tell us why it failed. The build is not normally bothered
>>>>>>> whether you have a GPU and what type it is. It just depends on having CUDA, so it
>>>>>>> should normally build if it is all set up to be built.
>>>>>>>
>>>>>>> There is a a build.sh in the ./Opcodes/cuda/  that you can try using. That expects
>>>>>>> Csound to be installed so that the headers can be found (and CUDA of course).
>>>>>>> This removes cmake issues out of the equation.
>>>>>>>
>>>>>>> You can also run each command in the build.sh file separately to see exactly what
>>>>>>> the matter is, if needed.
>>>>>>> ========================
>>>>>>> Prof. Victor Lazzarini
>>>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>>>> Maynooth University,
>>>>>>> Maynooth, Co Kildare, Ireland
>>>>>>> Tel: 00 353 7086936
>>>>>>> Fax: 00 353 1 7086952
>>>>>>>
>>>>>>>> On 2 Dec 2016, at 09:41, Anders Genell <anders.genell@GMAIL.COM> wrote:
>>>>>>>>
>>>>>>>> Hi!
>>>>>>>>
>>>>>>>> This is perhaps mostly directed towards Victor since it concerns CUDA.
>>>>>>>>
>>>>>>>> I have a laptop with an Nvidia NVS3100M gpu, running Ubuntu 16.04 and with Nvidia official drivers (340) and I have installed CUDA 8.0.44.
>>>>>>>>
>>>>>>>> I am not entirely sure the gpu handles all CUDA functionality available in more advanced gpus, and when I try to build csound with cuda opcodes enabled I get the error included below.
>>>>>>>>
>>>>>>>> Is there a way to test for funtionality in my current gpu&cuda configuration?
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Anders
>>>>>>>>
>>>>>>>> 1 error detected in the compilation of "/tmp/tmpxft_00001075_00000000-5_slidingm.cpp4.ii".
>>>>>>>> -- Removing /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> /usr/bin/cmake -E remove /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>> CMake Error at cudaop3_generated_slidingm.cu.o.cmake:266 (message):
>>>>>>>> Error generating file
>>>>>>>> /home/anders/src/csound/csound6/Opcodes/cuda/CMakeFiles/cudaop3.dir//./cudaop3_generated_slidingm.cu.o
>>>>>>>>
>>>>>>>>
>>>>>>>> Opcodes/cuda/CMakeFiles/cudaop3.dir/build.make:217: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o' failed
>>>>>>>> make[2]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/cudaop3_generated_slidingm.cu.o] Error 1
>>>>>>>> CMakeFiles/Makefile2:1541: recipe for target 'Opcodes/cuda/CMakeFiles/cudaop3.dir/all' failed
>>>>>>>> make[1]: *** [Opcodes/cuda/CMakeFiles/cudaop3.dir/all] Error 2
>>>>>>>> Makefile:160: recipe for target 'all' failed
>>>>>>>> make: *** [all] Error 2
>>>>>>>
>>>>>>>
>>>>>>>