I'm seeing the message of "invalid device symbol" when I run the cuda binary. There was no error during compilation it. The message is in below.
Cuda error in file 'euler3d.cu' in line 416 : invalid device symbol.
And the related source code is as following.
CUDA_SAFE_CALL( cudaMemcpyToSymbol(ff_variable, h_ff_variable, NVAR*sizeof(float)) );
Is there any fault from source code? Actually this code is from Rodinia v2.1, cfd benchmark program. I'm using cuda version 3.1 and did compile with following options.
nvcc -Xptxas -v -O3 --gpu-architecture=compute_13 --gpu-code=compute_13 euler3d.cu -o euler3d -I$(CUDA_SDK_PATH)/common/inc -L$(CUDA_SDK_PATH)/lib $(CUTIL_LIB)
The ff_variable related code is here.
#define NDIM 3
#define VAR_MOMENTUM 1
#define VAR_DENSITY_ENERGY (VAR_MOMENTUM+NDIM)
#define NVAR (VAR_DENSITY_ENERGY+1)
__constant__ float ff_variable[NVAR];
ff_variablefrom the source code, it may be possible to be more specific about what is going on. - Robert Crovella