From 43bbc68dfea1ef2f3390b3e758705bd980fee8f5 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Fri, 15 Dec 2023 12:20:39 +0100 Subject: [PATCH] Remove `roofit` option again With the conda nighlies being up-to-date again, we don't need the option to disable RooFit anymore (it was introduced for the CI to be green, as the RooFit benchmarks used new things that were not available in the outdated nightlies). --- .github/workflows/ci.yaml | 3 +-- CMakeLists.txt | 1 - root/CMakeLists.txt | 8 +++----- root/roofit/histfactory/TestWorkspaces.cxx | 2 +- root/roofit/histfactory/benchHistFactory.cxx | 4 +++- root/roofit/roofit/CMakeLists.txt | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e4ba5272b..3ab70eba8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -46,8 +46,7 @@ jobs: run: | conda activate root-nightly mkdir -p build && cd build - # The conda nightlies are not built with a cutting-edge ROOT version that the RooFit benchmarks require - cmake -Dcuda=OFF -Droofit=OFF .. + cmake -Dcuda=OFF .. cmake --build . - name: Run benchmarks diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a01ba6eb..866e92539 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,6 @@ endif() project(rootbench) option(cuda "Build benchmarks that run on CUDA GPUs" OFF) -option(roofit "Build RooFit benchmarks" ON) include(CMakeToolsHelpers OPTIONAL) include(ExternalProject) diff --git a/root/CMakeLists.txt b/root/CMakeLists.txt index a25eb8f32..fbbd840f1 100644 --- a/root/CMakeLists.txt +++ b/root/CMakeLists.txt @@ -1,10 +1,8 @@ +add_subdirectory(hist) add_subdirectory(interpreter) add_subdirectory(io) -add_subdirectory(hist) add_subdirectory(math) add_subdirectory(pyroot) -if (roofit) - add_subdirectory(roofit) -endif() -add_subdirectory(tree) +add_subdirectory(roofit) add_subdirectory(tmva) +add_subdirectory(tree) diff --git a/root/roofit/histfactory/TestWorkspaces.cxx b/root/roofit/histfactory/TestWorkspaces.cxx index 9c6576704..aed6882eb 100644 --- a/root/roofit/histfactory/TestWorkspaces.cxx +++ b/root/roofit/histfactory/TestWorkspaces.cxx @@ -21,7 +21,7 @@ TestWorkspaces::getWorkspace001(RooStats::HistFactory::HistoToWorkspaceFactoryFa // in case the file is not found if (bool bfile = gSystem->AccessPathName(inputFile.c_str())) { std::cout << "Input file is not found - run prepareHistFactory script " << std::endl; - gROOT->ProcessLine("mkdir -p hf001"); + gSystem->mkdir("hf001"); gROOT->ProcessLine(".! prepareHistFactory hf001"); bfile = gSystem->AccessPathName(inputFile.c_str()); if (bfile) { diff --git a/root/roofit/histfactory/benchHistFactory.cxx b/root/roofit/histfactory/benchHistFactory.cxx index 689819a70..bf658a627 100644 --- a/root/roofit/histfactory/benchHistFactory.cxx +++ b/root/roofit/histfactory/benchHistFactory.cxx @@ -23,7 +23,7 @@ class TestData { using namespace RooFit; RooStats::HistFactory::HistoToWorkspaceFactoryFast::Configuration hfCfg; - std::unique_ptr ws = TestWorkspaces::getWorkspace001(hfCfg); + ws = TestWorkspaces::getWorkspace001(hfCfg); auto *mc = static_cast(ws->obj("ModelConfig")); @@ -47,6 +47,8 @@ class TestData { minimizationPath = std::make_unique(*m.getLogDataSet()); } + std::unique_ptr ws; + // Dataset with the floating parameters as columns, and each call to getVal // in the minimization path as rows. std::unique_ptr minimizationPath; diff --git a/root/roofit/roofit/CMakeLists.txt b/root/roofit/roofit/CMakeLists.txt index d9d94ff09..ae3956fe8 100644 --- a/root/roofit/roofit/CMakeLists.txt +++ b/root/roofit/roofit/CMakeLists.txt @@ -14,7 +14,7 @@ RB_ADD_GBENCHMARK(benchRooFitBackends LIBRARIES Core MathCore RooFitCore RooFit) if(cuda) - target_compile_definitions(benchRooFitBinned PRIVATE DO_BENCH_ROOFIT_CUDA) + target_compile_definitions(benchRooFitUnbinned PRIVATE DO_BENCH_ROOFIT_CUDA) target_compile_definitions(benchRooFitBackends PRIVATE DO_BENCH_ROOFIT_CUDA) endif()