Problem Memory allocation in GPU

Hello everybody,

i’m working on CUDA 2.3 on Asus EN9800GT GPU card, my OS is XP 32 bits.
i want to process an array of 1000*100 of unsigned char on the GPU card, but i can’t allocate all the data in only one time, i don’t receive errors from the card but the process don’t work properly and i obtain wrong results.
the limit of the allocation that gives right results is 15000 values.

have you any idea for this problem, it’s very important to me.

Thank you.

Hi,

I think it’s not a memory problem because 15000 unsigned char means 15 mb (1 unsigned char is one byte) and there’s at least 128 mb of memory on graphic cards now.

Your problem 1000*100 bytes = 100mb still good.

The issue must stay somewhere else.

Hi,

I think it’s not a memory problem because 15000 unsigned char means 15 mb (1 unsigned char is one byte) and there’s at least 128 mb of memory on graphic cards now.

Your problem 1000*100 bytes = 100mb still good.

The issue must stay somewhere else.

Have you resolved your problem, migal?

I have similar problem. I had working program, but it don’t work properly now. I try to copy data to GPU memory and than read it back. Only 25 numbers (float) are right.

Have you resolved your problem, migal?

I have similar problem. I had working program, but it don’t work properly now. I try to copy data to GPU memory and than read it back. Only 25 numbers (float) are right.

I’ve found my stupid mistake

was:

cudaMemcpy(chk_tmp, cu_u, chk_tmp_size, cudaMemcpyDeviceToHost)

now:

cudaMemcpy(chk_tmp, cu_u, chk_tmp_size * sizeof(float), cudaMemcpyDeviceToHost)

I’ve found my stupid mistake

was:

cudaMemcpy(chk_tmp, cu_u, chk_tmp_size, cudaMemcpyDeviceToHost)

now:

cudaMemcpy(chk_tmp, cu_u, chk_tmp_size * sizeof(float), cudaMemcpyDeviceToHost)