Skip to content

RooFit::MultiProcess & TestStatistics part 5b: test RooGradMinimizerFcn#8694

Merged
guitargeek merged 2 commits into
root-project:masterfrom
roofit-dev:RooFit_MultiProcess_PR_5b_fix_testRooGradMinimizerFcn
Aug 31, 2021
Merged

RooFit::MultiProcess & TestStatistics part 5b: test RooGradMinimizerFcn#8694
guitargeek merged 2 commits into
root-project:masterfrom
roofit-dev:RooFit_MultiProcess_PR_5b_fix_testRooGradMinimizerFcn

Conversation

@egpbos

@egpbos egpbos commented Jul 16, 2021

Copy link
Copy Markdown
Contributor

This PR reactivates and fixes the test for RooGradMinimizerFcn (introduced in #8596).

The first commit provides a way for external gradient calculators to use previous gradient information (gradient itself, second derivatives, step size) to calculate the next gradient values. Simultaneously, it allows the external calculator to pass back (via the same arrays to keep the redesign as minimal as possible, in anticipation of planned dedicated Hessian support) the second derivative and step sizes, so they can also be reused in the next gradient calculation. All of this reuse was already going on in Numerical2PGradientCalculator, but external gradient calculators had no access to this data, because the FCNGradAdaptor and IMultiGradFunction had no support for passing it back and forth. The commit also implements use of this mechanism in ExternalInternalGradientCalculator and in RooGradMinimizerFcn.

The second commit reactivates the (already existing) test, and fixes it, because it turned out it had a small remaining bug. The bug was fixed by removing an unused parameter from NumericalGradient::SetInitialGradient, so that was two birds with one stone.

@egpbos
egpbos requested a review from bellenot as a code owner July 16, 2021 19:01
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@egpbos
egpbos force-pushed the RooFit_MultiProcess_PR_5b_fix_testRooGradMinimizerFcn branch from 5363f9d to f102ea2 Compare July 16, 2021 19:07
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-performance-centos8-multicore/default.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-16T19:14:46.425Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:14:46.425Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:701:18: warning: by ‘virtual double ROOT::Math::GradFunctor::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-16T19:14:46.425Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:14:46.425Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:210:18: warning: by ‘ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::function<double(const double*)>, std::function<double(const double*, unsigned int)> >::DoDerivative’ [-Woverloaded-virtual]
  • [2021-07-16T19:14:46.425Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:14:46.425Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/MinimTransformFunction.h:119:19: warning: by ‘virtual double ROOT::Math::MinimTransformFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-16T19:14:46.683Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:14:46.683Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:153:20: warning: by ‘double ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::DoDerivative(const double*, unsigned int) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]
  • [2021-07-16T19:14:46.683Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:14:46.683Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:124:17: warning: by ‘void ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::Gradient(const double*, double*) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]

And 218 more

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-1.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/MinimTransformFunction.h:119:19: warning: by ‘virtual double ROOT::Math::MinimTransformFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:701:18: warning: by ‘virtual double ROOT::Math::GradFunctor::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:210:18: warning: by ‘ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::function<double(const double*)>, std::function<double(const double*, unsigned int)> >::DoDerivative’ [-Woverloaded-virtual]
  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/MinimTransformFunction.h:119:19: warning: by ‘virtual double ROOT::Math::MinimTransformFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:11:29.496Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:124:17: warning: by ‘void ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::Gradient(const double*, double*) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]

And 242 more

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-07-16T19:07:34.196Z] stderr: error: could not read '.git/rebase-apply/head-name': No such file or directory

Warnings:

  • [2021-07-16T19:21:19.741Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:21:19.741Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:701:18: warning: by ‘virtual double ROOT::Math::GradFunctor::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-16T19:21:19.741Z] ild/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:21:19.741Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:210:18: warning: by ‘ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::function<double(const double*)>, std::function<double(const double*, unsigned int)> >::DoDerivative’ [-Woverloaded-virtual]
  • [2021-07-16T19:21:19.741Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:21:19.741Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/MinimTransformFunction.h:119:19: warning: by ‘virtual double ROOT::Math::MinimTransformFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-16T19:21:19.741Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:21:19.741Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:153:20: warning: by ‘double ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::DoDerivative(const double*, unsigned int) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]
  • [2021-07-16T19:21:19.741Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-16T19:21:19.741Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:124:17: warning: by ‘void ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::Gradient(const double*, double*) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]

And 218 more

Failing tests:

@phsft-bot

Copy link
Copy Markdown

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

Errors:

  • [2021-07-16T20:14:37.690Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\test_lib.h(64,15): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-16T20:14:37.690Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\test_lib.h(64,25): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-16T20:14:37.690Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\test_lib.h(66,56): error C3863: array type 'double [n]' is not assignable [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-16T20:14:37.690Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\test_lib.h(67,68): error C3863: array type 'double [n]' is not assignable [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-16T20:14:37.690Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(189,17): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-16T20:14:37.690Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(190,16): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-16T20:14:37.690Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(195,83): error C3863: array type 'double [N]' is not assignable [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-16T20:14:37.690Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(200,82): error C3863: array type 'double [N]' is not assignable [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-16T20:14:37.690Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(221,17): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-16T20:14:37.988Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(222,16): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]

And 10 more

@phsft-bot

Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-16T19:26:05.610Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T19:26:06.788Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T19:26:41.427Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T19:26:42.105Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T19:26:45.403Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T19:26:46.909Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T19:26:54.544Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T19:31:12.624Z] include/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T19:31:16.394Z] include/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T19:31:20.014Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)>>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]

And 27 more

@phsft-bot

Copy link
Copy Markdown

Build failed on mac1014/python3.
Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-16T20:54:59.146Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T20:55:04.391Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T20:55:21.109Z] include/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T20:55:21.680Z] include/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T20:55:23.894Z] include/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T20:55:46.574Z] include/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T20:56:18.084Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T20:56:20.694Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T20:56:23.806Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-16T20:56:28.863Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:206:18: warning: 'ROOT::Math::FunctorGradHandler<ROOT::Math::GradFunctor, std::__1::function<double (const double *)>, std::__1::function<double (const double *, unsigned int)> >::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]

And 27 more

@bellenot
bellenot removed their request for review July 19, 2021 08:21
@egpbos

egpbos commented Jul 19, 2021

Copy link
Copy Markdown
Contributor Author

Fixes #8697

@egpbos
egpbos force-pushed the RooFit_MultiProcess_PR_5b_fix_testRooGradMinimizerFcn branch from f102ea2 to a8afdf2 Compare July 20, 2021 10:31
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-performance-centos8-multicore/default.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-20T10:39:45.867Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:39:45.867Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:708:18: warning: by ‘virtual double ROOT::Math::GradFunctor::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-20T10:39:45.867Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:39:45.867Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/MinimTransformFunction.h:119:19: warning: by ‘virtual double ROOT::Math::MinimTransformFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-20T10:39:46.125Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:39:46.125Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:153:20: warning: by ‘double ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::DoDerivative(const double*, unsigned int) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]
  • [2021-07-20T10:39:46.125Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:39:46.125Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:124:17: warning: by ‘void ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::Gradient(const double*, double*) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]
  • [2021-07-20T10:39:46.125Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:39:46.125Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/LogLikelihoodFCN.h:161:20: warning: by ‘double ROOT::Fit::LogLikelihoodFCN<DerivFunType, ModelFunType>::DoDerivative(const double*, unsigned int) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]

And 150 more

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-1.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-20T10:37:06.984Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:37:06.984Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/MinimTransformFunction.h:119:19: warning: by ‘virtual double ROOT::Math::MinimTransformFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-20T10:37:06.984Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:37:06.984Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:124:17: warning: by ‘void ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::Gradient(const double*, double*) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<Vc_1::Vector<double, Vc_1::VectorAbi::Sse> >]’ [-Woverloaded-virtual]
  • [2021-07-20T10:37:06.984Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:37:06.984Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:153:19: warning: by ‘double ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::DoDerivative(const double*, unsigned int) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<Vc_1::Vector<double, Vc_1::VectorAbi::Sse> >]’ [-Woverloaded-virtual]
  • [2021-07-20T10:37:06.984Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:37:06.984Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:124:17: warning: by ‘void ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::Gradient(const double*, double*) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]
  • [2021-07-20T10:37:06.985Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:37:06.985Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:153:19: warning: by ‘double ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::DoDerivative(const double*, unsigned int) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]

And 174 more

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-07-20T10:32:36.968Z] stderr: error: could not read '.git/rebase-apply/head-name': No such file or directory

Warnings:

  • [2021-07-20T10:47:50.780Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:47:50.780Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/Functor.h:708:18: warning: by ‘virtual double ROOT::Math::GradFunctor::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-20T10:47:50.780Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:47:50.780Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/MinimTransformFunction.h:119:19: warning: by ‘virtual double ROOT::Math::MinimTransformFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-20T10:47:50.780Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:47:50.780Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:153:20: warning: by ‘double ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::DoDerivative(const double*, unsigned int) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]
  • [2021-07-20T10:47:50.780Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:47:50.781Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/Chi2FCN.h:124:17: warning: by ‘void ROOT::Fit::Chi2FCN<DerivFunType, ModelFunType>::Gradient(const double*, double*) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]
  • [2021-07-20T10:47:50.781Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T10:47:50.781Z] /home/sftnight/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Fit/LogLikelihoodFCN.h:161:20: warning: by ‘double ROOT::Fit::LogLikelihoodFCN<DerivFunType, ModelFunType>::DoDerivative(const double*, unsigned int) const [with DerivFunType = ROOT::Math::IGradientFunctionMultiDimTempl<double>; ModelFunType = ROOT::Math::IParametricFunctionMultiDimTempl<double>]’ [-Woverloaded-virtual]

And 149 more

Failing tests:

@phsft-bot

Copy link
Copy Markdown

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

Errors:

  • [2021-07-20T11:22:03.487Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\test_lib.h(64,15): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-20T11:22:03.487Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\test_lib.h(64,25): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-20T11:22:03.487Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\test_lib.h(66,56): error C3863: array type 'double [n]' is not assignable [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-20T11:22:03.487Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\test_lib.h(67,68): error C3863: array type 'double [n]' is not assignable [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-20T11:22:03.783Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(189,17): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-20T11:22:03.783Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(190,16): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-20T11:22:03.783Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(195,83): error C3863: array type 'double [N]' is not assignable [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-20T11:22:03.783Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(200,82): error C3863: array type 'double [N]' is not assignable [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-20T11:22:03.783Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(221,17): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]
  • [2021-07-20T11:22:03.783Z] C:\build\workspace\root-pullrequests-build\root\roofit\roofitcore\test\testRooGradMinimizerFcn.cxx(222,16): error C2131: expression did not evaluate to a constant [C:\build\workspace\root-pullrequests-build\build\roofit\roofitcore\test\testRooGradMinimizerFcn.vcxproj]

And 10 more

@phsft-bot

Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-20T10:56:30.228Z] include/Math/Functor.h:350:18: warning: 'ROOT::Math::MemGradFunHandler<ROOT::Math::GradFunctor, FuncSystem , double (FuncSystem::)(const double ), double (FuncSystem::)(const double *, int)>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-20T10:56:30.499Z] include/Math/Functor.h:123:18: warning: 'ROOT::Math::FunctorHandler<ROOT::Math::GradFunctor, MyFunction>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-20T10:56:30.499Z] include/Math/Functor.h:350:18: warning: 'ROOT::Math::MemGradFunHandler<ROOT::Math::GradFunctor, MyFunction , double (MyFunction::)(const double ) const, double (MyFunction::)(const double *, int) const>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]

@phsft-bot

Copy link
Copy Markdown

Build failed on mac1014/python3.
Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-20T11:12:51.607Z] include/Math/Functor.h:350:18: warning: 'ROOT::Math::MemGradFunHandler<ROOT::Math::GradFunctor, FuncSystem , double (FuncSystem::)(const double ), double (FuncSystem::)(const double *, int)>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-20T11:20:50.609Z] include/Math/Functor.h:123:18: warning: 'ROOT::Math::FunctorHandler<ROOT::Math::GradFunctor, MyFunction>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]
  • [2021-07-20T11:20:50.609Z] include/Math/Functor.h:350:18: warning: 'ROOT::Math::MemGradFunHandler<ROOT::Math::GradFunctor, MyFunction , double (MyFunction::)(const double ) const, double (MyFunction::)(const double *, int) const>::DoDerivative' hides overloaded virtual function [-Woverloaded-virtual]

@egpbos
egpbos force-pushed the RooFit_MultiProcess_PR_5b_fix_testRooGradMinimizerFcn branch from a8afdf2 to 88096c3 Compare July 20, 2021 13:41
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-performance-centos8-multicore/default.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-20T13:49:56.762Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T13:49:56.762Z] /data/sftnight/workspace/root-pullrequests-build/root/math/minuit2/test/testMinimizer.cxx:217:11: warning: by ‘virtual double TrigoFletcherFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-20T13:49:56.762Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T13:49:56.763Z] /data/sftnight/workspace/root-pullrequests-build/root/math/minuit2/test/testMinimizer.cxx:152:9: warning: by ‘virtual void TrigoFletcherFunction::Gradient(const double*, double*) const’ [-Woverloaded-virtual]
  • [2021-07-20T13:49:56.763Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T13:49:56.763Z] /data/sftnight/workspace/root-pullrequests-build/root/math/minuit2/test/testMinimizer.cxx:303:11: warning: by ‘virtual double ChebyQuadFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-20T13:49:56.763Z] /data/sftnight/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T13:49:56.763Z] /data/sftnight/workspace/root-pullrequests-build/root/math/minuit2/test/testMinimizer.cxx:263:9: warning: by ‘virtual void ChebyQuadFunction::Gradient(const double*, double*) const’ [-Woverloaded-virtual]

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-1.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-07-20T13:53:25.130Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T13:53:25.130Z] /mnt/build/workspace/root-pullrequests-build/root/math/minuit2/test/testMinimizer.cxx:152:9: warning: by ‘virtual void TrigoFletcherFunction::Gradient(const double*, double*) const’ [-Woverloaded-virtual]
  • [2021-07-20T13:53:25.130Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T13:53:25.130Z] /mnt/build/workspace/root-pullrequests-build/root/math/minuit2/test/testMinimizer.cxx:217:11: warning: by ‘virtual double TrigoFletcherFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]
  • [2021-07-20T13:53:25.130Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:368:23: warning: ‘void ROOT::Math::IGradientFunctionMultiDimTempl<T>::Gradient(const T*, T*, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T13:53:25.130Z] /mnt/build/workspace/root-pullrequests-build/root/math/minuit2/test/testMinimizer.cxx:263:9: warning: by ‘virtual void ChebyQuadFunction::Gradient(const double*, double*) const’ [-Woverloaded-virtual]
  • [2021-07-20T13:53:25.130Z] /mnt/build/workspace/root-pullrequests-build/root/math/mathcore/inc/Math/IFunction.h:246:20: warning: ‘T ROOT::Math::IGradientMultiDimTempl<T>::DoDerivative(const T*, unsigned int, T*, T*, T*) const [with T = double]’ was hidden [-Woverloaded-virtual]
  • [2021-07-20T13:53:25.130Z] /mnt/build/workspace/root-pullrequests-build/root/math/minuit2/test/testMinimizer.cxx:303:11: warning: by ‘virtual double ChebyQuadFunction::DoDerivative(const double*, unsigned int) const’ [-Woverloaded-virtual]

@egpbos

egpbos commented Jul 21, 2021

Copy link
Copy Markdown
Contributor Author

The last remaining Jenkins failures are not from this PR, so ready for review @lmoneta @guitargeek @hageboeck

@guitargeek guitargeek linked an issue Jul 27, 2021 that may be closed by this pull request
egpbos added 2 commits August 24, 2021 15:50
This fixes the RooGradMinimizer test in as minimal a way possible.

Note that this still has a bunch of compile warnings.
Turns out the RooGradMinimizerFcn also still had a slight remaining bug, which was introduced by the "detemplatization" redesign of RooMinimizer in PR root-project#8596. The problem was that the RooMinimizer ctor, which calls the RooGradMinimizerFcn ctor, which calls synchronizeGradientParameterSettings... called _context->getMultiGenFcn() (_context is the same RooMinimizer that is creating the RooGradMinimizerFcn at this point...) and that in turn tries to do a dynamic_cast on _fcn, which is going to be the RooGradMinimizerFcn after it has been assigned after construction, but this is still in progress at that point, so the dynamic_cast fails, since _fcn is still nullptr.

The fix was to remove a fortunately unused parameter in NumericalDerivator::SetInitialGradient, which removes the problematic _context->getMultiGenFcn() call.

In addition, compilation warnings were produced by overloads that shadowed the 5-parameter DoDerivative/Gradient overloads. To silence the warnings, we just add five-parameter overloads that forward to the two-parameter ones. To implement full 5-parameter paths everywhere would require more work and discussion. Also some compilation errors on Windows fixed by using vectors instead of non-standard dynamic sized arrays.
@egpbos
egpbos force-pushed the RooFit_MultiProcess_PR_5b_fix_testRooGradMinimizerFcn branch from e34d451 to 261d9ea Compare August 24, 2021 14:21
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-08-24T14:23:37.163Z] stderr: error: could not read '.git/rebase-apply/head-name': No such file or directory

@phsft-bot

Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
See console output.

@egpbos

egpbos commented Aug 25, 2021

Copy link
Copy Markdown
Contributor Author

@phsft-bot build just on mac11.0/cxx17

I think the errored build above timed out before.

I'm not sure what happened with the ROOT-debian10-i386/cxx14 build. The build itself was successful, or so it says at the end of the full log.

@phsft-bot

Copy link
Copy Markdown

Starting build on mac11.0/cxx17
How to customize builds

Comment on lines +246 to +247
virtual T DoDerivative(const T *x, unsigned int icoord, T * /*previous_grad*/, T * /*previous_g2*/,
T * /*previous_gstep*/) const

@guitargeek guitargeek Aug 31, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
virtual T DoDerivative(const T *x, unsigned int icoord, T * /*previous_grad*/, T * /*previous_g2*/,
T * /*previous_gstep*/) const
virtual T DoDerivativeWithPreviousResult(const T *x, unsigned int icoord, T * /*previous_grad*/, T * /*previous_g2*/,
T * /*previous_gstep*/) const

What about giving these new functions a different name? There is no reason to also name it DoDerivative, and like this we avoid the compiler warning when only the old DoDerivative signature is overridden.

If a shorter but also descriptive name other than DoDerivativeWithPreviousResult comes to our mind, I would also be open to it.

T Derivative(const T *x, unsigned int icoord, T *previous_grad, T *previous_g2,
T *previous_gstep) const
{
return DoDerivative(x, icoord, previous_grad, previous_g2, previous_gstep);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return DoDerivative(x, icoord, previous_grad, previous_g2, previous_gstep);
return DoDerivativeWithPrevResult(x, icoord, previous_grad, previous_g2, previous_gstep);

/// In some cases, the gradient algorithm will use information from the previous step, these can be passed
/// in with this overload. The `previous_*` arrays can also be used to return second derivative and step size
/// so that these can be passed forward again as well at the call site, if necessary.
virtual void Gradient(const T *x, T *grad, T *previous_grad, T *previous_g2, T *previous_gstep) const

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
virtual void Gradient(const T *x, T *grad, T *previous_grad, T *previous_g2, T *previous_gstep) const
virtual void GradientWithPrevResult(const T *x, T *grad, T *previous_grad, T *previous_g2, T *previous_gstep) const

See equivalent comment about DoGradient.

Comment on lines +57 to +58
std::vector<double> Gradient(const std::vector<double> &v, double *previous_grad, double *previous_g2,
double *previous_gstep) const override

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::vector<double> Gradient(const std::vector<double> &v, double *previous_grad, double *previous_g2,
double *previous_gstep) const override
std::vector<double> GradientWithPrevResult(const std::vector<double> &v, double *previous_grad, double *previous_g2,
double *previous_gstep) const override

Comment on lines +44 to +45
virtual std::vector<double> Gradient(const std::vector<double> &parameters, double */*previous_grad*/, double */*previous_g2*/,
double */*previous_gstep*/) const { return Gradient(parameters); };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
virtual std::vector<double> Gradient(const std::vector<double> &parameters, double */*previous_grad*/, double */*previous_g2*/,
double */*previous_gstep*/) const { return Gradient(parameters); };
virtual std::vector<double> GradientWithPrevResult(const std::vector<double> &parameters,
double * /*previous_grad*/, double * /*previous_g2*/,
double * /*previous_gstep*/) const { return Gradient(parameters); };

Besides the name change, try to not have the character sequence */* but put a space after the first * to not confuse syntax highlighting of GitHub and many editors.

std::vector<double> previous_g2(functionGradient.G2().Data(), functionGradient.G2().Data() + functionGradient.G2().size());
std::vector<double> previous_gstep(functionGradient.Gstep().Data(), functionGradient.Gstep().Data() + functionGradient.Gstep().size());

std::vector<double> grad = fGradCalc.Gradient(par_vec, previous_grad.data(), previous_g2.data(), previous_gstep.data());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::vector<double> grad = fGradCalc.Gradient(par_vec, previous_grad.data(), previous_g2.data(), previous_gstep.data());
std::vector<double> grad = fGradCalc.GradientWithPrevResult(par_vec, previous_grad.data(), previous_g2.data(), previous_gstep.data());

// IMultiGradFunction overrides
double DoEval(const double *x) const override;
double DoDerivative(const double *x, unsigned int icoord) const override;
double DoDerivative(const double *x, unsigned int i_component, double *previous_grad,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
double DoDerivative(const double *x, unsigned int i_component, double *previous_grad,
double DoDerivativeWithPrevResult(const double *x, unsigned int i_component, double *previous_grad,

return _grad[i_component].derivative;
}

double RooGradMinimizerFcn::DoDerivative(const double *x, unsigned int i_component, double *previous_grad,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
double RooGradMinimizerFcn::DoDerivative(const double *x, unsigned int i_component, double *previous_grad,
double RooGradMinimizerFcn::DoDerivativeWithPrevResult(const double *x, unsigned int i_component, double *previous_grad,

std::vector<ROOT::Fit::ParameterSettings> &parameter_settings) const
{
_gradf.SetInitialGradient(_context->getMultiGenFcn(), parameter_settings, _grad);
_gradf.SetInitialGradient(parameter_settings, _grad);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_gradf.SetInitialGradient(parameter_settings, _grad);
_gradf.SetInitialGradient(nullptr, parameter_settings, _grad);

There is also another solution to the problem of the dynamic cast in the constructor: you can just pass a nullptr as the first argument, which is unused anyway.

I would feel more comfortable with that, because it doesn't require changing the public interface of NumericalDerivator::SetInitialGradient.


// create gaussian parameters
double mean[n], sigma[n];
std::vector<double> mean(n), sigma(n);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal, but all these std::vector that you introduced can also be std::array here.

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Partick, thanks for the PR!

I have three requests, two of them I have already commented inline but I'll write a summary here:

  1. I think it's better if the new overloads of DoDerivative and Gradient that take also the previous gradients have a different names like DoDerivativeWithPrevResult and GradientWithPrevResult to avoid the member shadowing problem when only the original DoDerivative and Gradient functions are overridden. Then you don't have to add all these trivial implementations of the new functions in the second commit, and we also don't create warnings for users that are implementing these IFunctions.

  2. We should avoid changing existing public interfaces if not necessary. In the second commit, you changed the interface of NumericalDerivator::SetInitialGradient, but it's not absolutely necessary. In the RooGradMinimizerFcn, you can just pass a nullptr as the first parameter to avoid the problem that you described in the message of the second commit.

  3. The testRooGradMinimizerFcn unit test takes way too long to finish. In the CI it took 200 seconds (release build) and on my machine with a debug build it took 5 minutes. I think before we can merge this, we have to do something about this, as unit tests should nor have a longer runtime than a few seconds. You have any idea how the test can be made faster without decreasing the coverage of the features that are to be tested?

Since this PR also touches the math component, we should also make sure that @lmoneta doesn't have any further change requests before merging.

@lmoneta lmoneta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks fine for me.
I agree with the comments of Jonas, but some of these changes I think can be applied later.
I will need to modify anyway some of these interface when adding support for the Hessian.

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so then let's move on here and I'll address my comments myself in a followup PR.

@guitargeek
guitargeek merged commit 1e452a8 into root-project:master Aug 31, 2021
guitargeek added a commit to guitargeek/root that referenced this pull request Aug 31, 2021
This is a follow up on commits 1e452a8 and 1e452a8, almost reverting
the second commit completely.

It addresses the following comments by @guitargeek made in PR root-project#8694:

1. I think it's better if the new overloads of `DoDerivative` and
   `Gradient` that take also the previous gradients have a different
   names like `DoDerivativeWithPrevResult` and `GradientWithPrevResult`
   to avoid the member shadowing problem when only the original
   `DoDerivative` and `Gradient` functions are overridden. Then you
   don't have to add all these trivial implementations of the new
   functions in 1e452a8, and we also don't create warnings for
   users that are implementing these IFunctions.

2. We should avoid changing existing public interfaces if not necessary.
   In 1e452a8, you changed the interface of
   `NumericalDerivator::SetInitialGradient`, but it's not absolutely
   necessary. In the `RooGradMinimizerFcn`, you can just pass a
   `nullptr` as the first parameter to avoid the problem that you
   described in the message of commit 1e452a8.
@guitargeek

Copy link
Copy Markdown
Contributor

I have opened a PR addressing my review comments, so we don't forget about this.

guitargeek added a commit to guitargeek/root that referenced this pull request Sep 1, 2021
This is a follow up on commits 1e452a8 and 1e452a8, almost reverting
the second commit completely.

It addresses the following comments by @guitargeek made in PR root-project#8694:

1. I think it's better if the new overloads of `DoDerivative` and
   `Gradient` that take also the previous gradients have a different
   names like `DoDerivativeWithPrevResult` and `GradientWithPrevResult`
   to avoid the member shadowing problem when only the original
   `DoDerivative` and `Gradient` functions are overridden. Then you
   don't have to add all these trivial implementations of the new
   functions in 1e452a8, and we also don't create warnings for
   users that are implementing these IFunctions.

2. We should avoid changing existing public interfaces if not necessary.
   In 1e452a8, you changed the interface of
   `NumericalDerivator::SetInitialGradient`, but it's not absolutely
   necessary. In the `RooGradMinimizerFcn`, you can just pass a
   `nullptr` as the first parameter to avoid the problem that you
   described in the message of commit 1e452a8.
guitargeek added a commit that referenced this pull request Sep 1, 2021
This is a follow up on commits 1e452a8 and 1e452a8, almost reverting
the second commit completely.

It addresses the following comments by @guitargeek made in PR #8694:

1. I think it's better if the new overloads of `DoDerivative` and
   `Gradient` that take also the previous gradients have a different
   names like `DoDerivativeWithPrevResult` and `GradientWithPrevResult`
   to avoid the member shadowing problem when only the original
   `DoDerivative` and `Gradient` functions are overridden. Then you
   don't have to add all these trivial implementations of the new
   functions in 1e452a8, and we also don't create warnings for
   users that are implementing these IFunctions.

2. We should avoid changing existing public interfaces if not necessary.
   In 1e452a8, you changed the interface of
   `NumericalDerivator::SetInitialGradient`, but it's not absolutely
   necessary. In the `RooGradMinimizerFcn`, you can just pass a
   `nullptr` as the first parameter to avoid the problem that you
   described in the message of commit 1e452a8.
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.

[RF] testRooGradMinimizerFcn needs to be re-enabled

5 participants