NVIDIA / NVIDIA/cccl

error: cudaErrorIllegalAddress: an illegal memory access was encountered

Open
#815 3 comments 0 reactions 1 assignee Assigned to @jrhemstad View on GitHub
thrust
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

I need to copy the values of thrust device vector PusiTidal_d to another vector Pusi in a class member function void VS::RestoreOmegaPusi(). It works well if I use the naive " for loop", but if I use the thrust::copy command, it fed back the errors about:

`terminate called after throwing an instance of 'thrust::system::detail::bad_alloc'
what(): std::bad_alloc: cudaErrorIllegalAddress: an illegal memory access was encountered
Caught signal 6 - SIGABRT (abort)
`
Could you please help me out? What has happen to the copy function? Since the naive "for loop " worked well, the memory should be exactly there.
The following is the class member function, both the Pusi and PusiTidal_d were declared as the private members.

`void VS::RestoreOmegaPusi() {
// for(int i=0;i

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.