Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid device symbol error on CUDA 5.0 #1

Open
georgezhlw opened this issue Apr 10, 2013 · 6 comments
Open

invalid device symbol error on CUDA 5.0 #1

georgezhlw opened this issue Apr 10, 2013 · 6 comments

Comments

@georgezhlw
Copy link

Compile with CUDA 5.0, when run the example program, got error:
virginian-master/example]$ ./test
CUDA serial const memcpy 1 error: invalid device symbol :: vm/vm_gpu.cu line 123
Looks like cudaMemcpyToSymbol((char_)&vm, (char_)vm_,
sizeof(virg_vm), 0, cudaMemcpyHostToDevice);
need to be changed to
cudaMemcpyToSymbol(vm, (char*)vm_,
sizeof(virg_vm), 0, cudaMemcpyHostToDevice);
And vm need to be a pointer.

thanks,
Liwen (George) Zhang

@bakks
Copy link
Owner

bakks commented Apr 15, 2013

Hey George, I haven't tested with CUDA 5 yet so it appears that API changes are causing problems. If you've gotten this working a pull request would be great, I'm sure others would find it useful. I'll take a closer look as soon as I can.

@brianromoser
Copy link

My research group is working with the Virginian database and we have updated the applicable calls and directives to compile using CUDA 5. There are other changes in our fork besides the 5.0 update, but I believe it may be of use. https://github.com/sjolsen/virginian

@bakks
Copy link
Owner

bakks commented May 31, 2013

Thats awesome, let me know if you have questions about the code, some of it is more than a little messy. I would love to merge some of those changes in if you think they would be useful.

@kevinaangstadt
Copy link

I'm also getting this error when trying to build with CUDA 5.5. I tried updating these calls to match the new format, but the tests still bomb with an invalid device symbol error. Since I'm still very new to CUDA, I'm guessing that I'm still missing something obvious. @brianromoser, would you be willing to share some of your fixes? The url provided doesn't work anymore.

Thanks,
Kevin

@kevinaangstadt
Copy link

Never mind. My issue actually turned out to be that I have two graphics cards, and there is hard-coded device selection. After changing this to auto-select the correct card, I was able to compile and run using CUDA 5.5 without any errors or test failures.

@Elkoumy
Copy link

Elkoumy commented Apr 11, 2015

Hello @georgezhlw ,
I have this error CUDA mapped const memcpy error: invalid device symbol :: vm/vm_gpu.cu line 392
at the line
cudaMemcpyToSymbol(meta, res[0],
sizeof(virg_tablet_meta), 0, cudaMemcpyHostToDevice);
VIRG_CUDCHK("mapped const memcpy");
Could you help me find the solution.
Regards,
Jamal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants