Increase number of unit numbers available for OMP file opening #2339
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.
Needs testing and approval by @rthedin before merging
Feature or improvement description
We were having problems with the
!OMP
directives around high resolution file reading in AWAE.f90. Since the file reading starts with a call toGetNewUnit
before starting the opening, parallel calls toGetNewUnit
could result in the same unit number handed out to two processes. The first process would open the file and start reading, but then the second process would open a different file with the same unit number causing read errors for both processes as they attempted to read the same file at the same time.To resolve this, an optional start unit number is added to
GtNewUnit
. This optional argument is propagated up through to the calls within the!OMP
loop where aN*100
is used as the starting unit number for the search (whereN
is the turbine number). Theoretically this will solve the parallel file reading issue from AWAE.Routine changes:
GetNewUnit
ReadLowResWindFile
ReadHighResWindFile
UpdateStates
ReadHighResWindFile
includesnt*100
as the start unit numberRelated issue, if one exists
There may be several FAST.Farm issues related to this, but it is unknown at the moment.
Impacted areas of the software
FAST.Farm
AWAE
module file reading of high-res VTK files inside the!OMP
directive inUpdateStates
Additional supporting information