Vectorize a section of VariousWaves_Init #602
Merged
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 improves the vectorization potential of a set of initialization lines in the Waves submodule of HydroDyn. This is relatively small performance improvement as it saves only about 3 seconds of initialization time in the offshore 5MW cases. Its also a fixed-cost improvement since it is in the init; that is, the speed up is similar whether the simulation duration is 60 seconds or 1 second. In any case, faster is faster :)
I've also added commented flags for getting profiling and performance information from the Intel compiler in the CMake configuration. See the attached optimization reports for details regarding the vectorization improvements by the compiler due to this change. These are best viewed as a side-by-side diff.
One question is whether the bounds of the loop are meaningful in the current version. The outer loop goes from 0 to
InitOut%NStepWave-1
, but all of the variables accessed in the loop are allocated to0:InitOut%NStepWave
in their first dimension. Is the last index of the first dimension required to be empty or uninitialized?Related issue, if one exists
None
Impacted areas of the software
Waves submodule of HydroDyn:
VariousWave_Init
subroutineAdditional supporting information
This was funded by Intel through their designation of NREL as an Intel Parallel Computing Center (IPCC). The objective was to improve the vectorization of the offshore module by using the Intel compiler and related tools. We wanted to get as much speed up as possible without making significant changed to the OpenFAST source code.
current_Waves.f90.optrpt.log
incoming_Waves.f90.optrpt.log