cej25 / c4Root

FairRoot-based analysis software for decay spectroscopy experiments
GNU General Public License v3.0
2 stars 2 forks source link

memory allocation of TH2F #180

Closed Rooitier closed 4 months ago

Rooitier commented 4 months ago

Some memory issues in nearline when setting number of bins in the steering macro. Too many bins in 2D histo maybe? 3e6*3e6.

nearlinege->SetBinningEnergy(3e6,0,3e6); nearlinege->AddReferenceDetector(1,0); nearlinege->SetEnergyGateWidth(5);

Crash first starts at Exec() when filling the 2D histograms of energy_energy with SC41 veto. And slurmmanager killed the job for OOM, changing to memory for job to 64GB still caused it to segfault.

Commenting out all 2D histograms solved the issue

h2_germanium_energy_energy_vetosci41 = new TH2F("h2_germanium_energy_energy_vetosci41","Calibrated Germanium spectra summed all energyies, t(det) - t(sci41) > 200 ns",fenergy_nbins,fenergy_bin_low,fenergy_bin_high,fenergy_nbins,fenergy_bin_low,fenergy_bin_high); h2_germanium_energy_energy_vetosci41->GetXaxis()->SetTitle("energy (keV)"); h2_germanium_energy_energy_vetosci41->SetOption("COLZ");

h2_germanium_energy_energy_sci41_cut = new TH2F("h2_germanium_energy_energy_sci41_cut","Calibrated Germanium spectra summed all energyies, t(det) - t(sci41) > 200 ns",fenergy_nbins,fenergy_bin_low,fenergy_bin_high,fenergy_nbins,fenergy_bin_low,fenergy_bin_high); h2_germanium_energy_energy_sci41_cut->GetXaxis()->SetTitle("energy (keV)"); h2_germanium_energy_energy_sci41_cut->SetOption("COLZ");

Log from supa computer below.

s100nearline1340054.log

nichubbard commented 4 months ago

3e6 bins 4 bytes per float = 12 MB per 1D histo 3e6 bins 3e6bins * 4 bytes per float = 36 TB per 2D histo

Someone should reconsider their choice of bins