Got invalid data type 363 PTXParserException

13 views
Skip to first unread message

shehanaz mahammed

unread,
Sep 3, 2015, 12:22:42 PM9/3/15
to gpuocelot
I have installed GPUOcelot in ubuntu 12.04 32 bit system using the deb file available in https://code.google.com/p/gpuocelot/downloads/detail?name=ocelot_2.1.1272_i386.deb&can=2&q= . I am using cudatoolkit 4.2  and gcc 4.6.I get invalid data type error while running the below code .

#include "stdio.h"
__global__ void add(int a, int b, int *c)
{
*c = a + b;
}
int main()
{
int a,b,c;
int *dev_c;
a=3;
b=4;
cudaMalloc((void**)&dev_c, sizeof(int));
add<<<1,1>>>(a,b,dev_c);
cudaMemcpy(&c, dev_c, sizeof(int), cudaMemcpyDeviceToHost);
printf("%d + %d is %d\n", a, b, c);
cudaFree(dev_c);
return 0;
}


while running l2.cu using following commands we get the following errors:

user1@project-System-Product-
Name:~$ nvcc -c l2.cu -arch=sm_20
user1@project-System-Product-Name:~$ g++ -o l2 l2.o `OcelotConfig -l`
user1@project-System-Product-Name:~$ ./l2


terminate called after throwing an instance of 'parser::PTXParser::Exception'
  what(): 
Failed to parse file 'l2.cu':
1
2
3
4
5
6
7 .version 3.0
8 .target sm_20
9 .address_size 32
10
11 .file    1 "/tmp/tmpxft_00001157_00000000-7_l2.cpp3.i"
12 .file    2 "l2.cu"
13
14 .entry _Z3addiiPi(
15 .param .u32 _Z3addiiPi_param_0,
16 .param .u32 _Z3addiiPi_param_1,
17 .param .u32 _Z3addiiPi_param_2
18 )
19 {
20 .reg .s32 %r<6>;
21
22
23 ld.param.u32 %r1, [_Z3addiiPi_param_0];
24 ld.param.u32 %r2, [_Z3addiiPi_param_1];
25 ld.param.u32 %r3, [_Z3addiiPi_param_2];
26 cvta.to.global.u32 %r4, %r3;
27 .loc 2 4 1
28 add.s32 %r5, %r2, %r1;
29 st.global.u32 [%r4], %r5;
30 .loc 2 5 2
31 ret;
32 }
33
34
35
Got invalid data type 363
Aborted (core dumped)
user1@project-System-Product-Name










shehanaz mahammed

unread,
Sep 8, 2015, 12:41:47 AM9/8/15
to gpuocelot
It worked when i installed Gpu ocelot from svn .May be the deb file was not compatible with ubuntu 12.04

Si Li

unread,
Sep 9, 2015, 10:21:03 AM9/9/15
to gpuocelot
Can you get any applications to run with ocelot? If not, I would recommend building from source.
Reply all
Reply to author
Forward
0 new messages