bkainz / fetalReconstruction

GPU accelerated source code for motion compensation of multi-stack MRI data
57 stars 28 forks source link

cuda runtime error #4

Open renbem opened 8 years ago

renbem commented 8 years ago

Hi,

it took a while but now it is possible to build the package on our system. We had to do some changes in the file reconstruction_cuda2.cu to get rid of errors related to thrust. Attached there is the file containing the compilation with the error output and the corresponding changes we made to build the code successfully.

These changes were tested on the following systems:

1) System with

2) System with

The described error ocurred on both systems and could be resolved with the mentioned editings. However, during runtime it throws the error message screen shot 2015-11-27 at 16 09 54 on system 1. (System 2 can't be used in GPU mode anyway given its insufficient compute capability). Both systems work fine when run with the useCPU flag.

Do you know what can be done to get the GPU computation work? Given that I'm not experienced with cuda I'd be grateful for some hints where and what to look for.

Best, Michael

error.txt changes_in_reconstruction_cuda2_cu.txt

bkainz commented 8 years ago

Dear Michael,

this looks like you try to run compute capability 3.5 device code on a compute capability 5.0 device. Try to change the arch to sm_50. We are currently working on a new version, which shouldn't have these problems. However, it is not quite ready yet to be released.

best wishes, Bernhard

On 27/11/2015 16:30, Michael Ebner wrote:

Hi,

it took a while but now it is possible to build the package on our system. We had to do some changes in the file reconstruction_cuda2.cu to get rid of errors related to thrust. Attached there is the file containing the compilation with the error output and the corresponding changes we made to build the code successfully.

These changes were tested on the following systems:

1) System with

  • x86_64 CPU
  • Ubuntu 14.04.3 LTS
  • Nvidia GeForce GTX 980 Ti
  • Cuda 7.5

2) System with

  • x86_64 CPU
  • elementary OS Freya (based on Ubuntu 14.04)
  • Nvidia Quadro K4000 (Compute Capability = 3)
  • Cuda 7.0

The described error ocurred on both systems and could be resolved with the mentioned editings. However, during runtime it throws the error message screen shot 2015-11-27 at 16 09 54 https://cloud.githubusercontent.com/assets/11680758/11445101/596a2bd2-9521-11e5-9327-6c30fc50f4ea.png on system 1. (System 2 can't be used in GPU mode anyway given its insufficient compute capability). Both systems work fine when run with the useCPU flag.

Do you know what can be done to get the GPU computation work? Given that I'm not experienced with cuda I'd be grateful for some hints where and what to look for.

Best, Michael

error.txt https://github.com/bkainz/fetalReconstruction/files/45923/error.txt changes_in_reconstruction_cuda2_cu.txt https://github.com/bkainz/fetalReconstruction/files/45922/changes_in_reconstruction_cuda2_cu.txt

— Reply to this email directly or view it on GitHub https://github.com/bkainz/fetalReconstruction/issues/4.

Dr. Bernhard Kainz Department of Computing Imperial College London 180 Queens' Gate London SW7 2AZ mailto:B.Kainz@imperial.ac.uk

renbem commented 8 years ago

Thanks for the quick reply!

I changed the line in the source/reconstructionGPU2/CMakeLists.txt to

set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_35,code=sm_35;-use_fast_math;")

Now I get a different error at a later stage: Iteration 0. CUDA error at /home/mebner/Development/IRTK_BKainz/fetalReconstruction/source/reconstructionGPU2/reconstruction_cuda2.cu:2437 code=77(cudaErrorIllegalAddress) "cudaDeviceSynchronize()"

Best, Michael

bkainz commented 8 years ago

Hi,

perhaps you have two devices in your rack, one for display and one for computing? Try to specify the device with -d

best wishes, Bernhard

Am 27.11.2015 um 17:19 schrieb Michael Ebner:

Thanks for the quick reply!

I changed the line in the source/reconstructionGPU2/CMakeLists.txt to

set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_35,code=sm_35;-use_fast_math;")

Now I get a different error at a later stage: Iteration 0. CUDA error at /home/mebner/Development/IRTK_BKainz/fetalReconstruction/source/reconstructionGPU2/reconstruction_cuda2.cu:2437 code=77(cudaErrorIllegalAddress) "cudaDeviceSynchronize()"

Best, Michael

— Reply to this email directly or view it on GitHub https://github.com/bkainz/fetalReconstruction/issues/4#issuecomment-160178630.

Department of Computing Imperial College London 180 Queens' Gate London SW7 2AZ mailto:B.Kainz@imperial.ac.uk