-
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
Ubuntu, S-Function, mex, error message #387
Comments
The short answer is, yes, the incompatible gcc version is likely causing the errors you see. Each version of Matlab has a compilers that it is set up to work with. You may be able to get around this by modifying the relevant files in the I would also run |
I've just got a proper (supported) combination of MATLAB (2017a), gcc 4.9 and Ubuntu 16.04. I wanted to compile openFAST with the current version of gcc, but unfortunately cmake resulted an error message: SIMULINK with GNU is not supported. Should I install Windows and Visual Studio in order to be able to connect openFAST to Simulink? Thank you! |
It looks like the Sys*.f90 file for that combination hasn't been updated in OpenFAST. Basically, you would need to replace the write statements in the SysGnuLinux.f90 file with calls to the Matlab mex print library. I've taken a quick attempt at doing that for you in this branch: https://github.com/bjonkman/openfast/tree/f/SimulinkGNUlinux Let us know if that works. |
Dear Bonnie, thank you for the useful support! Using your proposed branch the cmake and the make command resulted no errors. However the 'install' folder was missing. I created manually the folder and tried to find and copy all of the missing files into it. Then I was able to run create_FAST_SFunc.m in Matlab 2017a without any warning or error message and got the FAST_SFunc.mexa64. I tried to run the openLoop.mdl with AWT_YFix_WSt.fst , but unfortunately it failed with the following error message:
The command line version of openFast successfully simulated the same AWT_YFix_WSt.fst Unfortunately the error message isn't too informative for me. I would be pleased if you could send me some hint to be able to identify the reasons for this error. |
I would guess that Matlab cannot find the |
I forgot to mention, that this was my first and only idea to solve the problem... |
Did you create a file called |
yes, I tried to follow the instructions in the online documentation (2.2. Compile from source) |
If you type @rafmudaf may have some ideas on which dynamic library dependencies are generated with the OpenFAST cmake build process. |
|
Perhaps. You could also try building with |
OK, I'll report the result. Have a nice day and thank you for the support! |
Thank you for the support! Original problem seems to be solved: the
This resulted a Thank you for your support! |
Dear all, While trying to run the simulation using simulink, I receive the following error: Error reported by S-function 'FAST_SFunc' in 'OpenLoop/FAST Nonlinear Wind Turbine/S-Function': My understanding is that the error is because of the extra "CavitCheck" added in the AeroDynV15. Regards, |
Dear Kumara, It sounds like you are using the OpenFAST v.2.2.0 executable, but the FAST v8 S-Function ( The FAST S-Function and FAST Library must be recompiled with OpenFAST. These are not currently supplied in the compiled OpenFAST binaries. (Although perhaps @rafmudaf could provide those.) On Windows, I would recommend compiling using Visual Studio with Intel Fortran. To build the OpenFAST Library, Open up the Best regards, |
Dear JJonkman, After preparing this I found there is another useful link discussion here: |
Thanks for sharing! |
Hi team, Bin folder looks like this I am using;
To choose a different C compiler, select one from the following: |
update Upon executing create_FAST_SFunc.m, I get this error
Creating ../../../build/bin\FAST_SFunc.mexw64 Error using mex Error in create_FAST_SFunc (line 60) |
Those warnings are normal. Did the Visual Studio build process actually generate the Are you running |
Thank you for your response @bjonkman The visual studio build process (Release_MATLAB, x64) did not generate these files ( OpenFAST-Simulink_x64.dll, OpenFAST-Simulink_x64.lib). I am running the create_FAST_SFunc.m from the folder and the required directories are set accordingly in the Matlab. I think since the above-mentioned files are not successfully generated I am getting this error. Regards, |
Thank you for your help in resolving this issue. I was doing everything as you mentioned except for the quotation marks around the path. Now, I am able to generate the required Simulink files. Best Regards, |
Dear @bjonkman |
Dear @saeidfn, Documentation for running FAST v8 interfaced to MATLAB/Simulink is included in the FAST v8 ReadMe file, see: https://drive.google.com/file/d/17LDwMnCVmLfbRWSaVFxxqphVrtawMwlj/view?usp=sharing. The instructions should be basically the same for OpenFAST. Best regards, |
I'm working on establishing a path for distributing the OpenFAST Library compiled for Simulink integration along with the other executables we regularly share for each release. I've added a file included in the last Release called |
Dear Developer,
I would like to run the OpenLoop Simulink model, but unfortunately I've stuck at creating the S-Function. OpenFAST is working seamless in terminal. Several r-tests has been performed, and the new simulation results fulfill the expectations, too. But when I run the 'create_FAST_SFunc.m', I got the error message (see below). MATLAB r2017b and MATLAB r2019b warned on different gcc versions ( both missing in my case), but resulted same undefined references
Can be the problem caused by the missing gcc version? I would like to try other ways before installing a gcc version not supported by Canonical.
Thank you for your great work and persistent efforts to support FAST!
Balazs
MATLAB error:
MATLAB environment
pwd
'/home/bala/OpenFAST/glue-codes/simulink/src'
The final form of mex command:
mex('-largeArrayDims', ...
'-L/home/bala/OpenFAST/install/lib', ...
'-lopenfastlib', ...
'-I/home/bala/OpenFAST/install/include', ...
'-I/home/bala/OpenFAST/modules/supercontroller/src', ...
'-I/home/bala/OpenFAST/modules/openfoam/src', ...
'-outdir', '.', ...
'COMPFLAGS=$COMPFLAGS -MT -D', ...
'S_FUNCTION_NAME=FAST_SFunc', ...
'-output', 'FAST_SFunc', ...
'FAST_SFunc.c');
OpenFAST Version
OpenFAST
Copyright (C) National Renewable Energy Laboratory
Copyright (C) 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.2.0
Compile Info:
Execution Info:
System Information:
The text was updated successfully, but these errors were encountered: