Variable is not live at this point in cuda-gdb

Hi,

i would like to ask, what does the

“warning: Variable is not live at this point. Returning garbage value.” message means? I suppose that if i am debugging a kernel it has to be “live” at any point. Here i did few steps, the code doesn’t change the varriable “np” which is a pointer to a struct, but suddenly it changes when there is no code where it could possibly change. Why is this happening? (i’m using cuda 3.0 beta)

(cuda-gdb) step

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

nets_depth_propagate <<<gridDim=(1,1), blockDim=(1,12,1)>>> (level=1) at gpu.cu:115

115		 me=(blockIdx.y*gridDim.x+blockIdx.x) * (blockDim.x*blockDim.y)+ threadIdx.y*blockDim.x + threadIdx.x;

(cuda-gdb) print *np

warning: Variable is not live at this point. Returning garbage value.

Cannot access memory at address 0x4000000000

(cuda-gdb) print me

warning: Variable is not live at this point. Returning garbage value.

$7 = 0

(cuda-gdb) step

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

nets_depth_propagate <<<gridDim=(1,1), blockDim=(1,12,1)>>> (level=1) at gpu.cu:116

116		 if (me<np->inlinks[blockDim.x].num_entries) {

(cuda-gdb) print *np

warning: Variable is not live at this point. Returning garbage value.

$8 = {nodes_total = 3221225471, links_total = 4261412863, nets_total = 4261330429, num_inputs = 63475, 

  num_outputs = 65535, min_weight = -1.99999988, links_max = 4294827901, nodes_max = 4294965229, 

  net_creation_result = 253 '�', deepest_level = 4290641918, 

  data_base_addr = 0xfff9df6b7f7dffff <Address 0xfff9df6b7f7dffff out of bounds>, data_len = 18428729674663165935, 

  lweights = 0xe7ff7fdffffcb5ff, srcs = 0xebdcffdfffffff7f, net_ids = 0xfffffffffffbdff3, 

  dsts = 0xfffef6ffffc7f7fe, nvalues = 0xdedde7fffeff2ffb, nmirror = 0xe7b5fffbfefdf5dd, 

  nfuncs = 0xdfffff7ffffeffbf <Address 0xdfffff7ffffeffbf out of bounds>, nets_table = 0xffffedff5f1fffdf, 

  inlinks = 0x7f7ffbff7ffffdff, depth_status = 0xffffee5f5cfdfdff <Address 0xffffee5f5cfdfdff out of bounds>, 

  depth_levels = 0xfbf6f7dfffdfefff, inputs = 0xffe7dfffffffffff, outputs = 0xfd77bbcfdfe87fff}

(cuda-gdb) print np

warning: Variable is not live at this point. Returning garbage value.

$9 = (@global net_pack_t * @register) 0xc0001

(cuda-gdb) step

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

nets_depth_propagate <<<gridDim=(1,1), blockDim=(1,12,1)>>> (level=1) at gpu.cu:117

117			 srcs_base=np->inlinks[blockDim.x].srcnums_start_idx;

(cuda-gdb) print *np

warning: Variable is not live at this point. Returning garbage value.

$10 = {nodes_total = 80, links_total = 60, nets_total = 4, num_inputs = 2, num_outputs = 1, 

  min_weight = 0.109999999, links_max = 2869360, nodes_max = 0, net_creation_result = 0 '

(cuda-gdb) step

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

nets_depth_propagate <<<gridDim=(1,1), blockDim=(1,12,1)>>> (level=1) at gpu.cu:115

115 me=(blockIdx.ygridDim.x+blockIdx.x) * (blockDim.xblockDim.y)+ threadIdx.y*blockDim.x + threadIdx.x;

(cuda-gdb) print *np

warning: Variable is not live at this point. Returning garbage value.

Cannot access memory at address 0x4000000000

(cuda-gdb) print me

warning: Variable is not live at this point. Returning garbage value.

$7 = 0

(cuda-gdb) step

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

nets_depth_propagate <<<gridDim=(1,1), blockDim=(1,12,1)>>> (level=1) at gpu.cu:116

116 if (meinlinks[blockDim.x].num_entries) {

(cuda-gdb) print *np

warning: Variable is not live at this point. Returning garbage value.

$8 = {nodes_total = 3221225471, links_total = 4261412863, nets_total = 4261330429, num_inputs = 63475,

num_outputs = 65535, min_weight = -1.99999988, links_max = 4294827901, nodes_max = 4294965229,

net_creation_result = 253 ‘�’, deepest_level = 4290641918,

data_base_addr = 0xfff9df6b7f7dffff <Address 0xfff9df6b7f7dffff out of bounds>, data_len = 18428729674663165935,

lweights = 0xe7ff7fdffffcb5ff, srcs = 0xebdcffdfffffff7f, net_ids = 0xfffffffffffbdff3,

dsts = 0xfffef6ffffc7f7fe, nvalues = 0xdedde7fffeff2ffb, nmirror = 0xe7b5fffbfefdf5dd,

nfuncs = 0xdfffff7ffffeffbf <Address 0xdfffff7ffffeffbf out of bounds>, nets_table = 0xffffedff5f1fffdf,

inlinks = 0x7f7ffbff7ffffdff, depth_status = 0xffffee5f5cfdfdff <Address 0xffffee5f5cfdfdff out of bounds>,

depth_levels = 0xfbf6f7dfffdfefff, inputs = 0xffe7dfffffffffff, outputs = 0xfd77bbcfdfe87fff}

(cuda-gdb) print np

warning: Variable is not live at this point. Returning garbage value.

$9 = (@global net_pack_t * @register) 0xc0001

(cuda-gdb) step

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

nets_depth_propagate <<<gridDim=(1,1), blockDim=(1,12,1)>>> (level=1) at gpu.cu:117

117 srcs_base=np->inlinks[blockDim.x].srcnums_start_idx;

(cuda-gdb) print *np

warning: Variable is not live at this point. Returning garbage value.

$10 = {nodes_total = 80, links_total = 60, nets_total = 4, num_inputs = 2, num_outputs = 1,

min_weight = 0.109999999, links_max = 2869360, nodes_max = 0, net_creation_result = 0 ’

(cuda-gdb) step

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

nets_depth_propagate <<<gridDim=(1,1), blockDim=(1,12,1)>>> (level=1) at gpu.cu:115

115		 me=(blockIdx.y*gridDim.x+blockIdx.x) * (blockDim.x*blockDim.y)+ threadIdx.y*blockDim.x + threadIdx.x;

(cuda-gdb) print *np

warning: Variable is not live at this point. Returning garbage value.

Cannot access memory at address 0x4000000000

(cuda-gdb) print me

warning: Variable is not live at this point. Returning garbage value.

$7 = 0

(cuda-gdb) step

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

nets_depth_propagate <<<gridDim=(1,1), blockDim=(1,12,1)>>> (level=1) at gpu.cu:116

116		 if (me<np->inlinks[blockDim.x].num_entries) {

(cuda-gdb) print *np

warning: Variable is not live at this point. Returning garbage value.

$8 = {nodes_total = 3221225471, links_total = 4261412863, nets_total = 4261330429, num_inputs = 63475, 

  num_outputs = 65535, min_weight = -1.99999988, links_max = 4294827901, nodes_max = 4294965229, 

  net_creation_result = 253 '�', deepest_level = 4290641918, 

  data_base_addr = 0xfff9df6b7f7dffff <Address 0xfff9df6b7f7dffff out of bounds>, data_len = 18428729674663165935, 

  lweights = 0xe7ff7fdffffcb5ff, srcs = 0xebdcffdfffffff7f, net_ids = 0xfffffffffffbdff3, 

  dsts = 0xfffef6ffffc7f7fe, nvalues = 0xdedde7fffeff2ffb, nmirror = 0xe7b5fffbfefdf5dd, 

  nfuncs = 0xdfffff7ffffeffbf <Address 0xdfffff7ffffeffbf out of bounds>, nets_table = 0xffffedff5f1fffdf, 

  inlinks = 0x7f7ffbff7ffffdff, depth_status = 0xffffee5f5cfdfdff <Address 0xffffee5f5cfdfdff out of bounds>, 

  depth_levels = 0xfbf6f7dfffdfefff, inputs = 0xffe7dfffffffffff, outputs = 0xfd77bbcfdfe87fff}

(cuda-gdb) print np

warning: Variable is not live at this point. Returning garbage value.

$9 = (@global net_pack_t * @register) 0xc0001

(cuda-gdb) step

[Current CUDA Thread <<<(0,0),(0,0,0)>>>]

nets_depth_propagate <<<gridDim=(1,1), blockDim=(1,12,1)>>> (level=1) at gpu.cu:117

117			 srcs_base=np->inlinks[blockDim.x].srcnums_start_idx;

(cuda-gdb) print *np

warning: Variable is not live at this point. Returning garbage value.

$10 = {nodes_total = 80, links_total = 60, nets_total = 4, num_inputs = 2, num_outputs = 1, 

  min_weight = 0.109999999, links_max = 2869360, nodes_max = 0, net_creation_result = 0 '\0', deepest_level = 0, 

  data_base_addr = 0xa12f88 <Address 0xa12f88 out of bounds>, data_len = 0, lweights = 0xa12f88, srcs = 0x1505148, 

  net_ids = 0x1a7e228, dsts = 0x1ff7308, nvalues = 0x25703e8, nmirror = 0x2688748, nfuncs = 0x27a0af0 "", 

  nets_table = 0x27a0aa8, inlinks = 0x27e1548, depth_status = 0x27e15f8 "weights2netjj", depth_levels = 0x27e4114, 

  inputs = 0x27eed84, outputs = 0x27eed8c}

(cuda-gdb)

', deepest_level = 0,

data_base_addr = 0xa12f88 <Address 0xa12f88 out of bounds>, data_len = 0, lweights = 0xa12f88, srcs = 0x1505148,

net_ids = 0x1a7e228, dsts = 0x1ff7308, nvalues = 0x25703e8, nmirror = 0x2688748, nfuncs = 0x27a0af0 “”,

nets_table = 0x27a0aa8, inlinks = 0x27e1548, depth_status = 0x27e15f8 “weights2netjj”, depth_levels = 0x27e4114,

inputs = 0x27eed84, outputs = 0x27eed8c}

(cuda-gdb)

', deepest_level = 0, 

  data_base_addr = 0xa12f88 <Address 0xa12f88 out of bounds>, data_len = 0, lweights = 0xa12f88, srcs = 0x1505148, 

  net_ids = 0x1a7e228, dsts = 0x1ff7308, nvalues = 0x25703e8, nmirror = 0x2688748, nfuncs = 0x27a0af0 "", 

  nets_table = 0x27a0aa8, inlinks = 0x27e1548, depth_status = 0x27e15f8 "weights2netjj", depth_levels = 0x27e4114, 

  inputs = 0x27eed84, outputs = 0x27eed8c}

(cuda-gdb)

I have a similar problem, but with CUDA 3.0 final…

I have a similar problem, but with CUDA 3.0 final…

And still with CUDA 3.1 :( the variable should be in scope of the line…

Here is what it looks in gdb.

(cuda-gdb) info line

Line 94 of..

(cuda-gdb) info line

87			lambda = dotP(Cfx - ax, Cfy - ay, Sx, Sy)

88				   / dotP(bx - ax, by - ay, Sx, Sy);

89			

90			

91			// Debug check lambdas

92			// validation_data[i+20] = lambda;

93			// ---

94			

95			if (lambda <= 1 && lambda >= 0) {

(cuda-gdb) p Cfx

warning: Variable is not live at this point. Returning garbage value.

$8 = -nan(0x7fffff)

Cfx has been defined outside the loop in which line 95 is. Device has compute capability 1.3.

And still with CUDA 3.1 :( the variable should be in scope of the line…

Here is what it looks in gdb.

(cuda-gdb) info line

Line 94 of..

(cuda-gdb) info line

87			lambda = dotP(Cfx - ax, Cfy - ay, Sx, Sy)

88				   / dotP(bx - ax, by - ay, Sx, Sy);

89			

90			

91			// Debug check lambdas

92			// validation_data[i+20] = lambda;

93			// ---

94			

95			if (lambda <= 1 && lambda >= 0) {

(cuda-gdb) p Cfx

warning: Variable is not live at this point. Returning garbage value.

$8 = -nan(0x7fffff)

Cfx has been defined outside the loop in which line 95 is. Device has compute capability 1.3.

How to fix this problem now with cuda 4.0.

How to fix this problem now with cuda 4.0.

Possible that the compiler optimized it out… Try compiling with optimization disabled (Something like /OD for VC++ - CHeck NVCC manual)

Possible that the compiler optimized it out… Try compiling with optimization disabled (Something like /OD for VC++ - CHeck NVCC manual)

Thank you! But I have checked nvcc manual. I have not found the option. Would you please tell me?

Thank you! But I have checked nvcc manual. I have not found the option. Would you please tell me?

[font=“Courier New”]-G0[/font]

[font=“Courier New”]-G0[/font]