Re: ROOT crashes when writing a large TVectorF object

From: Fons Rademakers <Fons.Rademakers_at_cern.ch>
Date: Tue, 07 Jun 2005 04:41:43 +0200


Note that a single I/O operation via TObject::Write() can write only an object of 1GB (30 bits), which is currently a limit in TBuffer.

Cheers, Fons.

Alexandr Malusek wrote:
> Hi Edmond,
>
>

>>The vector length is an "Int_t" and
>>
>>root [0] return TMath::Power(2,31)
>>(Double_t)2.14748364800000000e+09
>>root [1] return 512*512*1273
>>(const int)333709312
>>
>>So your request is way beyond the maximum integer .

>
>
> No, it is not. To allocate 512*512*1273 Float_t numbers (4 B) you
> need 4*512*512*1273 B = (2*512)*(2*512)*1273 B = 1273 MiB. ROOT can
> handle it on a machine with 2 GiB RAM:
>
> root [0] TVectorF vec(512*512*1273);
> root [1]
>
> It seems that the Write() routine allocates additional memory (perhaps
> for a copy of the object) and this causes the root.exe process to
> terminate. I think the problem is that a single process cannot exceed
> 2 GiB RAM on the x86 architecture. (The additional 4 GiB of swap
> space does not help in this case.)
>
> I'll try to find a workaround by writing and reading the object to a
> TTree. I'll also try it on the AMD64 architecture.
>
> BTW: The 512*512*1273 array comes from a CT (Computed Tomography)
> scanner. The array is big but current machines can handle it.
>
> Regards,
> Alexandr
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers_at_cern.ch              Phone: +41 22 7679248
WWW:    http://www.rademakers.org/fons/      Fax:   +41 22 7679480
Received on Tue Jun 07 2005 - 04:41:47 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET