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

HydroDyn: check for valid file unit before attempting to close #207

Merged
merged 2 commits into from
Nov 28, 2018

Conversation

rafmudaf
Copy link
Collaborator

Turning off Hdsum in HydroDyn leads to a seg fault since HydroDyn tries to close a file which is not opened to begin with. This pull request checks for a valid file unit before attempting to close the HydroDyn summary file.

This was reported at https://wind.nrel.gov/forum/wind/viewtopic.php?f=4&t=1111&start=15.

Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

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

Thanks, Raf; I agree with this bug fix. Another way to state the IF test (perhaps making it clearer) is to set it to:

IF ( InitLocal%HDSum ) THEN

@rafmudaf
Copy link
Collaborator Author

@jjonkman good call, I've made that change. I'll merge after the automated tests complete.

@rafmudaf rafmudaf merged commit f0c174e into OpenFAST:dev Nov 28, 2018
@rafmudaf rafmudaf deleted the bugfix/hydrodyn_summary_off branch November 28, 2018 03:59
ashesh2512 pushed a commit to ashesh2512/openfast that referenced this pull request Mar 21, 2019
…AST#207)

* Check for valid file unit before attempting to close

* Use a more explicit if-statement condition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants