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

Bug fix in allocating tower elevation array #201

Merged
merged 3 commits into from
Nov 13, 2018

Conversation

rafmudaf
Copy link
Collaborator

@rafmudaf rafmudaf commented Nov 9, 2018

This pull request moves an array allocation into an if-statement which determines whether the array should be allocated.

The problem arises when NumTwrNds is not 0 in the input but this block at AeroDyn.f90L928 executes:

   if (p%TwrPotent == TwrPotent_none .and. .not. p%TwrShadow .and. .not. p%TwrAero) then
      p%NumTwrNds     = 0

This causes InitOut%TwrElev to be allocated to an array of length 0 while InputFileData%TwrElev is nonzero so this line at AeroDyn.f90L239 is a seg fault:

InitOut%TwrElev(:) = InputFileData%TwrElev(:)

All regression tests pass since none test this particular case.

@rafmudaf rafmudaf self-assigned this Nov 9, 2018
@rafmudaf
Copy link
Collaborator Author

rafmudaf commented Nov 9, 2018

This also fixes a small bug in the TravisCI configuration and fixes issue #196.

@rafmudaf rafmudaf merged commit 75d0ca8 into OpenFAST:dev Nov 13, 2018
@rafmudaf rafmudaf deleted the bugfix/allocate_twrelev branch November 13, 2018 21:44
@rafmudaf rafmudaf mentioned this pull request Nov 30, 2018
ashesh2512 pushed a commit to ashesh2512/openfast that referenced this pull request Mar 21, 2019
* Check for tower nodes before allocating data

* Bug fix in the travis ci macos configuration

* Resolve a merge conflict
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.

1 participant