Cannot build CUDA 4.0 SDK samples on Ubuntu 10.10
  1 / 2    
[code]
make -C src/smokeParticles/
make[2]: Entering directory `/home/nils/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles'
"/usr/local/cuda/include/thrust/detail/device/cuda/detail/launch_closure.inl(84): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/launch_closure.inl(118): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(410): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(420): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(430): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(480): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(490): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(500): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(331): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(346): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(360): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(414): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(430): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(448): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/copy_if.inl(241): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/copy_if.inl(251): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(928): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(943): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(1006): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(1041): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(1081): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(1193): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(481): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(488): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(504): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(517): error: kernel launches from templates are not allowed in system files

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(521): error: kernel launches from templates are not allowed in system files

27 errors detected in the compilation of "/tmp/tmpxft_00004cb9_00000000-15_ParticleSystem.cpp4.ii".
make[2]: *** [obj/x86_64/release/ParticleSystem.cu.o] Error 2
make[2]: Leaving directory `/home/nils/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles'
make[1]: *** [src/smokeParticles/Makefile.ph_build] Error 2
make[1]: Leaving directory `/home/nils/NVIDIA_GPU_Computing_SDK/C'
make: *** [all] Error 2
NVIDIA_GPU_Computing_SDK >
[/code]

No idea what the error actually means.. /argh.gif' class='bbc_emoticon' alt=':argh:' />


make -C src/smokeParticles/

make[2]: Entering directory `/home/nils/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles'

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/launch_closure.inl(84): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/launch_closure.inl(118): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(410): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(420): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(430): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(480): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(490): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/fast_scan.inl(500): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(331): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(346): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(360): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(414): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(430): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/safe_scan.inl(448): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/copy_if.inl(241): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/copy_if.inl(251): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(928): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(943): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(1006): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(1041): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(1081): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/stable_merge_sort.inl(1193): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(481): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(488): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(504): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(517): error: kernel launches from templates are not allowed in system files



"/usr/local/cuda/include/thrust/detail/device/cuda/detail/b40c/radixsort_api.h(521): error: kernel launches from templates are not allowed in system files



27 errors detected in the compilation of "/tmp/tmpxft_00004cb9_00000000-15_ParticleSystem.cpp4.ii".

make[2]: *** [obj/x86_64/release/ParticleSystem.cu.o] Error 2

make[2]: Leaving directory `/home/nils/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles'

make[1]: *** [src/smokeParticles/Makefile.ph_build] Error 2

make[1]: Leaving directory `/home/nils/NVIDIA_GPU_Computing_SDK/C'

make: *** [all] Error 2

NVIDIA_GPU_Computing_SDK >




No idea what the error actually means.. /argh.gif' class='bbc_emoticon' alt=':argh:' />

#1
Posted 03/04/2011 09:39 AM   
Are you sure you are really compiling with the correct nvcc version?
Are you sure you are really compiling with the correct nvcc version?

#2
Posted 03/04/2011 01:03 PM   
[code]
~ > nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2011 NVIDIA Corporation
Built on Fri_Feb_18_18:07:32_PST_2011
Cuda compilation tools, release 4.0, V0.2.1221
[/code]

Well I had CUDA 3.2 installed before, but I think the installer removed that before installing the new version.


~ > nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver

Copyright (c) 2005-2011 NVIDIA Corporation

Built on Fri_Feb_18_18:07:32_PST_2011

Cuda compilation tools, release 4.0, V0.2.1221




Well I had CUDA 3.2 installed before, but I think the installer removed that before installing the new version.

#3
Posted 03/04/2011 03:54 PM   
How can I invoke make so that it shows me the exact commands executed?
How can I invoke make so that it shows me the exact commands executed?

#4
Posted 03/04/2011 03:58 PM   
for the sdk you can run make verbose=1. I had no problems building the complete 4.0rc sdk on a 64 bit Ubuntu 9.04 box.
for the sdk you can run make verbose=1. I had no problems building the complete 4.0rc sdk on a 64 bit Ubuntu 9.04 box.

#5
Posted 03/04/2011 04:13 PM   
thx just figured that out too /wink.gif' class='bbc_emoticon' alt=';)' />

Here is the command which fails:

[code]
/usr/local/cuda/bin/nvcc -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -m64 --compiler-options -fno-strict-aliasing -I. -I/usr/local/cuda/include -I../../common/inc -I../../../shared//inc -DUNIX -O2 -o obj/x86_64/release/ParticleSystem.cu.o -c ParticleSystem.cu
"/usr/local/cuda/include/thrust/detail/device/cuda/detail/launch_closure.inl(84): error: kernel launches from templates are not allowed in system files
[/code]
thx just figured that out too /wink.gif' class='bbc_emoticon' alt=';)' />



Here is the command which fails:





/usr/local/cuda/bin/nvcc -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -m64 --compiler-options -fno-strict-aliasing -I. -I/usr/local/cuda/include -I../../common/inc -I../../../shared//inc -DUNIX -O2 -o obj/x86_64/release/ParticleSystem.cu.o -c ParticleSystem.cu

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/launch_closure.inl(84): error: kernel launches from templates are not allowed in system files

#6
Posted 03/04/2011 04:20 PM   
That's strange.. they only thing which differs is probably the gcc/g++ version. Can you post yours?
That's strange.. they only thing which differs is probably the gcc/g++ version. Can you post yours?

#7
Posted 03/04/2011 04:35 PM   
[code]avidday@cuda:~$ gcc --version
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[/code]
avidday@cuda:~$ gcc --version

gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3

Copyright (C) 2008 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


#8
Posted 03/04/2011 05:28 PM   
have the same problem on ubuntu 10.04:
[code]
/usr/local/cuda/bin/nvcc -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -m64 --compiler-options -fno-strict-aliasing -I. -I/usr/local/cuda/include -I../../common/inc -I../../../shared//inc -DUNIX -O2 -o obj/x86_64/release/particleSystem.cu.o -c particleSystem.cu
"/usr/local/cuda/include/thrust/detail/device/cuda/detail/launch_closure.inl(84): error: kernel launches from templates are not allowed in system files
[/code]

[code]
:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2011 NVIDIA Corporation
Built on Fri_Feb_18_18:07:32_PST_2011
Cuda compilation tools, release 4.0, V0.2.1221
[/code]

seems to be linked to the thrust lib. found this link:
[url]
http://code.google.com/p/thrust/issues/detail?id=184
[/url]

maybe installing cuda on our home directory will solve this issue. i don't like it though.
have the same problem on ubuntu 10.04:



/usr/local/cuda/bin/nvcc -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -m64 --compiler-options -fno-strict-aliasing -I. -I/usr/local/cuda/include -I../../common/inc -I../../../shared//inc -DUNIX -O2 -o obj/x86_64/release/particleSystem.cu.o -c particleSystem.cu

"/usr/local/cuda/include/thrust/detail/device/cuda/detail/launch_closure.inl(84): error: kernel launches from templates are not allowed in system files






:~$ nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver

Copyright (c) 2005-2011 NVIDIA Corporation

Built on Fri_Feb_18_18:07:32_PST_2011

Cuda compilation tools, release 4.0, V0.2.1221




seems to be linked to the thrust lib. found this link:

[url]

http://code.google.com/p/thrust/issues/detail?id=184

[/url]



maybe installing cuda on our home directory will solve this issue. i don't like it though.

#9
Posted 03/07/2011 04:20 AM   
Any update on this? This is really annoying..
Any update on this? This is really annoying..

#10
Posted 04/04/2011 04:45 PM   
Since I replied on this thread a month ago, I updated my main development box to Ubuntu 10.04 LTS, so the gcc version is now:
[code]
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[/code]

and the 4.0rc1 SDK still builds without errors.....
Since I replied on this thread a month ago, I updated my main development box to Ubuntu 10.04 LTS, so the gcc version is now:



gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3

Copyright (C) 2009 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.




and the 4.0rc1 SDK still builds without errors.....

#11
Posted 04/04/2011 05:09 PM   
Well it just seems to be the smoke particle example which does not work.. What about the computeprof? Does it run stable?
Well it just seems to be the smoke particle example which does not work.. What about the computeprof? Does it run stable?

#12
Posted 04/04/2011 07:16 PM   
CUDA 4.0 RC2
i. e. how to get a nice installation of above mentioned CUDA 4.0 (RC2) to work under a fresh install of a 64 bit Ubuntu 11.04 (codename Natty Narwhal).

After installing a few tidbits I need for everyday life, I decided to give CUDA a try (after it messed up my previous installation)

[list=1]
[*] I didn't change the graphics driver after installation.
[*] Added the ppa from here [url="https://launchpad.net/~aaron-haviland/+archive/cuda-4.0"]here[/url]:
[code]sudo add-apt-repository ppa:aaron-haviland/cuda-4.0[/code]
[*] [code]sudo apt-get install nvidia-cuda-toolkit[/code]
[*] Updated my graphics driver with Ubuntu's nice "Additional drivers" GUI. I think it's the same as
[code]sudo apt-get install nvidia-current[/code]
(I'm not sure about this. This is where my previous installation got screwed up. I had driver version 173.* and needed 170.*. 170 is what I have now. It compiles and runs.)
[*] Downloaded the [url="http://developer.download.nvidia.com/compute/cuda/4_0_rc2/sdk/gpucomputingsdk_4.0.13_linux.run"]SDK[/url] from Nvidia, and install:
[code]sh gpucomputingsdk_4.0.13_linux.run[/code]
[*] Tried to compile with - failed.
[*] Installed some of the missing lib's and g++-4.4
[code]sudo apt-get install libxi-dev libxmu-dev libglut3-dev g++-4.4[/code]
[*] Modified the $SDK/C/common/common.mk. Changed
[code]g++[/code] to [code]g++-4.4[/code] (twice); changed
[code]gcc[/code] to [code]gcc-4.4[/code] (once); and added
[code]--compiler-bindir=/usr/bin/g++-4.4[/code] to the NVCCFLAGS variable so the entire line is:
[code]NVCCFLAGS := --compiler-bindir=/usr/bin/g++-4.4[/code]
[*] Tried to compile and got the mentioned error about system files not being allowed to launch kernels
[*][code]sudo mkdir /usr/local/cuda
sudo mkdir /usr/local/cuda/include
sudo mv /usr/include/thrust /usr/local/cuda/include[/code]
[*] Modified $SDK/C/common/common.mk again. Changed the line
[code]INCLUDES += -I. -I$(CUDA_INSTALL_PATH)/include -I$(COMMONDIR)/inc -I$(SHAREDDIR
)/inc[/code]
to
[code]INCLUDES += -I. -I$(CUDA_INSTALL_PATH)/include -I$(COMMONDIR)/inc -I$(SHAREDDIR
)/inc -I/usr/local/cuda/include[/code]
(just "-I/usr/local/cuda/include" added)
[*] Compiled, and ran.
[/list]

It's late, so I hope I didn't leave out anything.

Cheers!
CUDA 4.0 RC2

i. e. how to get a nice installation of above mentioned CUDA 4.0 (RC2) to work under a fresh install of a 64 bit Ubuntu 11.04 (codename Natty Narwhal).



After installing a few tidbits I need for everyday life, I decided to give CUDA a try (after it messed up my previous installation)



[list=1]

  • I didn't change the graphics driver after installation.
  • Added the ppa from here here:
  • sudo add-apt-repository ppa:aaron-haviland/cuda-4.0


  • sudo apt-get install nvidia-cuda-toolkit

  • Updated my graphics driver with Ubuntu's nice "Additional drivers" GUI. I think it's the same as
  • sudo apt-get install nvidia-current


    (I'm not sure about this. This is where my previous installation got screwed up. I had driver version 173.* and needed 170.*. 170 is what I have now. It compiles and runs.)

  • Downloaded the SDK from Nvidia, and install:
  • sh gpucomputingsdk_4.0.13_linux.run


  • Tried to compile with - failed.
  • Installed some of the missing lib's and g++-4.4
  • sudo apt-get install libxi-dev libxmu-dev libglut3-dev g++-4.4


  • Modified the $SDK/C/common/common.mk. Changed
  • g++
    to
    g++-4.4
    (twice); changed

    gcc
    to
    gcc-4.4
    (once); and added

    --compiler-bindir=/usr/bin/g++-4.4
    to the NVCCFLAGS variable so the entire line is:

    NVCCFLAGS       := --compiler-bindir=/usr/bin/g++-4.4


  • Tried to compile and got the mentioned error about system files not being allowed to launch kernels
  • sudo mkdir /usr/local/cuda
  • sudo mkdir /usr/local/cuda/include

    sudo mv /usr/include/thrust /usr/local/cuda/include

  • Modified $SDK/C/common/common.mk again. Changed the line
  • INCLUDES  += -I. -I$(CUDA_INSTALL_PATH)/include -I$(COMMONDIR)/inc -I$(SHAREDDIR

    )/inc


    to

    INCLUDES  += -I. -I$(CUDA_INSTALL_PATH)/include -I$(COMMONDIR)/inc -I$(SHAREDDIR

    )/inc -I/usr/local/cuda/include


    (just "-I/usr/local/cuda/include" added)

  • Compiled, and ran.
  • [/list]



    It's late, so I hope I didn't leave out anything.



    Cheers!

    #13
    Posted 05/09/2011 09:55 PM   
    Emil Vatai, I'm grateful for your step-by-step, but it doesn't seem to be working for me--I still get the kernel launches from system files error. The only thing I can think that could be different is the nvidia-current driver, but that shouldn't affect it, should it?
    Emil Vatai, I'm grateful for your step-by-step, but it doesn't seem to be working for me--I still get the kernel launches from system files error. The only thing I can think that could be different is the nvidia-current driver, but that shouldn't affect it, should it?

    #14
    Posted 05/10/2011 02:20 PM   
    [quote name='Muphrid' date='10 May 2011 - 02:20 PM' timestamp='1305037240' post='1235584']
    Emil Vatai, I'm grateful for your step-by-step, but it doesn't seem to be working for me--I still get the kernel launches from system files error. The only thing I can think that could be different is the nvidia-current driver, but that shouldn't affect it, should it?
    [/quote]
    maybe you can try like this :
    Solution:the include path for the corresponding headers must be specified by a -I
    flag to the compiler

    https://amcg.ese.ic.ac.uk/~fr710/wiki/dev/cuda/start
    nvcc errors
    kernel launches from templates are not allowed in system files
    occurs whenever a kernel is launched from a template class or function that is
    declared in a header residing in a standard include path of the compiler
    Note: this applies also to include path expansion e.g. through the
    CPLUS_INCLUDE_PATH environment variable
    [quote name='Muphrid' date='10 May 2011 - 02:20 PM' timestamp='1305037240' post='1235584']

    Emil Vatai, I'm grateful for your step-by-step, but it doesn't seem to be working for me--I still get the kernel launches from system files error. The only thing I can think that could be different is the nvidia-current driver, but that shouldn't affect it, should it?



    maybe you can try like this :

    Solution:the include path for the corresponding headers must be specified by a -I

    flag to the compiler



    https://amcg.ese.ic.ac.uk/~fr710/wiki/dev/cuda/start

    nvcc errors

    kernel launches from templates are not allowed in system files

    occurs whenever a kernel is launched from a template class or function that is

    declared in a header residing in a standard include path of the compiler

    Note: this applies also to include path expansion e.g. through the

    CPLUS_INCLUDE_PATH environment variable

    #15
    Posted 11/27/2011 05:07 AM   
      1 / 2    
    Scroll To Top