koide3 / fast_gicp

A collection of GICP-based fast point cloud registration algorithms
BSD 3-Clause "New" or "Revised" License
1.28k stars 319 forks source link

thrust::system::system_error after align call in FAST_VGICP_CUDA #91

Open KennyRotella opened 2 years ago

KennyRotella commented 2 years ago

My system info:

Ubuntu 18.0.4 (5.4.0-109-generic) ROS melodic NVIDIA GTX 950M (Compute capability (version) 5.0) Maxwell Cuda 11.1.74 gcc 7.5.0 cmake version 3.10.2 ros-melodic-pcl-ros 1.7.4 eigen 3.3.4


Hello, I'm trying to perform scan matching in hdl_graph_slam using CUDA, but right after the first call of void pcl::Registration<pcl::PointXYZI, pcl::PointXYZI>::align(pcl::PointCloud<pcl::PointXYZI> &output, const Eigen::Matrix4f &guess) I get this error:

terminate called after throwing an instance of 'thrust::system::system_error'
  what():  after reduction step 1: cudaErrorInvalidDeviceFunction: invalid device function

Any hint to get some insight about this?

Gatsby23 commented 2 years ago

My system info:

Ubuntu 18.0.4 (5.4.0-109-generic) ROS melodic NVIDIA GTX 950M (Compute capability (version) 5.0) Maxwell Cuda 11.1.74 gcc 7.5.0 cmake version 3.10.2 ros-melodic-pcl-ros 1.7.4 eigen 3.3.4

Hello, I'm trying to perform scan matching in hdl_graph_slam using CUDA, but right after the first call of void pcl::Registration<pcl::PointXYZI, pcl::PointXYZI>::align(pcl::PointCloud<pcl::PointXYZI> &output, const Eigen::Matrix4f &guess) I get this error:

terminate called after throwing an instance of 'thrust::system::system_error'
  what():  after reduction step 1: cudaErrorInvalidDeviceFunction: invalid device function

Any hint to get some insight about this?

Sorry, I met the same problem as you. How to solve it, could you please help me with a more clearly command?

KennyRotella commented 2 years ago

hi @Gatsby23 I solved changing the nvcc compiler flag in CMakeLists.txt, I opened a pullrequest for this https://github.com/SMRT-AIST/fast_gicp/pull/92

Gatsby23 commented 2 years ago

hi @Gatsby23 I solved changing the nvcc compiler flag in CMakeLists.txt, I opened a pullrequest for this #92

I changed like this. But I get this problem: ''' nvcc fatal : Value 'native' is not defined for option 'gpu-architecture' ''' I don't know what's wrong with it

KennyRotella commented 2 years ago

that's strange, what's your cuda version? try nvcc --version maybe this option does not apply to all cuda versions, mine now is 11.6.2, I updated it

KennyRotella commented 2 years ago

anyway what you should do, probably, is to tell your gpu computing capabilities to nvcc using some options before compiling. I used this to find the command https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#options-for-steering-gpu-code-generation-gpu-architecture

Gatsby23 commented 2 years ago

that's strange, what's your cuda version? try nvcc --version maybe this option does not apply to all cuda versions, mine now is 11.6.2, I updated it

Sorry for that, my cuda is 11.2.

KennyRotella commented 2 years ago

that's strange, what's your cuda version? try nvcc --version maybe this option does not apply to all cuda versions, mine now is 11.6.2, I updated it

Sorry for that, my cuda is 11.2.

-gencode=arch=compute_xx,code=sm_xx where xx is your gpu compute capability in my case i have 5.0 and xx => 50

NirvanaDragon commented 8 months ago

that's strange, what's your cuda version? try nvcc --version maybe this option does not apply to all cuda versions, mine now is 11.6.2, I updated it

Sorry for that, my cuda is 11.2.

-gencode=arch=compute_xx,code=sm_xx where xx is your gpu compute capability in my case i have 5.0 and xx => 50

hello,I add "-gencode=arch=compute_xx,code=sm_xx" to CUDA_NVCC_FLAGS,but still meet this problem terminate called after throwing an instance of 'thrust::system::system_error' what(): for_each: failed to synchronize: cudaErrorIllegalAddress: an illegal memory access was encountered Aborted (core dumped) could you have other solutions, thanks