Closed dzalkind closed 2 years ago
I haven't tried to test the segmentation fault or runtime error, but I see another issue in this case. ElastoDyn is issuing a warning about the initial blade tip displacements being incompatible with the the enabled DOFs. In @dzalkind's case, all blade DOFs are disabled, and so, all the blade displacements should be zeroed (which is also what ElastoDyn does for the tower--that is, all initial tower displacements are ignored when all tower DOFs are disabled. But instead, based on the error message, it appears that some nonzero edgewise displacement is being set. This suggest a bug in the logic within SUBROUTINE ElastoDyn.f90/InitBlDefl() that should be fixed.
@dzalkind -- To avoid this issue before it is fixed, you could set OoPDefl = IPDefl = 0.0 when FlapDOF1 = FlapDOF2 = EdgeDOF = FALSE.
@dzalkind, I didn't run your files, but based on the error in your screenshot, I think the updated code in https://github.com/bjonkman/openfast/tree/b/issue620 will fix the segmentation fault / runtime error issue.
Let us know if that fixes your issue, and I'll submit a pull request to get this fixed on OpenFAST/dev, too.
@bjonkman, this fix works! Thank you!
@jjonkman, thanks for the explanation! This will save me some time when doing linearizations. I was solving for the steady state deflections and using them as initial conditions because I thought OpenFAST was using them as constant offsets in the simulation when the blade/tower DOFs were disabled.
I'm reopening this issue because the second bug--identified in ElastoDyn--has not yet been fixed.
Dear Everyone,
I saw this issue was fixed in the latest dev branch, but I still have similar (segmentation fault) but different errors as below. Do you have any ideas on how to fix this issue? Thank you!
Time: 10 of 20 seconds. Estimated final completion at 18:23:53.
Performing linearization 1 at simulation time 10 s. (RotSpeed=15.65 rpm, BldPitch1=0 deg)
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7f17cdf17d3a
#1 0x7f17cdf16ed5
#2 0x7f17cdb6920f
#3 0x56169ee73fc0
#4 0x56169ece1bb2
#5 0x56169ec80795
#6 0x56169e00e090
#7 0x56169dcf47d5
#8 0x56169dc9e4fb
#9 0x56169dbbccce
#10 0x7f17cdb4a0b2
#11 0x56169dbbcd0d
#12 0xffffffffffffffff
Segmentation fault
@Seager1989, can you compile in debug mode and run the linearization again with the latest dev? That might give an indication of where the segmentation fault is (the stacktrace above is not something I can decipher without more context).
Hi Andy,
I compiled the latest dev in debug mode and run the model again. To save time, I only set 20 s simulation time with the first linearization time at 10 s. The full output with the error is listed below. I do not see much difference but hope you can get useful information.
In addition, I compiled the latest dev with debug mode by (for your reference):
cmake .. -DCMAKE_INSTALL_PREFIX="/home/seager/Downloads/openfast-dev/install" -DBUILD_TESTING=off -DBUILD_SHARED_LIBS=off-DCMAKE_BUILD_TYPE=Debug
If you need any other information, please let me know. Thank you!
**************************************************************************************************
OpenFAST
Copyright (C) 2021 National Renewable Energy Laboratory
Copyright (C) 2021 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-v2.4.0-112-gd8127649-dirty
Compile Info:
- Compiler: GCC version 9.3.0
- Architecture: 64 bit
- Precision: double
- Date: Jan 13 2021
- Time: 16:24:44
Execution Info:
- Date: 01/13/2021
- Time: 21:02:12-0500
OpenFAST input file heading:
FAST Certification Test #24: NREL 5.0 MW Baseline Wind Turbine with OC3 Hywind Configuration,
for use in offshore analysis
Running ElastoDyn.
Nodal outputs section of ElastoDyn input file not found or improperly formatted.
Running AeroDyn.
Nodal output section of AeroDyn input file not found or improperly formatted.
Running InflowWind.
Running ServoDyn.
Running HydroDyn.
Setting WaveTMax to 0.0 since WaveMod = 0
Reading in WAMIT output with root name "./../5MW_Baseline/HydroData/Spar".
Computing radiation impulse response functions and wave diffraction forces.
MAP++ environment properties (set externally)...
Gravity constant [m/s^2] : 9.81
Sea density [kg/m^3] : 1025.00
Water depth [m] : 320.00
Vessel reference position [m] : 0.00 , 0.00 , 0.00
Time: 0 of 20 seconds.
Time: 1 of 20 seconds. Estimated final completion at 21:02:33. Time: 2 of 20 seconds. Estimated final completion at 21:02:33. Time: 3 of 20 seconds. Estimated final completion at 21:02:33. Time: 4 of 20 seconds. Estimated final completion at 21:02:33. Time: 5 of 20 seconds. Estimated final completion at 21:02:33. Time: 6 of 20 seconds. Estimated final completion at 21:02:33. Time: 7 of 20 seconds. Estimated final completion at 21:02:33. Time: 8 of 20 seconds. Estimated final completion at 21:02:33. Time: 9 of 20 seconds. Estimated final completion at 21:02:33. Time: 10 of 20 seconds. Estimated final completion at 21:02:33. Performing linearization 1 at simulation time 10 s. (RotSpeed=15.65 rpm, BldPitch1=0 deg)
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7f0b12811d3a
#1 0x7f0b12810ed5
#2 0x7f0b1264520f
#3 0x7f0b11532f10
#4 0x7f0b1154a1a2
#5 0x7f0b114d1445
#6 0x7f0b12c25940
#7 0x7f0b12c32135
#8 0x56031936fa2b
#9 0x56031928e1fe
#10 0x7f0b126260b2
#11 0x56031928e23d
#12 0xffffffffffffffff
Segmentation fault (core dumped)
You say you have the latest dev branch, but the git hash is from an earlier version from December 11. Could you pull the latest changes from dev and try again? I don't think you have the fix that was merged in #623.
Thank you for pointing this out. I merged the latest update and checked it with the #623 merged. The error is still in there but with some detailed error information. There are many messages so I attached them as a document. Thank you and Andy for your help to fix this problem.
The major error is listed below for your quick review and warnings were reported on the Elastodyn.
Performing linearization 1 at simulation time 10 s. (RotSpeed=15.65 rpm, BldPitch1=0 deg)
openfast: ../../../src/libgfortran/generated/matmul_r8.c:98: matmul_r8_avx: Assertion `GFC_DESCRIPTOR_RANK (a) == 2 || GFC_DESCRIPTOR_RANK (b) == 2' failed.
Program received signal SIGABRT: Process abort signal.
Backtrace for this error:
#0 0x7fdfc9196d01 in ???
#1 0x7fdfc9195ed5 in ???
#2 0x7fdfc8e1420f in ???
#3 0x7fdfc8e1418b in ???
#4 0x7fdfc8df3858 in ???
#5 0x7fdfc8df3728 in ???
#6 0x7fdfc8e04f35 in ???
#7 0x7fdfc92922ee in ???
#8 0x5608bb8dc05c in __ss_radiation_MOD_ss_rad_calccontstatederiv
at /home/seager/Downloads/openfast-dev/openfast/modules/hydrodyn/src/SS_Radiation.f90:480
#9 0x5608bb4d49af in __wamit_MOD_wamit_calccontstatederiv
at /home/seager/Downloads/openfast-dev/openfast/modules/hydrodyn/src/WAMIT.f90:1649
#10 0x5608bb4074b6 in __hydrodyn_MOD_hydrodyn_calccontstatederiv
at /home/seager/Downloads/openfast-dev/openfast/modules/hydrodyn/src/HydroDyn.f90:2006
#11 0x5608bb3f0cdd in __hydrodyn_MOD_hd_getop
at /home/seager/Downloads/openfast-dev/openfast/modules/hydrodyn/src/HydroDyn.f90:3326
#12 0x5608b91f7b20 in __fast_linear_MOD_fast_linearize_op
at /home/seager/Downloads/openfast-dev/openfast/modules/openfast-library/src/FAST_Lin.f90:905
#13 0x5608b900800a in __fast_subs_MOD_fast_linearize_t
at /home/seager/Downloads/openfast-dev/openfast/modules/openfast-library/src/FAST_Subs.f90:5816
#14 0x5608b8b4b88a in fast
at /home/seager/Downloads/openfast-dev/openfast/glue-codes/openfast/src/FAST_Prog.f90:149
#15 0x5608b8b4bcb5 in main
at /home/seager/Downloads/openfast-dev/openfast/glue-codes/openfast/src/FAST_Prog.f90:34
Thanks, That error message helps a lot. I fixed a couple of things in https://github.com/bjonkman/openfast/tree/b/HD_lin. Hopefully that will solve the issue here. I'll create a pull request with this change, too.
Yes, the new branch works well on my side even with some warnings from the Elastodyn. Thank you for your help to fix this problem.
Closing this issue since #634 has been merged to dev
.
I'm reopening this issue because the second bug--identified in ElastoDyn--has not yet been fixed.
There are actually 3 separate issues in this thread, so maybe we should open a new issue for the one that is not yet fixed?
Linearization appears to also be broken in the TCF_mods2 PR #537.
I'm not sure at the moment if this issue should still be open, so I'm going to close it.
One thing to note: I have recently run across a bug where linearization will seg-fault if an invalid channel name was requested AND the LinOutputs
is set to 1. This occured during development of the ServoDyn StC linearization (#803) when an invalid channel was selected. This issue may be present in other modules as well, so if you continue getting seg-faults, verifiy that the output file does not show units of (INVALID)
for a channel.
Bug description I get either a segmentation fault or runtime error (depending on compilation) when trying to linearize on the dev branch with
and only the
GenDOF
is enabled in ElastoDyn.To Reproduce