Skip to content

Fix "QCDNUM not initialized" error when using APPLgrid

Ivan Novikov requested to merge fix_APPLrid_init into master

There was a bug that caused xFitter to crash with a QCDNUM not initialized error when using APPLgrid.

In the current system of evolutions, evolutions are created only when they are first requested, and do not exist before that. Evolutions that do not exist yet do not receive at-iteration updates. The problem was that APPLgrid was accessing its input evolutions first in compute(). Since compute() is called after atIteration() updates, these evolutions would not get at-iteration update before they are used at first iteration, leading to a crash. As a workaround, APPLgrid will access input evolutions once at initialization to make sure they exist at that point.

To avoid this issue, all reaction implementation should access their input evolutions at least once at initialization, to make sure they exist.

This bug shows that our approach "do not create evolutions before they are requested" can lead to problems.

Merge request reports