problem to compile and execute with CUDA 4.1
Hi,
I tried since Monday to install CUDA so I followed the NVIDIA documentation in the [url="http://developer.nvidia.com/cuda-downloads"]NVIDIA website[/url].
I wanted to compile a simple cuda code I created which, for an array T of integers T(i) = i, make T(i)++ on GPU. I had an error when compiling with the toolkit for ubuntu 11.04 so I install the toolkit for ubuntu 10.04 and it compiles but it returns an array containing only zeros. This code was working on an older machine last year.

Then I tried codes of the SDK, particularly these ones :
[b]/usr/local/cuda4.1/extras/CUPTI/sample/callback_metric/callback_metric.cu[/b]
[i]and[/i]
[b]/usr/local/cuda4.1/extras/CUPTI/sample/activity_trace/vec.cu[/b]

Using a make to run the Makefile, I obtain the following errors :

[b]For the first one (/usr/local/cuda4.1/extras/CUPTI/sample/callback_metric/callback_metric.cu) :
[/b]

nvcc -c -I../../include callback_metric.cu
../../include/generated_cuda_runtime_api_meta.h(41): error: identifier "cudaIpcEventHandle_t" is undefined
../../include/generated_cuda_runtime_api_meta.h(47): error: identifier "cudaIpcEventHandle_t" is undefined
../../include/generated_cuda_runtime_api_meta.h(51): error: identifier "cudaIpcMemHandle_t" is undefined
../../include/generated_cuda_runtime_api_meta.h(57): error: identifier "cudaIpcMemHandle_t" is undefined
../../include/generated_cuda_meta.h(238): error: identifier "CUipcEventHandle" is undefined
../../include/generated_cuda_meta.h(244): error: identifier "CUipcEventHandle" is undefined
../../include/generated_cuda_meta.h(248): error: identifier "CUipcMemHandle" is undefined
../../include/generated_cuda_meta.h(254): error: identifier "CUipcMemHandle" is undefined
../../include/generated_cuda_gl_interop_meta.h(15): error: incomplete type is not allowed
../../include/generated_cudaGL_meta.h(41): error: identifier "CUGLDeviceList" is undefined
10 errors detected in the compilation of "/tmp/tmpxft_00002d5c_00000000-4_callback_metric.cpp1.ii".
make: *** [callback_metric.o] Error 2


[b]For the second one (/usr/local/cuda4.1/extras/CUPTI/sample/activity_trace/vec.cu) :
[/b]

nvcc -c -I../../include activity_trace.cpp
../../include/generated_cuda_runtime_api_meta.h:41: error: ISO C++ forbids declaration of 'cudaIpcEventHandle_t' with no type
../../include/generated_cuda_runtime_api_meta.h:41: error: expected ';' before '*' token
../../include/generated_cuda_runtime_api_meta.h:47: error: 'cudaIpcEventHandle_t' does not name a type
../../include/generated_cuda_runtime_api_meta.h:51: error: ISO C++ forbids declaration of 'cudaIpcMemHandle_t' with no type
../../include/generated_cuda_runtime_api_meta.h:51: error: expected ';' before '*' token
../../include/generated_cuda_runtime_api_meta.h:57: error: 'cudaIpcMemHandle_t' does not name a type
../../include/generated_cuda_meta.h:238: error: ISO C++ forbids declaration of 'CUipcEventHandle' with no type
../../include/generated_cuda_meta.h:238: error: expected ';' before '*' token
../../include/generated_cuda_meta.h:244: error: 'CUipcEventHandle' does not name a type
../../include/generated_cuda_meta.h:248: error: ISO C++ forbids declaration of 'CUipcMemHandle' with no type
../../include/generated_cuda_meta.h:248: error: expected ';' before '*' token
../../include/generated_cuda_meta.h:254: error: 'CUipcMemHandle' does not name a type
../../include/generated_cuda_gl_interop_meta.h:15: error: use of enum 'cudaGLDeviceList' without previous declaration
../../include/generated_cudaGL_meta.h:41: error: 'CUGLDeviceList' does not name a type
make: *** [activity_trace.o] Error 1


So, there is a problem in installation. I don't know what I have to do so that everything be okay. Can you help me please ?
Hi,

I tried since Monday to install CUDA so I followed the NVIDIA documentation in the NVIDIA website.

I wanted to compile a simple cuda code I created which, for an array T of integers T(i) = i, make T(i)++ on GPU. I had an error when compiling with the toolkit for ubuntu 11.04 so I install the toolkit for ubuntu 10.04 and it compiles but it returns an array containing only zeros. This code was working on an older machine last year.



Then I tried codes of the SDK, particularly these ones :

/usr/local/cuda4.1/extras/CUPTI/sample/callback_metric/callback_metric.cu

and

/usr/local/cuda4.1/extras/CUPTI/sample/activity_trace/vec.cu



Using a make to run the Makefile, I obtain the following errors :



For the first one (/usr/local/cuda4.1/extras/CUPTI/sample/callback_metric/callback_metric.cu) :





nvcc -c -I../../include callback_metric.cu

../../include/generated_cuda_runtime_api_meta.h(41): error: identifier "cudaIpcEventHandle_t" is undefined

../../include/generated_cuda_runtime_api_meta.h(47): error: identifier "cudaIpcEventHandle_t" is undefined

../../include/generated_cuda_runtime_api_meta.h(51): error: identifier "cudaIpcMemHandle_t" is undefined

../../include/generated_cuda_runtime_api_meta.h(57): error: identifier "cudaIpcMemHandle_t" is undefined

../../include/generated_cuda_meta.h(238): error: identifier "CUipcEventHandle" is undefined

../../include/generated_cuda_meta.h(244): error: identifier "CUipcEventHandle" is undefined

../../include/generated_cuda_meta.h(248): error: identifier "CUipcMemHandle" is undefined

../../include/generated_cuda_meta.h(254): error: identifier "CUipcMemHandle" is undefined

../../include/generated_cuda_gl_interop_meta.h(15): error: incomplete type is not allowed

../../include/generated_cudaGL_meta.h(41): error: identifier "CUGLDeviceList" is undefined

10 errors detected in the compilation of "/tmp/tmpxft_00002d5c_00000000-4_callback_metric.cpp1.ii".

make: *** [callback_metric.o] Error 2





For the second one (/usr/local/cuda4.1/extras/CUPTI/sample/activity_trace/vec.cu) :





nvcc -c -I../../include activity_trace.cpp

../../include/generated_cuda_runtime_api_meta.h:41: error: ISO C++ forbids declaration of 'cudaIpcEventHandle_t' with no type

../../include/generated_cuda_runtime_api_meta.h:41: error: expected ';' before '*' token

../../include/generated_cuda_runtime_api_meta.h:47: error: 'cudaIpcEventHandle_t' does not name a type

../../include/generated_cuda_runtime_api_meta.h:51: error: ISO C++ forbids declaration of 'cudaIpcMemHandle_t' with no type

../../include/generated_cuda_runtime_api_meta.h:51: error: expected ';' before '*' token

../../include/generated_cuda_runtime_api_meta.h:57: error: 'cudaIpcMemHandle_t' does not name a type

../../include/generated_cuda_meta.h:238: error: ISO C++ forbids declaration of 'CUipcEventHandle' with no type

../../include/generated_cuda_meta.h:238: error: expected ';' before '*' token

../../include/generated_cuda_meta.h:244: error: 'CUipcEventHandle' does not name a type

../../include/generated_cuda_meta.h:248: error: ISO C++ forbids declaration of 'CUipcMemHandle' with no type

../../include/generated_cuda_meta.h:248: error: expected ';' before '*' token

../../include/generated_cuda_meta.h:254: error: 'CUipcMemHandle' does not name a type

../../include/generated_cuda_gl_interop_meta.h:15: error: use of enum 'cudaGLDeviceList' without previous declaration

../../include/generated_cudaGL_meta.h:41: error: 'CUGLDeviceList' does not name a type

make: *** [activity_trace.o] Error 1





So, there is a problem in installation. I don't know what I have to do so that everything be okay. Can you help me please ?

#1
Posted 04/18/2012 02:19 PM   
Scroll To Top