nmfs-ost / ss3-source-code

The source code for Stock Synthesis (SS3).
https://nmfs-ost.github.io/ss3-website/
Creative Commons Zero v1.0 Universal
36 stars 16 forks source link

[Bug]: Report file writing issue #567

Closed kinmic closed 5 months ago

kinmic commented 6 months ago

Describe the bug

Occasional simulation iterations cannot be read by get_results_all() due to a gap in the age length key in the report file (See attached file line 3987). This seems to only affect certain iterations and causes an error in the get_results_all() function. The iteration has a positive determinant hessian, however the final gradient is quite high (0.012) so the issue may be related to convergence. Manually editing the line and removing whitespace allow the file to be read.

SS3 version: 3.30.19.01 r4ss version: 1.49.1 ss3sim version: 1.20.1

em - Copy.zip Report_SS0.txt

To Reproduce

The error occurred regardless of how I ran the model. The methods i tried were ss3sim (run_ss3sim()), r4ss::run() and via the command line.

Expected behavior

I expected the report file to be written as normal. Other iterations of the same simulation set up (identical scenarios with the expected the rec-devs) were run at the same time and were written correctly.

Screenshots

image

Which OS are you seeing the problem on?

Windows

Which version of SS3 are you seeing the problem on?

3.30.19.01

Additional Context

OS details: Edition Windows 11 Pro Version 22H2 Installed on ‎10/‎13/‎2022 OS build 22621.3007 Experience Windows Feature Experience Pack 1000.22681.1000.0

e-perl-NOAA commented 6 months ago

@Rick-Methot-NOAA I have been emailing Mico who is in Jason's class right now about this issue. I told him to go ahead and make an issue about it so that we have it documented. I haven't been able to replicate the issue locally and neither has Jason. I will spend some more time this week digging into it and seeing if I can replicate the issue.

Rick-Methot-NOAA commented 6 months ago

@kinmic. I see that this is occurring with an older (3.30.19) version of the code. Since then, there have been some fixes that solved at least one memory leak. I suggest updating to 3.30.22.01.

Rick-Methot-NOAA commented 5 months ago

@kinmic Please check again to see if newer issue resolves the issue so we can close this. Rick

kinmic commented 5 months ago

@Rick-Methot-NOAA Updating to the newer version did not fix the issue. However I think it must be machine specific as I cannot reproduce the error on any other computer.

Rick-Methot-NOAA commented 5 months ago

Is your computer unique in any way? Does it have at last 16BG RAM? Please send your model input files to nmfs.stock.synthesis@noaa.gov so I can check to see if there is any clue as to what is going on.

kinmic commented 5 months ago

No computer has a fairly standard set up details are Make/model: Dell Precision 3660 RAM: 32 GB Processor: 12th Gen Intel(R) Core(TM) i9-12900K, 3200 Mhz, 16 Core(s), 24 Logical Processor(s)

Sure I can send on the model input files.

kinmic commented 5 months ago

Closing this as changing the saving location for the simulations seems to have fixed the issue, though still not sure what may have been interfering with the report. Thanks @Rick-Methot-NOAA and @e-perl-NOAA for all your help.