Running pathfinder with a model with no parameters triggers undefined behavior, and is a meaningless thing to try to do. We should prevent this.
Reproducible Steps:
Compile an empty model with -fsanitize=undefined and run pathfinder
Current Output:
Path [1] :Initial log joint density = 0.000000
stan/lib/stan_math/lib/eigen_3.4.0/Eigen/src/Core/MapBase.h:123:26: runtime error: reference binding to null pointer of type 'const Scalar'
stan/lib/stan_math/lib/eigen_3.4.0/Eigen/src/Core/MapBase.h:123:26: runtime error: reference binding to null pointer of type 'const Scalar'
stan/lib/stan_math/lib/eigen_3.4.0/Eigen/src/Core/Transpose.h:148:64: runtime error: reference binding to null pointer of type 'const Scalar'
stan/lib/stan_math/lib/eigen_3.4.0/Eigen/src/Core/CoreEvaluators.h:923:18: runtime error: reference binding to null pointer of type 'Scalar'
stan/lib/stan_math/lib/eigen_3.4.0/Eigen/src/Core/CoreEvaluators.h:337:39: runtime error: reference binding to null pointer of type 'Scalar'
stan/lib/stan_math/lib/eigen_3.4.0/Eigen/src/Core/DenseCoeffsBase.h:346:70: runtime error: reference binding to null pointer of type 'Scalar'
...
And a CSV file where all of the lp and lp_approx values are -0
Summary:
Running pathfinder with a model with no parameters triggers undefined behavior, and is a meaningless thing to try to do. We should prevent this.
Reproducible Steps:
Compile an empty model with
-fsanitize=undefined
and run pathfinderCurrent Output:
And a CSV file where all of the lp and lp_approx values are
-0
Expected Output:
An error message
Current Version:
v2.33.1