-
Notifications
You must be signed in to change notification settings - Fork 463
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
HD/Morison performance improvement, NWTC Lib and BD bug fixes #615
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. fix `ReadFASTbin` for uncompressed files. Previous implementation would have resulted in seg fault or garbage data. 2. added default #else for #if statement in `DispCompileRuntimeInfo` to avoid printing an uninitialized string in (rare) cases 3. Also (not a bug): updated code to use parameter for size of numeric "word" being read to lessen conflicts with Envision.
Find the slope (x-interpolant) only one time, then use that to interpolate all the other dependent variables inside loops. This saved a little over 1% processing time in the case I ran. This could also be used elsewhere in the HydroDyn CalcOutput routines, though I didn't do that, yet.
Though we should probably just add an interface for these routines instead.
Some unallocated arrays are passed as subroutine arguments; my latest debugger is unhappy with this unless we add the "allocatable" attribute to the arguments.
also added some more "allocatable" attributes for unallocated arrays passed to subroutines
andrew-platt
approved these changes
Jan 19, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might cause conflicts with #537, but I would like to merge this before then.
It all looks good to me.
rafmudaf
changed the title
HD/Morison efficiency improvements + minor bug fixes
HD/Morison performance improvement, NWTC Lib and BD bug fixes
Jan 20, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature or improvement description
This pull request increases the efficiency of HydroDyn's Morison CalcOutput routine (based on profiling results), fixes a few minor debugging issues that seem to be related to the latest Intel compiler suite I installed, and updates some minor issues I found in NWTC Library.
Related issue, if one exists
none
Impacted areas of the software
HydroDyn, NWTC_Library, BeamDyn
The details:
HydroDyn
NWTC_Library
#else
statement inDispCompileRuntimeInfo
to prevent any chance of using uninitialized variables there.NWTC_SizeOfNumWord
parameter to use in place of hard-coded values in the input-file parsing routines, for consistency between Envision and NREL code bases.ReadFASTbin
, where trying to read from uncompressed binary files would have resulted in garbage or a seg fault.LoadDynamicLibProc
routines ever fail, to allow calling routines to determine which procedure failed to load (this is potentially used in ServoDyn with loading non-legacy DLLs)BeamDyn
BD_Interp_Pos_CRV
routine. If the compiler initialized the error status variable to a large random number, the code would fail.Test results, if applicable
These changes do not affect the regression tests: https://github.com/bjonkman/openfast/actions/runs/413886628