martijnpieters / mcgpu

Automatically exported from code.google.com/p/mcgpu
1 stars 0 forks source link

Example code does not run #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile MC-GPU v.1.3.x on my operating system (see below)
2. Run the simple 6-voxel sample simulation
3. Watch program exit with CUDA error 13 during device initialization

What is the expected output? What do you see instead?
Expected output is the simple image of six squares in given for the 6-voxel 
sample simulation.  

What version of the product are you using? On what operating system?
I'm using MC-GPU version 1.3 on Ubuntu 13.10 with Cuda 5.5.  My graphics card 
is an NVIDIA Quadro FX3700.  The drivers and CUDA libraries seem to be 
correctly installed (they can compile and run other CUDA programs correctly.)

Please provide any additional information below.
I've tracked the error down to the line 
checkCudaErrors(cudaMemcpyToSymbol(voxel_data_CONST,     voxel_data,     
sizeof(struct voxel_struct))); and similar function calls in the file 
MC-GPU_v1.3.cu around line 2555.  The problem seems to be that the input 
arguments are of the wrong type, but I don't know how to fix this.  CUDA 
documentation suggests the input arguments have changed type since CUDA 4.1, 
but I have been unable to figure out how to modify the code to make it work.

Original issue reported on code.google.com by erica.ch...@gmail.com on 1 Apr 2014 at 8:44

GoogleCodeExporter commented 8 years ago
Hi Erica,

I have not yet tested MC-GPU in CUDA 5.5. It works well in CUDA 5.0.
It is possible that they changed the parameters needed for the constant memory 
allocation, the same problem appeared in the upgrade from CUDA 4.0.

You could look at the SDK examples to see how is the constant memory allocated.
I will possibly port the code within the following couple of weeks.

You could try first the code with CUDA 5.0 (you can install both versions in 
the same computer). Of course make sure you have enough constant memory in the 
GPU, but this is probably true.

I will upload the updated code when I have it ready, and close the Issue then 
(so you will be notified of the change).

Thanks for the notice. I hope it is easy to fix.

    Andreu

Original comment by andre...@gmail.com on 1 Apr 2014 at 11:32

GoogleCodeExporter commented 8 years ago
Thanks, Andreu.  I will try CUDA 5.0 and will also be on the lookout for the 
updated code.

Erica

Original comment by erica.ch...@gmail.com on 2 Apr 2014 at 6:00

GoogleCodeExporter commented 8 years ago
I have downloaded CUDA 5.0 and it seems to be working (the sample programs 
run.)  I can compile mc-gpu, but when I run it, it exits halfway through with 
the following error: CUDA error: Kernel execution failed while simulating 
particle tracks!!: (8) invalid device function. The error is occurring at line 
893 in MC-GPU-_v1.3.cu.  Some searching on the internet reveals that this error 
may indicate that I do not have the correct hardware to run mc-gpu.  Is this 
the case?  Regardless, please let me know if you have other ideas of things I 
can try.  

Thanks,
Erica

Original comment by erica.ch...@gmail.com on 4 Apr 2014 at 6:49

GoogleCodeExporter commented 8 years ago
The program should work well on any modern, high-end GPU from NVIDIA but I am 
afraid your Quadro FX3700 might be a little old. One of the atomic operations 
might not be supported. If you compile the code specifically for the compute 
capability of your card you might get an error message pointing to the function 
giving the trouble.

But I would recommend upgrading the card of course.

Original comment by andre...@gmail.com on 7 Apr 2014 at 9:27