[Rtk-users] CUFFT error

Simon Rit simon.rit at creatis.insa-lyon.fr
Tue Aug 4 10:43:28 EDT 2015


That's a very good question! I have no idea but let us know if you find
out...
Simon

On Tue, Aug 4, 2015 at 3:00 PM, ghostcz <ghostcz at hotmail.com> wrote:

> Hi
> If I use spacing =0.4623  , size=[800 2000 1000]
> ------------- Device memory usage ------------
> Total memory = 5368512512 bytes
> Free memory = 16805888 bytes
> Used memory = 5351706624 bytes
> Used memory = 99.687%
> ----------------------------------------------then it crashed.
>
> If I use spacing =0.462   , size=[800 2000 1000]
> ------------- Device memory usage ------------
> Total memory = 5368512512 bytes
> Free memory = 146837504 bytes
> Used memory = 5221675008 bytes
> Used memory = 97.2648%
> ----------------------------------------------didn’t crash, but a near
> miss.
>
> Yes, it looks like a memory problem. But why a small change in spacing
> will increase the memory consumption?
>
> Best regards,
> Louie
>
>
>
> *From:* Simon Rit <simon.rit at creatis.insa-lyon.fr>
> *Sent:* Tuesday, August 04, 2015 1:27 PM
> *To:* ghostcz <ghostcz at hotmail.com>
> *Cc:* rtk-users at public.kitware.com
> *Subject:* Re: [Rtk-users] CUFFT error
>
> Then I don't see what else could be the problem. If it's a GPU memory
> issue, you'll see it by adding the following command
>
> {
>
>     size_t free, used, total;
>     cudaMemGetInfo(&free, &total);
>     used = total - free;
>
>     std::cout << std::endl;
>     std::cout << "------------- Device memory usage ------------" <<
> std::endl;
>     std::cout << "Total memory = " << total << " bytes" << std::endl;
>     std::cout << "Free memory = " << free << " bytes" << std::endl;
>     std::cout << "Used memory = " << used << " bytes" << std::endl;
>     std::cout << "Used memory = " << (used * 100.0 / total) << "%" <<
> std::endl;
>     std::cout << "----------------------------------------------" <<
> std::endl;
>     std::cout << std::endl;
>   }
>
> before the crashing command. If the memory is the issue, then I'm not sure
> I understand why either, I quite agree with your comments. If it's not a
> memory issue, then I don't know what's the problem...
> Simon
>
> On Tue, Aug 4, 2015 at 1:05 PM, ghostcz <ghostcz at hotmail.com> wrote:
>
>> Thank you.
>> I kept the dimension to the same value. I think reducing the spacing will
>> need less rows in the projections, because the physical length will reduce
>> with the spacing.
>> Interestingly, it also works if I use 0.0462 instead of 0.04623 as
>> spacing.
>> Yes, I use –subsetsize=1 and –division=2 while –lowmem enabled. The
>> origin is always updated with –0.5*spacing*(size-1);
>>
>> Best regards,
>> Louie
>>
>> *From:* Simon Rit <simon.rit at creatis.insa-lyon.fr>
>> *Sent:* Tuesday, August 04, 2015 12:09 PM
>> *To:* ghostcz <ghostcz at hotmail.com>
>> *Cc:* rtk-users at public.kitware.com
>> *Subject:* Re: [Rtk-users] CUFFT error
>>
>> Hi,
>> From this page, you have
>>
>> CUFFT_ALLOC_FAILED   = 2,  //  cuFFT failed to allocate GPU or CPU memory
>>
>> This is not suprising that you have a GPU memory issue when decreasing
>> the spacing because a finer volume spacing might require  more rows of the
>> projections for the reconstruction and therefore you can end up with being
>> out of memory. Try processing one projection at a time with --subsetsize 1.
>> If it's still too large, you'll have to change your --dimension to process
>> a smaller volume in the y direction.
>> Simon
>>
>> On Tue, Aug 4, 2015 at 10:49 AM, ghostcz <ghostcz at hotmail.com> wrote:
>>
>>> Dear rtk users/developers,
>>>
>>> I was testing the rtkfdk.exe application.
>>> The program ran into an error and caught an exception saying:
>>>>>> itk::ExceptionObject (00000000002EEA60)
>>> Location: "unknown"
>>> File: C:/Users/liy/root/RTK/code/rtkCudaFFTRampImageFilter.cu
>>> Line: 97
>>> Description: itk::ERROR: CUFFT ERROR #2”
>>> To save you a trip to the documentation, Line: 97 is here:
>>>>>> if(fftDimension.z==1)
>>>     result = cufftPlan2d(&fftFwd, inputDimension.y, inputDimension.x,
>>> CUFFT_R2C);
>>>   else
>>>     result = cufftPlan3d(&fftFwd, inputDimension.z, inputDimension.y,
>>> inputDimension.x, CUFFT_R2C);
>>>   CUFFT_CHECK_ERROR(result);
>>>>>>
>>> This occurred when --spacing=0.04623, while the program works just fine
>>> if I use --spacing=0.05.
>>> Is there anyone can help me with this?
>>>
>>> Best regards,
>>> Louie
>>>
>>> _______________________________________________
>>> Rtk-users mailing list
>>> Rtk-users at public.kitware.com
>>> http://public.kitware.com/mailman/listinfo/rtk-users
>>>
>>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20150804/621c06e1/attachment-0010.html>


More information about the Rtk-users mailing list