Using FAST on Apple Computer via MATLAB R2010a 32-bit

Hello all,

I just want to prompt everyone that I just learned about FAST about a few days ago and took the initiative to as much reading on the user guide and this forum before posting this thread. With that said, I also want to state that I am very good at following directions and am open to any and all suggestions and I will be as thorough as possible. I think this thread could be extremely helpful to new users attempting to run FAST via Apple computers on MATLAB as I have found seldom threads relevant to the obstacles I am coming up on.

A question I have for everyone is this: When running FAST on MATLAB via macbook, what obstacles did you have to overcome? I am still learning the fundamentals of the interface and am still studying the user guide very closely, but one issue I run into is missing files, like the dynamic-link-library file for the FAST_SFunc. When I downloaded the Linux archive file for FAST v7, it did not contain the FAST_SFunc.dll file, but had a make_FAST_SFun.m file, but I am still working the kinks out on this.

I want to move forward towards running the different Test Certified files and learn the ins and outs of this software so I can begin researching with my prof. Any help will be much help.

To give you all some insight to some errors I am running into:


make_FAST_SFunc
intelf12msvs2010shellopts.bat: line 1: @echo: command not found
intelf12msvs2010shellopts.bat: line 2: rem: command not found
intelf12msvs2010shellopts.bat: line 3: rem: command not found
intelf12msvs2010shellopts.bat: line 4: rem: command not found
intelf12msvs2010shellopts.bat: line 5: rem: command not found
intelf12msvs2010shellopts.bat: line 6: syntax error near unexpected token (' intelf12msvs2010shellopts.bat: line 6: rem 2010 Shell (Integrated) SP1 linker.’
intelf12msvs2010shellopts.bat: line 1: @echo: command not found
intelf12msvs2010shellopts.bat: line 2: rem: command not found
intelf12msvs2010shellopts.bat: line 3: rem: command not found
intelf12msvs2010shellopts.bat: line 4: rem: command not found
intelf12msvs2010shellopts.bat: line 5: rem: command not found
intelf12msvs2010shellopts.bat: line 6: syntax error near unexpected token (' intelf12msvs2010shellopts.bat: line 6: rem 2010 Shell (Integrated) SP1 linker.’


→ options file specified on command line:
FILE = intelf12msvs2010shellopts.bat

→ MATLAB = /Applications/MATLAB_R2010a.app
→ CC =
→ CC flags:
CFLAGS =
CDEBUGFLAGS =
COPTIMFLAGS =
CLIBS =
arguments = -DMX_COMPAT_32
→ CXX =
→ CXX flags:
CXXFLAGS =
CXXDEBUGFLAGS =
CXXOPTIMFLAGS =
CXXLIBS =
arguments = -DMX_COMPAT_32
→ FC =
→ FC flags:
FFLAGS =
FDEBUGFLAGS =
FOPTIMFLAGS =
FLIBS =
arguments = -DMX_COMPAT_32
→ LD =
→ Link flags:
LDFLAGS =
LDDEBUGFLAGS =
LDOPTIMFLAGS =
LDEXTENSION =
arguments =
→ LDCXX =
→ Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments =

??? Error using ==> mex at 222
Unable to complete successfully.

Error in ==> make_FAST_SFunc at 66
mex(’-v’
, … %verbose


I have successfully, on different sessions, run simsetup and read Test01.fst but running the simulation in simulink yields an error stating that: “Error in S-function ‘OpenLoop/FAST Nonlinear Wind Turbine/S-Function’: S-Function ‘FAST_SFunc’ does not exist”, which, looking back through the archive that I downloaded, I did not find such dynamic-link-library (dll). I read on another forum that the .dll got changed to a .mexw32/64 file but for Linux/Mac (in my case), what would I need to look for or do? Do I need to do another step not included in the user guide?

Thanks everyone ahead of time. If you need more information, I am happy to be more thorough.

Regards,

Cameron Lucero
KSU MNE Graduate Student

Hi, Cameron.

Because the FAST_SFunc.mexw32 file contains Windows(R) executable code, we don’t distribute it in the Linux/Mac archive. It wouldn’t run on your computer. We don’t support FAST_SFunc for Mac, so if you need code that runs on Mac, you will have to generate FAST_SFunc.mexmaci64 yourself, using make_FAST_SFunc.m with modified paths to the source code and your own FortranOptionsFile. This can be a non-trivial task.

I’d suggest you read about generating Matlab mex functions on a Mac. I’m not sure Matlab supports the Intel Fortran compiler for Mac, so you may have the added challenge of using gfortran. There are probably some Matlab examples that may help you figure out what you need to change in FAST for Simulink (e.g. mathworks.com/help/matlab/ma … -file.html).

The intelf12msvs2010shellopts.bat file is basically a Windows batch file that sets compilng options and the paths for the Intel Fortran compiler. I’m sure you will need to find a different options file for Mac. (This options file is used instead of changing the default compiler so that we can also change some compiling options specifically for FAST. There are some instructions at the top of make_FAST_SFunc.m that indicate how to get create this file on Windows–hopefully you can glean some information there that is useful on Mac.)

Best of luck!