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

[bugfix] incorrect init of aggregated output index arrays in FAST.Farm #895

Merged
merged 4 commits into from
Oct 27, 2021

Conversation

andrew-platt
Copy link
Collaborator

@andrew-platt andrew-platt commented Oct 26, 2021

This PR is ready for merging.

Feature or improvement description
The arrays WkDfVxTND, WkDfVrTND, EddVisTND, EddAmbTND, EddShrTND are used to aggregate output channels in
FAST_Farm_IO.f90. These had been used prior to actually getting set. So they may point to random garbage in memory.

This error could be caught when the -finit-integer=9999. flag was set on the debug gcc compile. Running the LESinflow or TSinflow case with this debug compile would trigger a segfault such as

    Start 37: LESinflow

37: Test command: /usr/local/bin/python3 "/Users/aplatt/software-development/GitHub/openfast-4/reg_tests/executeFASTFarmRegressionCase.py" "LESinflow" "/Users/aplatt/software-development/GitHub/openfast-4/build-Double-Debug-ff/glue-codes/fast-farm/FAST.Farm" "/Users/aplatt/software-development/GitHub/openfast-4/reg_tests/.." "/Users/aplatt/software-development/GitHub/openfast-4/build-Double-Debug-ff/reg_tests/glue-codes/fast-farm" "0.00001" "Darwin" "GNU"
37: Test timeout computed to be: 5400
37: At line 14886 of file /Users/aplatt/software-development/GitHub/openfast-4/glue-codes/fast-farm/src/FAST_Farm_IO.f90
37: Fortran runtime error: Index '9999' of dimension 1 of array 'invalidoutput' outside of expected range (0:9423)
37:
37: Error termination. Backtrace:
37: #0  0x10ff808cd
37: #1  0x10ff81555
37: #2  0x10ff819e6
37: #3  0x109c8346a
37: #4  0x109ee7738
37: #5  0x109faaf24
37: #6  0x109fab275

This PR also includes additional flags for the intel compiler in debug mode build with cmake to set all reals and integers to large numbers or infinity, which should help catch this kind of issue in those cmake builds. VS builds have not been modified. Also a correction to a flag for the intel debug builds on linux/mac.

Impacted areas of the software
FAST.Farm

Additional supporting information
It doesn't appear than anyone has used these particular outputs, so it may not have affected anyone using FAST.Farm to date. If it did, they would potentially see an invalid channel, or garbage in that channel.

Test results, if applicable
No test results change.

Affected: WkDfVxTND, WkDfVrTND, EddVisTND, EddAmbTND, EddShrTND

Because of the call order, these were used prior to getting set.  Only caught with running in debug in linux with -finit-integer=9999 flag
Should catch unalocated stuff a bit better with intel compiler
@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2021

Codecov Report

Merging #895 (3cc051a) into dev (0789ac2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #895   +/-   ##
=======================================
  Coverage   11.29%   11.29%           
=======================================
  Files         211      211           
  Lines      310557   310557           
  Branches   181045   181045           
=======================================
  Hits        35068    35068           
  Misses     231395   231395           
  Partials    44094    44094           
Flag Coverage Δ
regtests 11.18% <ø> (ø)
unittests 2.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0789ac2...3cc051a. Read the comment docs.

@andrew-platt andrew-platt changed the title [bugfix] incorrect order of aggregated output arrays in FAST.Farm [bugfix] incorrect init of aggregated output arrays in FAST.Farm Oct 26, 2021
@andrew-platt andrew-platt changed the title [bugfix] incorrect init of aggregated output arrays in FAST.Farm [bugfix] incorrect init of aggregated output index arrays in FAST.Farm Oct 26, 2021
@andrew-platt andrew-platt merged commit 9353121 into OpenFAST:dev Oct 27, 2021
@rafmudaf rafmudaf mentioned this pull request Mar 2, 2022
11 tasks
@andrew-platt andrew-platt deleted the b/FF_outs branch June 30, 2022 17:58
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.

4 participants