# Problem with merging of root files

**URL:** <https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798>\
**Category:** ROOT\
**Created:** [August 3, 2020, 7:25am UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798 "2020-08-03T07:25:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mobhat](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/779978/32.png) [@mobhat](https://root-forum.cern.ch/u/mobhat)\
**Post date:** [August 3, 2020, 7:25am UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798/1 "2020-08-03T07:25:13Z")

</div>

Dear All,  
I, have problem with the merging of root files by hadd . when my target file is less than 300 MB it works but when my target file goes beyond 300MB it does not work. Please help me to sort it out.

Regards  
Mohammad Asif Bhat

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [August 3, 2020, 7:45am UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798/2 "2020-08-03T07:45:02Z")

</div>

Hi @mobhat,  
hadd should have no problems with merging file sizes less than 100GB, and even then it’s just a matter of some [slight modifications](https://root-forum.cern.ch/t/how-to-add-root-files-when-the-target-root-file-is-larger-than-100-gb/37932) to your code.  
If you are still finding issues, please tell us the ROOT version and OS you are using, plus the full error you are getting.  
Cheers,  
Vincenzo

---

<div class="post-metadata">

**Author:** ![mobhat](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/779978/32.png) [@mobhat](https://root-forum.cern.ch/u/mobhat)\
**Post date:** [August 3, 2020, 7:57am UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798/3 "2020-08-03T07:57:19Z")

</div>

Dear Vincenzo,  
I am using aliroot and the root version is 6.16/00 and the OS is Ubuntu 18.04.4 LTS. It is not showing any error but it does not go beyond this “hadd Target file: ResultQA\_final.root  
hadd compression setting for all ouput: 1  
hadd Source file 1: ResultQA\_10runs.root  
hadd Source file 2: ResultQA\_10runs\_01.root  
hadd Source file 3: ResultQA\_8runs.root  
hadd Target path: ResultQA\_final.root:/” and remains as it is.

Regards  
Mohammad Asif Bhat

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [August 3, 2020, 12:11pm UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798/4 "2020-08-03T12:11:16Z")

</div>

Hi @mobhat,

> It is not showing any error but it does not go beyond this

Do you mean the output file is empty? Or maybe that the process gets stuck and you need to forcedly stop it?  
I would first try to reproduce your issue on lxplus and then contact the AliROOT experts as well.  
Cheers,  
Vincenzo

---

<div class="post-metadata">

**Author:** ![mobhat](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/779978/32.png) [@mobhat](https://root-forum.cern.ch/u/mobhat)\
**Post date:** [August 3, 2020, 1:33pm UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798/5 "2020-08-03T13:33:24Z")

</div>

Dear Vincenzo,  
Do you mean the output file is empty? Or maybe that the process gets stuck and you need to forcedly stop it?  
**Yes same is happening**

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [August 11, 2020, 6:03pm UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798/6 "2020-08-11T18:03:42Z")

</div>

This is (of course) surprising. Can you provide a running example/set-of-files so that we try reproducing it?

alternatively can you run (note the `-fk` )

```auto
hadd -fk ResultQA_final.root ResultQA_10runs.root ResultQA_10runs_01.root ResultQA_8runs.root

```

and (note the `-f` )

```auto
valgrind --suppressions=$ROOTSYS/etc/valgrind-root.supp hadd -f ResultQA_final.root ResultQA_10runs.root ResultQA_10runs_01.root ResultQA_8runs.root

```

Cheers,  
Philippe.

---

<div class="post-metadata">

**Author:** ![mobhat](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/779978/32.png) [@mobhat](https://root-forum.cern.ch/u/mobhat)\
**Post date:** [August 11, 2020, 7:27pm UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798/7 "2020-08-11T19:27:37Z")

</div>

Dear Philippe,  
I, have tried the command you suggested but it is not working . I can not attach here the rootfiles as size is very large.

Regards  
Mohammad Asif Bhat

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [August 11, 2020, 7:55pm UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798/8 "2020-08-11T19:55:55Z")

</div>

What do you mean by “not working”? The `-fk` might have the same crash of the original but the valgrind should provide additional information about why it is crashing.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 25, 2020, 7:55pm UTC](https://root-forum.cern.ch/t/problem-with-merging-of-root-files/40798/9 "2020-08-25T19:55:58Z")

</div>

Closed on August 25, 2020, 7:55pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
