Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pathfinder: disallow models with 0 parameters #1220

Closed
WardBrian opened this issue Nov 8, 2023 · 0 comments · Fixed by #1221
Closed

pathfinder: disallow models with 0 parameters #1220

WardBrian opened this issue Nov 8, 2023 · 0 comments · Fixed by #1221
Assignees

Comments

@WardBrian
Copy link
Member

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 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

Expected Output:

An error message

Current Version:

v2.33.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants