Skip to Content.
Sympa Menu

star-fst-l - Re: [Star-fst-l] FstClusterMaker

star-fst-l AT lists.bnl.gov

Subject: Star-fst-l mailing list

List archive

Chronological Thread  
  • From: Te-Chuan Huang <tchuang AT rcf.rhic.bnl.gov>
  • To: "Brandenburg, Daniel" <brandenburg.89 AT osu.edu>
  • Cc: videbaek <videbaek AT bnl.gov>, Star-fst L <star-fst-l AT lists.bnl.gov>
  • Subject: Re: [Star-fst-l] FstClusterMaker
  • Date: Sun, 1 Oct 2023 17:15:57 -0500

Hi Daniel,

I created PR #593 for this. You should also received notification from Github as reviewer.

Cheers,
Te-Chuan


On Oct 1, 2023, at 10:36 AM, Brandenburg, Daniel <brandenburg.89 AT osu.edu> wrote:

Hi Flemming and Te-chuan,

Thanks for spending time on this.  Sounds like good progress. Let me know when the PR is up and I’ll review and double check the valgrind result. 

Best,
Daniel

Daniel Brandenburg
Assistant professor
Physics Department
College of Arts and Sciences 
Ohio State University


From: Star-fst-l <star-fst-l-bounces AT lists.bnl.gov> on behalf of Te-Chuan Huang <tchuang AT rcf.rhic.bnl.gov>
Sent: Sunday, October 1, 2023 11:20:46 AM
To: videbaek <videbaek AT bnl.gov>
Cc: Star-fst L <star-fst-l AT lists.bnl.gov>
Subject: Re: [Star-fst-l] FstClusterMaker
 
Hi Flemming,

Thanks for the catch.
I also had a look at the codes.
Actually, I found a few more places that the pointers created with “new” were assigned to std::vector but were not deleted before calling pop_back() or erase().
I think I have identified all the memory leak by running 20 events in valgrind.
I’m now running 500 events to confirm.
Once it passes the 500 events test, I will make a pull request for this.

Cheers,
Te-Chuan

On Oct 1, 2023, at 9:53 AM, videbaek <videbaek AT bnl.gov> wrote:


Hi

I took a brief look at the code in FstClustermaker and found somecode that could cause a
memory leak.
The newcluster object is only added conditionally to the clustervec,
and thus is not deleted if this condition is not full filled.
The statement if(nToSeedHit>0)
could be moved up ahead of creating the newCluster object




line 137 + in StFstClusterMaker/StFstScanRadiusClusterAlgo.cxx

totCharge    = tempSumCharge;
totChargeErr = sqrt(tempSumChargeErrSquare / nToMerge);

newCluster = new StFstCluster((int)wedge * 10000 + clusterLabel, disk, wedge, sensor, apv, meanRStrip, meanPhiStrip, totCharge, totChargeErr, clusterType);
newCluster->setNRawHits(clusterSize);
newCluster->setNRawHitsR(clusterSizeR);
newCluster->setNRawHitsPhi(clusterSizePhi);
newCluster->setMaxTimeBin(maxTb);
newCluster->setIdTruth(idTruth);

if(nToSeedhit>0) {
 clustersVec[sensorIdx][phiIdx].push_back(newCluster);
 clusterLabel++;
}



-- 
Flemming Videbaek
senior scientist, emeritus
videbaek @ bnl.gov
Brookhaven National Lab
Physics Department
Bldg 510D
Upton, NY 11973

phone: 631-344-4106
cell     :  631-681-1596
_______________________________________________
Star-fst-l mailing list
Star-fst-l AT lists.bnl.gov
https://lists.bnl.gov/mailman/listinfo/star-fst-l




Archive powered by MHonArc 2.6.24.

Top of Page