SysError in <TFile::WriteBuffer> on WinXP

Dear ROOTers,

While filling a ROOT TFile with about 600 TTrees a user of my program has reported the following error:

SysError in <TFile::WriteBuffer>: error writing to file F:/Auswertung/GENEPI_combined/dataRMA.root (-1) (No space left on device)

followed by:

This error is symptomatic of a Tree created as a memory-resident Tree
Instead of doing:
   TTree *T = new TTree(...)
   TFile *f = new TFile(...)
you should do:
   TFile *f = new TFile(...)
   TTree *T = new TTree(...)

which is repeated many times.

The strange thing is that his hard disk had still 95GB free space!
Thus my question is:

  • Do you have any idea what might be the reason for this error?
  • Could it be that the hard dsik is too fragmented, so that the ROOT file can no longer be filled?
  • What is the behavior of ROOT when creating/filling trees on WinXP?
  • Does ROOT need consecutive disk space (on WinXP) when filling a file with trees?

Best regards
Christian

It could be that you run out of virtual memory. Did you monitor the memory, virtual memory and disk behavior before your program crashes?

Rene

Dear Rene,

As I have mentioned, the problem was reported by a user of my program, see:
stat.math.ethz.ch/pipermail … 35157.html
He even mentioned that he modified his boot.ini to allow more memory, see:
stat.math.ethz.ch/pipermail … 35091.html

I forgot to mention that the error occurs only when he calls the single function “rma()”, which does background-correction, quantile-normalization and summarization in one step. However, when he used separate functions for each step, he could finish the computation w/o problem. The trees created were identical, the only difference was that in the first case all trees were saved in a single root file, whereas in the second case the different trees were saved in three different root files.

Can you explain why you think that it may be a problem of virtual memory?
Furthermore, do you think that hard disk fragmentation could be a problem?

Best regards
Christian

Dear Rene,

As I am surely not able to reproduce the error which the user of my program gets on WinXP (although I have installed WinXP on my Mac using BootCamp to test my program), I would really appreciate your opinion.

Regarding your suggestion:
Do you know how to monitor the memory, virtual memory and disk behavior on WinXP if you do not want to watch the TaskManager for a couple of hours?

Best regards
Christian

[quote]I forgot to mention that the error occurs only when he calls the single function “rma()”, which does background-correction, quantile-normalization and summarization in one step. However, when he used separate functions for each step, he could finish the computation w/o problem. The trees created were identical, the only difference was that in the first case all trees were saved in a single root file, whereas in the second case the different trees were saved in three different root files.[/quote]Did the user use 3 different TFile object or only one in the failing case? Is there any threading involved?

Cheers,
Philippe.

Dear Philippe,

Sorry, I was not clear:

  • In the failing case the user used only one TFile.
  • No, there is no threading involved.

Best regards
Christian

Hi Christian,

Then I am a bit at a loss :frowning:. The only possible explanation I can still think of would be if the single TFile is closed and reopened ‘quickly’ (but even that would be a stretch) … does the problem still happens?

Philippe.

Dear Philippe,

Thank you for your reply, until now I did not hear anything from the user, probably since he could analyze his data using the 3-step approach.

Maybe you could answer my question, which is of interest to me, too:

  • Does ROOT need consecutive disk space (on WinXP) when filling a file with trees?
    (As far as I understand, no)
  • Does a TTree need consecutive disk space or is it dependent on the size of the baskets?

Best regards
Christian

[quote] Does ROOT need consecutive disk space (on WinXP) when filling a file with trees?[/quote]No. Actually we do not know, nor care how the file is physically laid-out (but the logical layout is consecutive).

[quote]Does a TTree need consecutive disk space or is it dependent on the size of the baskets?[/quote]Same answer, we do not access the physcial file, we only access it though the logical view offered by the posix interface.

Cheers,
Philippe.

Dear Philippe,

This is sad, since this may be the problem for the following reason:

The root file that is created can sometimes have a size of few GigaBytes (or even more),
and since it is known that on WinXP the hard disk becomes fragmented, then there may
be not enough consecutive space on the HD even though it has enough overall space.

For this reason it would be important to know the answer to these questions.

Best regards
Christian

Hi Christian,

IF there is a requirement that the ROOT file be physically consecutive on the disk, then it IS a bug in the Microsoft implementation of the posix file i/o interface ; the posix standard does not make any requirement of sort (and that why most file are actually in little piece on a windows disk). I do not believe there is such a bug and thus do not believe that there is any such requirement …

Cheers,
Philippe.

Dear Philippe,

Thank you, this seems indeed to be unlikely.

Best regards
Christian