Hello,
I am trying to compile a code that has a malloc function inside the kernel
and i get this error:
Error 5 error : calling a host function("malloc") from a __device__/__global__ function("bitapS") is not allowed C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\src\str_bit\main.cu 36 1 str_bit
My command line is:
Error 6 error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version 2010 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64" -I"../../common/inc" -I"../../../shared/inc" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include" -G0 --keep-dir "x64\Debug" -maxrregcount=0 --machine 64 --compile -D_NEXUS_DEBUG -g -Xcompiler "/EHsc /nologo /Od /Zi /MTd " -o "x64/Debug/main.cu.obj" "C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\src\str_bit\main.cu"" exited with code 2. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.0.targets 357 10 str_bit
Any suggestions? I thought that with sm_20 enabled you could allocate… my card is a 460 GTX
Thanks!