Skip to content

Conversation

@guitargeek
Copy link
Contributor

This is a backport of all the relevant RooFit PRs that were recently merged to master to v6-28-00-patches (in the right order, to not have the commit history diverge too much).

  1. [RF] additional public methods for accessing/modifying product factors #12048
  2. [math] Replace TRef with array indices in TFoamCell #12061
  3. [RF] RooProduct schema-evolved i/o bug fix #12071
    Only the first commit that is not a fixup to a recent typo is master

Related to #11856.

will-cern and others added 4 commits January 22, 2023 13:02
Adds public methods to allow access and modification of the underlying factors
of RooProdPdf and RooProduct.
This fixes a memory leak related to the usage of `TRef` in `TFoamCell`
that can be reproduced with the following code:

```C++
class MyTFoamBinding : public TFoamIntegrand {
public:
   double Density(Int_t ndim, double *) override { return 1.0; }
};

void reproTFoam()
{
   ProcInfo_t procinfo;
   const float toMB = 1.f / 1024.f;

   std::size_t nToys = 5000;

   TRandom3 rand{};

   for (std::size_t index_toy = 1; index_toy <= nToys; index_toy++) {

      if (index_toy % 500 == 0) {
         gSystem->GetProcInfo(&procinfo);
         std::cout << index_toy << ": " << procinfo.fMemResident * toMB
                   << "   " << procinfo.fMemVirtual * toMB << std::endl;
      }

      MyTFoamBinding binding{};
      TFoam tfoam{"TFOAM"};
      tfoam.SetkDim(1);
      tfoam.SetRho(&binding);
      tfoam.SetPseRan(&rand);

      tfoam.SetnCells(30);

      tfoam.SetnSampl(200);
      tfoam.SetPseRan(&rand);
      tfoam.SetChat(0);
      tfoam.Initialize();
   }
}
```

Before this commit, you will see a steady memory increase that is gone
after this commit.

This fixes the fundamental memory increase in RooFit toy studies,
reported for example in root-project#8984.
The docs said explicitly to not use the copy constructor and the
copy assignment, so these operators should be deleted, as well as
moving.
Handle case where p0 or p1 are null -> ensure not null by time
expectProxyIs is called.
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2023-01-22T12:28:15.081Z] C:/build/workspace/root-pullrequests-build/build/etc\cling/Interpreter/RuntimeUniverse.h:27:10: fatal error: could not build module 'Cling_Runtime_Extra'
  • [2023-01-22T12:28:15.081Z] input_line_2:1:10: fatal error: could not build module 'Cling_Runtime'
  • [2023-01-22T12:28:16.481Z] C:/build/workspace/root-pullrequests-build/build/include\Rtypes.h:23:10: fatal error: could not build module 'ROOT_Rtypes'
  • [2023-01-22T12:28:16.481Z] C:/build/workspace/root-pullrequests-build/build/include/ThreadLocalStorage.h:60:10: fatal error: could not build module 'ROOT_Rtypes'
  • [2023-01-22T12:28:16.754Z] CUSTOMBUILD : fatal error : too many errors emitted, stopping now [-ferror-limit=] [C:\build\workspace\root-pullrequests-build\build\core\G__Core.vcxproj]

@phsft-bot
Copy link

Build failed on mac12/noimt.
Running on macphsft17.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2023-01-22T12:39:00.701Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/core/base/src/TDirectory.cxx:1292:7: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]

Failing tests:

And 58 more

@guitargeek guitargeek merged commit ec8798a into root-project:v6-28-00-patches Jan 22, 2023
@guitargeek guitargeek deleted the v6-28-00-patches_roofit_backports_6 branch January 22, 2023 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants