Hello.
I got a warning message.
The message is
ptxas warning : Stack size for entry function '_Z14finding_blocksi16gpu_meta_handler21gpu_indicator_handlerPb' cannot be statically determined
I allocate to GPU memory and then check the allocation address in create() function.
(allocation address is printed in create() function)
but when I call the operation() function in a kernel, the allocation address is out of bounds.
(allocation address is not printed in operation() function)
unsigned long long int *gpu_bitarray is a global variable.
void create(size_t _num_nodes) {
printf("GPU bitvector create\n");
err = cudaMalloc(&gpu_bitarray, sizeof(unsigned long long int) * size_array);
if (err != cudaSuccess) {
fprintf(stderr, "Failed to allocate gpu_bitarray (error code %s)!\n", cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
err = cudaMemset(gpu_bitarray, 0, sizeof(unsigned long long int) * size_array);
if (err != cudaSuccess) {
fprintf(stderr, "Failed to set gpu_bitarray to 0 (error code %s)!\n", cudaGetErrorString(err));
exit(EXIT_FAILURE);
}
printf("gpu_bitarray: %p\n", gpu_bitarray);
}
printed gpu_bitarray address
__global__ void setting_startnode (unsigned long long int startnode, gpu_bitattribute_handler * visit_attribute) {
int tid = threadIdx.x + blockIdx.x * blockDim.x;
if (tid == 0) {
visit_attribute->operation(startnode);
}
}
__device__ bool operation(unsigned long long int nodenumber) {
printf("operation\n");
printf("gpu_bitarray: %p\n", gpu_bitarray);
}
no printed gpu_bitarray address
so I think “ptxas warning” got a problem.
it means create() function has gpu_bitarray address, but throw away after create() function.