nmfs-ost / nmfs-ost/ss3-source-code

[Bug]: crash when do_recdev = 0 is combined with SRR option 7 (but work-around is available)

Open
#560 0 comments 0 reactions 1 assignee View on GitHub

@Rick-Methot-NOAA is already working on this.

Since Feb 1, 2024.

recruitment
Dominant language
C++
Stars
46
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

@quang-huynh reported an issue with combining SRR option 7 with the setting do_recdev = 0, which leads to the following error:

Finished calculating benchmarks
array bound exceeded -- index too high in prevariable::operator()

The error does not occur when the Beverton-Holt stock-recruit option is used.
This is a low priority to fix because the recdevs can be turned off via negative phase instead of do_recdevs, but good to have reported here anyway so we have a record of the problem if it happens to anyone else.

If a fix isn't easy to find, we could add a warning saying to use negative phase instead of do_recdevs when working with SRR option 7.

To Reproduce

Within Spinydogfish_2011 in test-models, change do_recdevs from 1 to 0 on this line and run with a recent SS3 executable
https://github.com/nmfs-ost/ss3-test-models/blob/main/models/Spinydogfish_2011/Spiny_Dogfish.CTL#L128.

Expected behavior

@quang-huynh says that the combination of SRR option 7 and do_recdev = 0 worked in SS version 3.30.16.

Screenshots

No response

Which OS are you seeing the problem on?

Windows

Which version of SS3 are you seeing the problem on?

3.30.22.1

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.