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

Seg Fault in HydroDyn in v3.5.1 #1863

Closed
dzalkind opened this issue Nov 8, 2023 · 7 comments
Closed

Seg Fault in HydroDyn in v3.5.1 #1863

dzalkind opened this issue Nov 8, 2023 · 7 comments

Comments

@dzalkind
Copy link
Contributor

dzalkind commented Nov 8, 2023

Bug description
I'm getting a seg fault when running OpenFAST v3.5.1 (via conda installation, both locally and on a linux CI) when running HydroDyn and our IEA-22MW reference model.

To Reproduce

Steps to reproduce the behavior:

  1. conda install openfast
  2. clone/download the IEA-22MW reference model
  3. run openfast IEA-22-280-RWT-Monopile.fst
  4. See the error

Expected behavior
A simple test simulation with most modules enabled.

Screenshots, if applicable

 **************************************************************************************************
 OpenFAST

 Copyright (C) 2023 National Renewable Energy Laboratory
 Copyright (C) 2023 Envision Energy USA LTD

 This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY.
 See the "LICENSE" file distributed with this software for details.
 **************************************************************************************************

 OpenFAST-HEAD-HASH-NOTFOUND
 Compile Info:
  - Compiler: GCC version 12.3.0
  - Architecture: 64 bit
  - Precision: single
  - OpenMP: Yes, number of threads: 16/16
  - Date: Oct 20 2023
  - Time: 23:54:21
 Execution Info:
  - Date: 11/08/2023
  - Time: 13:33:58-0700

 OpenFAST input file heading:
     Generated with AeroElasticSE FAST driver

 Running ElastoDyn.
 Nodal outputs section of ElastoDyn input file not found or improperly formatted.
 Running AeroDyn.
 AD15 Nodal Outputs: Nodal output section of AeroDyn input file not found or improperly formatted.
 Skipping nodal outputs.
 Running InflowWind.
 Running HydroDyn.

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x10aeaad96
#1  0x10aea9edd
#2  0x7ff8101a35ec
#3  0x109645540
#4  0x10961af00
#5  0x1088163c3
#6  0x10881fd76
#7  0x1086d6a65
#8  0x109e95b5e
#9  0x7ff80fe1c41e

OpenFAST Version

(iea-env) dzalkind@x86_64-apple-darwin13 IEA-22-280-RWT % conda list | grep openfast
openfast                  3.5.1                h157c8df_0    conda-forge

Additional context
Workarounds (clues :-)):

  • Setting CompHydro to 0 runs okay.
  • Adding Wave1Elev to the output list also works fine.
  • OpenFAST v3.5.0 works okay, too.
@andrew-platt
Copy link
Collaborator

@luwang00, do you have any ideas?

@bjonkman
Copy link
Contributor

bjonkman commented Nov 8, 2023

@dzalkind, does this happen only when HydroDyn doesn't contain ANY outputs? or just when it doesn't contain that specific Wave1Elev output?

I recently found an error in the dev branch (which is significantly different than v3.5.1) that could attempt to pass an unallocated array when no output was selected.

@dzalkind
Copy link
Contributor Author

dzalkind commented Nov 8, 2023

It appears as though it wants some output specified. Does not have to be Wave1Elev.

@luwang00
Copy link
Contributor

luwang00 commented Nov 8, 2023

I also vaguely remember there was a bug with HydroDyn when there's no output channel requested, but I can't find that particular issue.

@andrew-platt
Copy link
Collaborator

I remember seeing this recently as well. Not sure where though. @bjonkman, I suspect the unallocated array passing you found is the issue.

@deslaughter
Copy link
Collaborator

The issue is around Line 3081 of HydroDyn_Input.f90 from the 3.5.1 release. If no outputs are specified then InputFileData%Waves2%NumOuts, InputFileData%Morison%NumOuts, and InputFileData%NumOuts are not set and InputFileData%OutList is not allocated. @bjonkman fixed this in PR #1008 (c9a6153). @andrew-platt should we fix this in a 3.5.2 release?

@deslaughter
Copy link
Collaborator

The rc-3.5.2 branch was created to address this issue and other potential issues with v3.5. You can either use the new branch or add any output variable to HydroDyn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants