Describe the bug
The attached model is modified from the "simple_small" model included in the r4ss package:
simple_small_forecast_bug.zip
The only changes are turning off the benchmarks and forecast via these lines in the forecast file:
0 # Benchmarks: 0=skip; 1=calc F_spr,F_Btgt,F_msy; 2=calc F_spr,F0.1,F_msy; 3=add F_Blimit;
...
0 # Forecast: -1=none; 0=simple_1yr; 1=F(SPR); 2=F(MSY) 3=F(Btgt) or F0.1; 4=Ave F (uses first-last relF yrs); 5=input annual F scalar
When run with 3.30.24.2 or the pre-release of 3.30.25, it produces an error after estimation. This error did not occur with 3.30.21 (requires removing a line from the starter file to run):
>ss3 -nohess -stopph 0
reading from starter.ss
reading from data file
Data read successful 999
reading forecast file
reading from control file
End of control file successful! 999
Begin setting up parameters ... end of parameter section
Evaluating biology calculations once ... done
- final statistics:
1 variables; iteration 0; function evaluation 0
Function value 7.7039e+02; maximum gradient component mag -3.1391e-14
Exit code = 0; converg criter 1.0000e+01
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 -0.00000 -3.1391e-14 |
Iterations: 2
array bound exceeded -- index too high in prevariable::operator()
To Reproduce
Steps noted above
Expected behavior
Run without array error
Screenshots
No response
Which OS are you seeing the problem on?
No response
Which version of SS3 are you seeing the problem on?
No response
Additional Context
I've looked through the SS_readdata_330.tpl to see if I can find the error but didn't come up with anything. I asked for help from github copilot and it suggested changing this line: 2b19df5 but after creating a branch and pushing that change, I realized that it didn't actually fix the problem. Copilot failed to come up with anything else to fix.
@Rick-Methot-NOAA, my next move would be to more systematically go through the code to isolate where the problem occurs, but do you have an idea for where to look first?
Describe the bug
The attached model is modified from the "simple_small" model included in the r4ss package:
simple_small_forecast_bug.zip
The only changes are turning off the benchmarks and forecast via these lines in the forecast file:
When run with 3.30.24.2 or the pre-release of 3.30.25, it produces an error after estimation. This error did not occur with 3.30.21 (requires removing a line from the starter file to run):
To Reproduce
Steps noted above
Expected behavior
Run without array error
Screenshots
No response
Which OS are you seeing the problem on?
No response
Which version of SS3 are you seeing the problem on?
No response
Additional Context
I've looked through the SS_readdata_330.tpl to see if I can find the error but didn't come up with anything. I asked for help from github copilot and it suggested changing this line: 2b19df5 but after creating a branch and pushing that change, I realized that it didn't actually fix the problem. Copilot failed to come up with anything else to fix.
@Rick-Methot-NOAA, my next move would be to more systematically go through the code to isolate where the problem occurs, but do you have an idea for where to look first?