-
Notifications
You must be signed in to change notification settings - Fork 465
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
Segmentation error of FAST v8-Simulink using the compiled FAST_SFunc mex file in Linux #567
Comments
Which version of OpenFAST are you using? We recently fixed a bug that would cause a segmentation fault like this. You can either modify the code as explained in this issue: #548 (comment) |
Dear Bonnie, Thank you for your prompt help! I am using a FAST v8, instead of the OpenFAST. It might be the version published in 2016 (FAST_v8.16.00a-bjj). |
It's a little harder to debug something from FAST v8 because it's been a while since I've looked at that code. Your segmentation fault says it's coming from the Segmentation faults typically come because the code is accessing memory that it shouldn't be; that can be caused by sending arrays that are too small between the Fortran (FAST) and C (Simulink) interface, or an index getting set improperly, or arrays not getting allocated before they are used, etc. If you can build and run FAST v8 with the same model you are using here without getting this error, that would point to a problem in the interface (something incompatible in FAST_Library.f90, FAST_Library,h and FAST_SFunc.c). |
Dear all,
As suggested by Jason, I come here to ask for your help.
I am using FAST v8. I was trying to recompile the FAST library and FAST_SFunc Mex file in the Linux system (CentOs 7), in order to run FAST v8-Simulink. By the way I commented out the line 173 of FAST_SFunc.c following this answer viewtopic.php?t=1387 when I created the mex file. The compilation tool is gcc 6.3. The build log of mex file is here:
mex_build.log
Also, I got some warnings when I compiled the FAST_library. The build log has been attached.
build.log
I got both of them successfully in the bin folder: libFAST_Library_glin64.so and FAST_SFunc.mexa64. When I run the S-function in Simulink, Matlab got crashed and I received this segmentation error. I double-checked the compilation of the FAST Library and mex file. I don't know how to deal with this? Can you help me? Thank you so much!
The segmentation error is like this:
The text was updated successfully, but these errors were encountered: