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

add fatal error when using MCMC with recdev option 1 #590

Merged
merged 1 commit into from
May 24, 2024

Conversation

iantaylor-NOAA
Copy link
Contributor

This PR adds an error when you try to run MCMC with the setting do_recdev = 1.
It was inspired by this discussion #566 where a user noted getting bad results in the MCMC which I think are driven by the bug in ADMB described at admb-project/admb#107.

Concisely describe what has been changed/addressed in the pull request.

I thought of adding a warning instead of an error, but users may look at the warning file while running MLE estimates, decide that they can ignore the warnings, and not see that a new warning appears when running MCMC. I think the results of the MCMC are incorrect if using recdev option 1 so it's probably better to not allow them to get calculated in the first place.

What tests have been done?

I ran a model using ss3 -mcmc 100 and confirmed that the command line and warning file includes the following message (feel free to suggest changes to it):
Warning 1 Fatal Error! do_recdev option 1=devvector should not be used with MCMC, recommend option 2=simple deviations. For more detail see https://github.com/admb-project/admb/issues/107.

  • No test files are required for this pull request.

What tests/review still need to be done?

None.

Is there an input change for users to Stock Synthesis?

  • No, there was no input change.

Additional context:

The build-ss3 github action is failing due to some issue with installing docker for the mac-os which seems unrelated to this change so probably doesn't need to hold up progress on this PR.

@iantaylor-NOAA
Copy link
Contributor Author

Note: need to update Simple example to use do_recdev = 2 in order to pass the run-ss3-mcmc github action.

@e-perl-NOAA
Copy link
Collaborator

@iantaylor-NOAA do you think that we should update all Simple_xxx models to use do_recdev 2?

@e-perl-NOAA e-perl-NOAA merged commit aab179c into main May 24, 2024
11 checks passed
@e-perl-NOAA e-perl-NOAA deleted the mcmc-recdev-error branch May 24, 2024 14:43
Copy link
Collaborator

@Rick-Methot-NOAA Rick-Methot-NOAA left a comment

Choose a reason for hiding this comment

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

need && in the if() statement. I can fix that in my current active branch,

@iantaylor-NOAA
Copy link
Contributor Author

Good catch, thanks for fixing.

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 this pull request may close these issues.

None yet

3 participants