# questions about running in linux

**URL:** <https://forums.nlr.gov/t/questions-about-running-in-linux/2491>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [June 22, 2021, 2:19pm UTC](https://forums.nlr.gov/t/questions-about-running-in-linux/2491 "2021-06-22T14:19:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhiheng.Liu](https://avatars.discourse-cdn.com/v4/letter/z/e5b9ba/32.png) [@Zhiheng.Liu](https://forums.nlr.gov/u/Zhiheng.Liu)\
**Post date:** [June 22, 2021, 2:19pm UTC](https://forums.nlr.gov/t/questions-about-running-in-linux/2491/1 "2021-06-22T14:19:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [June 22, 2021, 10:44pm UTC](https://forums.nlr.gov/t/questions-about-running-in-linux/2491/2 "2021-06-22T22:44:42Z")

</div>

Dear Zhiheng,

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](https://openfast.readthedocs.io/en/main/source/install/index.html).

Best regards,

---

<div class="post-metadata">

**Author:** ![Zhiheng.Liu](https://avatars.discourse-cdn.com/v4/letter/z/e5b9ba/32.png) [@Zhiheng.Liu](https://forums.nlr.gov/u/Zhiheng.Liu)\
**Post date:** [June 24, 2021, 11:49am UTC](https://forums.nlr.gov/t/questions-about-running-in-linux/2491/3 "2021-06-24T11:49:56Z")

</div>

Dear Jason,

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.

Best regards.

---

<div class="post-metadata">

**Author:** ![Rafael.Mudafort](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Rafael.Mudafort](https://forums.nlr.gov/u/Rafael.Mudafort)\
**Post date:** [July 2, 2021, 6:43pm UTC](https://forums.nlr.gov/t/questions-about-running-in-linux/2491/4 "2021-07-02T18:43:54Z")

</div>

Hi Liu,

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](https://github.com/OpenFAST/openfast/blob/main/glue-codes/simulink/src/create_FAST_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

```auto
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!

---

<div class="post-metadata">

**Author:** ![Zhiheng.Liu](https://avatars.discourse-cdn.com/v4/letter/z/e5b9ba/32.png) [@Zhiheng.Liu](https://forums.nlr.gov/u/Zhiheng.Liu)\
**Post date:** [July 8, 2021, 9:13am UTC](https://forums.nlr.gov/t/questions-about-running-in-linux/2491/5 "2021-07-08T09:13:52Z")

</div>

Dear Rafael,

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.

Best regards.

---

<div class="post-metadata">

**Author:** ![Coen.Smits](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Coen.Smits](https://forums.nlr.gov/u/Coen.Smits)\
**Post date:** [July 21, 2022, 1:58pm UTC](https://forums.nlr.gov/t/questions-about-running-in-linux/2491/6 "2022-07-21T13:58:01Z")

</div>

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?

 ![Error_SFunc](https://europe1.discourse-cdn.com/nrel/original/2X/0/00aebc441e935fbf0913d524e862a7a8363460a7.png)

Looking forward to you reply

---

<div class="post-metadata">

**Author:** ![Rafael.Mudafort](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Rafael.Mudafort](https://forums.nlr.gov/u/Rafael.Mudafort)\
**Post date:** [July 21, 2022, 4:44pm UTC](https://forums.nlr.gov/t/questions-about-running-in-linux/2491/7 "2022-07-21T16:44:02Z")

</div>

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 `libopenfastlib.dylib`?
