Hi all,
I built ocelot using revision 2235, LLVM using revision 183385 and CUDA 5.5.
My GPU is using a GF100 Fermi, therefore I compile using -arch=sm_20;
The following code is used to test ocelot:
#include <cuda.h>
#include <cuda_runtime.h>
__global__ void someKernel(char* buffer)
{
volatile int idx = blockIdx.x*blockDim.x + threadIdx.x;
buffer[idx] = 10;
}
int main(int argc, char* argv[])
{
char buffer[10];
someKernel<<<2, 5>>>(buffer);
cudaDeviceSynchronize();
}
$ /usr/local/cuda-5.5/bin/nvcc -O0 -c
main.cu -arch=sm_20
$ /usr/local/cuda-5.5/bin/nvcc -O0 main.o -o main -L/usr/local/cuda-5.5/lib64 -locelot
The following exception occurs during execution:
$ ./main
terminate called after throwing an instance of 'parser::PTXParser::Exception'
what():
Failed to parse file '
main.cu':
2
3
4
5
6
7 .version 3.2
8 .target sm_20
9 .address_size 64
10
11 .file 1 "/hlohse/ocelot.test/
main.cu", 1414148380, 295
12
13 .visible .entry _Z10someKernelPc(
14 .param .u64 _Z10someKernelPc_param_0
15 )
16 {
17 .local .align 4 .b8 __local_depot0[4];
18 .reg .b64 %SP;
19 .reg .b64 %SPL;
20 .reg .s16 %rs<2>;
21 .reg .s32 %r<5>;
22
main.cu (11, 41): syntax error, unexpected ','
Aborted (core dumped)
Could someone help me with this problem? Is the PTX output bugged, or how can I fix nvcc's PTX output? Many thanks in advance.
Best Regards,
Henning Lohse