hello, professor.I try to run FAST with simulink in linux, but i met some errors: “the FAST_SFunc does not exist”. And i think the problem is that the FAST_SFunc.mexw64 is not suitable in linux. So, if i want to run FAST in linux, what should i do? Looking forward to your reply.
The “w” in the extension of FAST_SFunc.mexw64 is for “Windows”, so, this binary file cannot be used on Linux. You must compile the OpenFAST S-Function, the OpenFAST dynamic library, and the MAP++ for use on Linux, as documented here: openfast.readthedocs.io/en/main … index.html.
I am sorry to bother again. I read the document you posted, and I downloaded the binaries for Linux. I found four folders in the binaries: bin,include,info,lib. But I could not find any s-function or MAP++ in the folders. Should I generate them by myself? How can I generate them? Looking forward to your reply.
For Linux, the MAP++ library is statically linked in the OpenFAST binaries, so you will not need to compile that separately. The S function is generated by Matlab using the script at github.com/OpenFAST/openfast/bl … ST_SFunc.m. In order to use that script, you’ll first have to compile OpenFAST with the CMake variable BUILD_SHARED_LIBS=ON. The full cmake and make commands are
cmake .. -DBUILD_SHARED_LIBS=ON make openfastlib
You will then see a library at “openfast/build/modules/openfast-library/libopenfastlib.so”. The Matlab script linked above should be able to find the library you’ve just compiled and generate FAST_SFunc binary that links to it.
Please let us know how it goes!
Thanks for your guidance. But I don’t need to run OpenFAST in Linux right now, because I found a windows server to run my program.
Dear Rafael (@Rafael.Mudafort),
I am trying to run Simulink with OpenFAST on my macbook (macOS 12.4). As a first test case I tried to run ‘Run_Test01_SIG.m’ from the OpenFAST GitHub download. Initially I got the same error message as Zhiheng described above, “S-Function ‘FAST_SFunc’ does not exist”. According to this discussion I have to create that S-Function with the MATLAB script ‘create_FAST_SFunc.m’. I activated the SHARED_LIBS with cmake and created the openfastlib, as you described above. But I got the following errors/warnings when I run the ‘create_FAST_SFunc.m’ script. Do you know how to solve this problem?
Looking forward to you reply
It looks like there might be multiple problems.
The first line of your stack trace says the library was built for a newer macOS than being linked. Do you have any insight into that?
Also, Simulink is attempting to link to a static library (
.a), but the docstring in the
create_FAST_SFunc script says it requires a shared library (
.dylib). Could you verify (show the terminal output) that you did compile