Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hkershaw-brown
Copy link
Member

@hkershaw-brown hkershaw-brown commented Sep 21, 2021

fixes the memory corruption in #252

Description:

Moved the check and bail out for nfiles=0 to before the arrays with nfiles are used.

Note I have not addressed the question of whether perfect_model_obs should continue (or not) with empty " " . This bug fix just stops the code having a memory error (this error was preventing perfect_model_obs from exiting properly on mac).

Fixes issue

Fixes: #252

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

Please describe any tests you ran to verify your changes.

Ran lorenz_96 perfect_model_obs with the following namelist option:

output_state_files         = ""

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Version tag

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

@hkershaw-brown
Copy link
Member Author

@nancycollins let me know if you think perfect_model_obs needs a more serious look. This pull request is a quick fix.

Copy link
Collaborator

@nancycollins nancycollins left a comment

Choose a reason for hiding this comment

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

this fixes the core dump and looks good. but PMO should be able to run without writing any output files. that should probably go into an issue at some point.

@hkershaw-brown hkershaw-brown merged commit af74fea into main Sep 21, 2021
@hkershaw-brown hkershaw-brown deleted the bugfix-perfect_model_obs branch September 22, 2021 14:59
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.

bug: perfect_model_obs must have output filenames ... even if not using them.

3 participants