Instructions for Compiling FAST

Dear all,

I have the same problem as Etana (see previous post).

I’ll be very pleased if someone could help us.

Thank you in advance.

----- EDIT: Question Solved -----
The problem is that Intel Parallel Studio XE2017 no longer accepts the attribute ALIAS, so it is necessary to modify OrcaFlexInterface.F90 this way:

   ABSTRACT INTERFACE      ! These are interfaces to the DLL

#ifdef __GFORTRAN__
      SUBROUTINE OrcaFlexUserPtfmLdInitialise(DT,TMax)   BIND(C)
      SUBROUTINE OrcaFlexUserPtfmLdInitialise(DT,TMax)   !!!BIND(C)
!         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'OrcaFlexUserPtfmLdInitialise'::OrcaFlexUserPtfmLdInitialise
         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE ::OrcaFlexUserPtfmLdInitialise ! <<<<<<<<<<<<<<<<<<<<<<< MOD
         !GCC$ ATTRIBUTES STDCALL :: OrcaFlexUserPtfmLdInitialise
         REAL(C_FLOAT),             INTENT(IN   )  :: DT
         REAL(C_FLOAT),             INTENT(IN   )  :: TMax
      END SUBROUTINE OrcaFlexUserPtfmLdInitialise

#ifdef __GFORTRAN__
      SUBROUTINE OrcaFlexUserPtfmLd( X, XD, ZTime, DirRoot, PtfmAM, PtfmFt) BIND(C)
      SUBROUTINE OrcaFlexUserPtfmLd( X, XD, ZTime, DirRoot, PtfmAM, PtfmFt) !!!BIND(C)
!         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'OrcaFlexUserPtfmLd'::OrcaFlexUserPtfmLd
         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE ::OrcaFlexUserPtfmLd ! <<<<<<<<<<<<<<<<<<<<<<< MOD
         !GCC$ ATTRIBUTES STDCALL :: OrcaFlexUserPtfmLd
         CHARACTER(KIND=C_CHAR),    INTENT(IN   )  :: DirRoot
         REAL(C_FLOAT),             INTENT(IN   )  :: X(6)           !< Translational and rotational displacement (m, radians) relative to inertial frame.
         REAL(C_FLOAT),             INTENT(IN   )  :: XD(6)          !< Translational and rotational velocity (m/s, radians/s) relative to inertial frame.
         REAL(C_FLOAT),             INTENT(IN   )  :: ZTime          !< Current time in seconds
         REAL(C_FLOAT),             INTENT(  OUT)  :: PtfmAM(6,6)    !< Added mass matrix (kg, kg-m, kg-m^2)
         REAL(C_FLOAT),             INTENT(  OUT)  :: PtfmFt(6)      !< Platform forces -- [3 translation (N), 3 moments (N-m)] at reference point.
      END SUBROUTINE OrcaFlexUserPtfmLd

#ifdef __GFORTRAN__
      SUBROUTINE OrcaFlexUserPtfmLdFinalise()  BIND(C)
      SUBROUTINE OrcaFlexUserPtfmLdFinalise()  !!!BIND(C)
!         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS: 'OrcaFlexUserPtfmLdFinalise'::OrcaFlexUserPtfmLdFinalise
         !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE ::OrcaFlexUserPtfmLdFinalise ! <<<<<<<<<<<<<<<<<<<<<<< MOD
         !GCC$ ATTRIBUTES STDCALL :: OrcaFlexUserPtfmLdFinalise
         ! There is no data to pass.
      END SUBROUTINE OrcaFlexUserPtfmLdFinalise


Best Regards,

Dear Jason/Bonnie

I have a question re FAST v8 Simulink. I’m trying to re-compile the s-function so to generate c-code into a target processor for Hardware-in-the-loop simulation, using a dSPACE platform (ds1103) which is based on a PowerPC processor.

The compilation of the 64 bit FAST_SFunc.c into a MEX function into MATLAB’s workspace was successful (had to do it with Microsoft SDK 7.1 according to the dSPACE manufacturer guidelines).
The problem arises when I’m pressing ‘Build Model’ inside the Simulink environment. Here is where the entire Simulink model (including the FAST s-function) is converted into c code for the dSPACE to run it using a PowerPC specific compiler. After several trials I had to modify the FAST_SFunc.c file so to eliminate the following compilation errors:

COMPILING "C:\FAST_v8\Simulink\Source\FAST_SFunc.c" (E) C0256; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 237 pos 28; invalid redeclaration of type name "mxArray" (declared at line 41 of "C:\PROGRA~1\MATLAB\R2016b\rtw\c\src\rt_matrx.h") typedef struct mxArray_tag mxArray; ^ (E) C0256; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 257 pos 18; invalid redeclaration of type name "mxChar" (declared at line 44 of "C:\PROGRA~1\MATLAB\R2016b\rtw\c\src\rt_matrx.h") typedef CHAR16_T mxChar; ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 264 pos 5; "mxUNKNOWN_CLASS" has already been declared in the current scope mxUNKNOWN_CLASS = 0, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 265 pos 5; "mxCELL_CLASS" has already been declared in the current scope mxCELL_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 266 pos 5; "mxSTRUCT_CLASS" has already been declared in the current scope mxSTRUCT_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 267 pos 5; "mxLOGICAL_CLASS" has already been declared in the current scope mxLOGICAL_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 268 pos 5; "mxCHAR_CLASS" has already been declared in the current scope mxCHAR_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 270 pos 5; "mxDOUBLE_CLASS" has already been declared in the current scope mxDOUBLE_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 271 pos 5; "mxSINGLE_CLASS" has already been declared in the current scope mxSINGLE_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 272 pos 5; "mxINT8_CLASS" has already been declared in the current scope mxINT8_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 273 pos 5; "mxUINT8_CLASS" has already been declared in the current scope mxUINT8_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 274 pos 5; "mxINT16_CLASS" has already been declared in the current scope mxINT16_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 275 pos 5; "mxUINT16_CLASS" has already been declared in the current scope mxUINT16_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 276 pos 5; "mxINT32_CLASS" has already been declared in the current scope mxINT32_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 277 pos 5; "mxUINT32_CLASS" has already been declared in the current scope mxUINT32_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 278 pos 5; "mxINT64_CLASS" has already been declared in the current scope mxINT64_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 279 pos 5; "mxUINT64_CLASS" has already been declared in the current scope mxUINT64_CLASS, ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 282 pos 5; "mxOBJECT_CLASS" has already been declared in the current scope mxOBJECT_CLASS, /* keep the last real item in the list */ ^ (E) C0256; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 290 pos 3; invalid redeclaration of type name "mxClassID" (declared at line 33 of "C:\PROGRA~1\MATLAB\R2016b\rtw\c\src\rt_mxclassid.h") } mxClassID; ^ (E) C0101; "C:\PROGRA~1\MATLAB\R2016b\extern\include\matrix.h", line 297 pos 5; "mxREAL" has already been declared in the current scope mxREAL, ^ 20 Errors COMPILING FAILED (1)

After commenting the problematic code lines, the compilation of ‘FAST_SFunc.c’ seems to be getting somewhere, however there is only one remaining error which I’m showing you with at the screenshot:

I tried the same in another piece of RT Hardware (from another manufacturer) that uses the gcc compiler and the error seems to be similar:

Latest logbook entries: 
### ------------------------------------------------------------------------------------------------------------------------------
33 	I 	0x3a43 	mMSYS 	04-18-2017 	SYS_MAIN: MSys-Software successfully started.
34 	I 	0x4220 	mRES 	04-18-2017 	DBG_INIT: 'DBG' successfully started.
35 	I 	0x98ea 	bSWGIO212 	04-18-2017 	SWGIO212: Module deleted.
36 	E 	0x8d73a9 	mMOD 	04-18-2017 	Undefined symbol: _FAST_End (binding 1 type 0)
37 	E 	0x8d73a9 	mMOD 	04-18-2017 	Undefined symbol: _FAST_Sizes (binding 1 type 0)
38 	E 	0x8d73a9 	mMOD 	04-18-2017 	Undefined symbol: _FAST_Update (binding 1 type 0)
39 	E 	0x8d73aa 	mMOD 	04-18-2017 	Undefined symbol: _FAST_Start (binding 1 type 0)
40 	E 	0x8d73b9 	mMOD 	04-18-2017 	MOD_LOADVXW: Error mod=028 status=01 in loadModule() file '/ram0/wt21_v.o'!
41 	I 	0x8d73b9 	mMOD 	04-18-2017 	MOD_LOADVXW: Unloading Module /ram0/wt21_v.o because of unresolved symbols
42 	E 	0x8d73bc 	mMOD 	04-18-2017 	MOD_RPCINST1: Module not installed!
------------------------------------------------------------------------------------------------------------------------------ ###
The call to m1target_make_rtw_hook, during the exit hook generated the following error:
    Could not install SW-Module on the M1 controller

The build process will terminate as a result.
Caused by:
Could not install SW-Module on the M1 controller
Component: Simulink | Category: Model error

I would appreciate any light on this problem.

Many thanks,
Juan Pablo

Dear all,

I was compiling FAST as ‘FASTCompilingIntructions’ says but I get a error message,

ERROR: Visual Studio 2015 is not found in the system.

This error can be because the Visual Studio shortcut path is not right written?

I do like this in ‘Compile_FAST.bat’:

CALL “C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\bin\ipsxe-comp-vars.bat” ia32 vs2015

Probably those points between numbers (2017.2.187) couses the error?

Thank you in advance,

I am trying to compile FAST 8.16 using VS2013 e Intel Parallel XE 2017.
I modified the OrcaFlexInterface by substituting “ABSTRACT INTERFACE” with only “INTERFACE”.
The amount of errors has now decresead from 100 to 31. But I don’t know how to fix these ones.
Please see the screenshot attached for the VS errors.

Thank you.

Dear Dr. B. Jonkman,

Very recently I have downloaded FAST_V8. After several days of reading PDF files and Q&A in the forum, finally, I could learn how to run FAST at windows command (cmd) and analyze the example files in CertTest folder, like “Test20.fst”. Now I want to model my own Offshore wind turbine with some specific wind and wave conditions. Is it possible for you to please guide me how I can do that? Is it like I should open e.g. “Test20.fst” as a text file and then modify it to my favorite problem? If so, can you please tell me the process of modification of the file? I would appreciate it if you can provide any help or useful PDF files ( Thank you, Dr. Jonkman.

Best regards,

Dear Mahmoud,

As I mentioned to you in another forum topic:, for any FAST input file, open up the file in any text editor, make the desired changes, save, and run FAST with the updated input file(s).

The wind conditions are specified in the InflowWind input file and the wave conditions are specified in the HydroDyn input file.

Best regards,

Deat Jason,

I am trying to compile FAST on Linux Ubuntu 14.04 following the instructions.
Everyhing ran smooth with the Registry and MAP++ things.
Anyway, when I run the make command in the Compiling directory, at the end I got error messages related to
crt1.o file

/usr/bin/ld: impossibile trovare crt1.o: File o directory non esistente
/usr/bin/ld: impossibile trovare crti.o: File o directory non esistente
…/bin/ error adding symbols: Formato del file errato
collect2: error: ld returned 1 exit status

Can you help me finding a workaround?

Thanks a lot.

Best regards,


Hi, Luca.

Looks like you have a linking error, likely due to some path incorrect path.
I’d recommend cloning the OpenFAST repository on GitHub ( and using cmake. If you have questions about compiling it, you can post in the GitHub Issues page there.


I am using Visual Basic 2017 for compiling FAST V8, but unfortunately, I am getting a series of errors. I have listed all the errors in the attached file.
please check and revert if someone has an answer.

Zahir Azam
FAST ERROR.docx (14.7 KB)


The first errors about InflowWind’s UniformWind submodule might be due to something wrong in the auto-generated IfW_UniformWind_Types.f90 file. If you add a space in the IfW_UniformWind.txt file, it should regenerate that file. (If that doesn’t work, you could probably grab this file, but I’m not sure if it is the same version you need.)

These errors:

error #6994: A procedure in an ABSTRACT interface must not be specified with DEC$ ALIAS or DEC$ ATTRIBUTES ALIAS

were fixed in OpenFAST and are also discussed/addressed earlier in this topic. If you double-click on the lines with the errors in Visual Studio, it will take you to the location in the code that it’s complaining about. If you remove the word “ABSTRACT” from those “ABSTRACT INTERFACE” definitions in OrcaFlex, that should fix the problem.

Hopefully that helps.

I wanted to use aerodyn multitable capable of FAST v8.12 in order to trailing edge flap scheme and instead of using Reynolds number and multitable for various reynolds number I used flap angle and table for flap angle. also I wanted to control flap angle with simulink interface of FAST.
So, I followed the Instructions for adding codes to source files such as "FAST_Library.f90, FAST_Prog.f90, FAST_Subs.f90, FAST_Types.f90 ". this instructions presented by Dr. Xiao Sun.
Then I finally debugged “Simulink\VisualStudio, FAST_Library.vfproj” file with “Intel parallel studio XE 2013 with vs2010” successfully and without any errors. I want to know, was my compiling action right? or it needs another more to do?
Thank you


I am trying to compile FAST on a Ubuntu Linux 64 bit system. Following the compiling instructions, I have successfully created the registry.exe and files and moved them too the appropriate folders. When I try to compile the FAST executable however, I run into issues with the makefile. The error I recieve is listed below:

gfortran -I Obj_lin64 -O2 -m64 -fbacktrace -ffree-line-length-none -x f95-cpp-input -DNO_LibLoad -DUSE_DLL_INTERFACE -c ../Source/FAST_Types.f90 -o Obj_lin64/FAST_Types.o -J Obj_lin64 -B Obj_lin64
gfortran: internal compiler error: Killed (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
makefile:416: recipe for target 'FAST_Types.o' failed
make: *** [FAST_Types.o] Error 4

I have updated to the latest gfortran compilers. The error seems to occur exclusively with “Fast_Types.o”, I have attempted to run this multiple times. I have tried to compile for 32 and 64 bit and the same error occurs.

Would anyone have a suggestion as to what might be causing this error?

Kind regards,
Luke Cunningham

Hi all,

I have compiled openFAST on my Linux system and am trying to run Test Case 24. The Servodyn Driver for the OC3 Hywind does not seem to have been created during the compilation. I also compiled the r-test suite, where the driver was created for windows (.dll) rather than for linux (.so). Is it necessary to compile these drivers independently? If so, do any makefiles exist for this compilation?

Luke Cunningham

Hi Luke,

I believe you are referring to the ServoDyn external controllers when you say “Servodyn Driver”. In the OpenFAST testing framework, these are called “DISCON.dll”, “DISCON_OC3Hywind.dll”, and “DISCON_ITIBarge.dll”.

The “.dll” suffix is simply for compatibility with the regression test input files. On linux, that library is actually a shared object, but its renamed after it is compiled. Without this, we would have to maintain a set of input files for each system.

The controllers are included as targets in the cmake configuration. You can verify this by running “make help” and looking for “DISCON_OC3Hywind”. If those don’t show up, verify that the BUILD_TESTING cmake flag is on and that the contents of “openfast/reg_tests/r-test” exist (in other words, that the r-test git submodule is initialized and updated). If that looks ok, you should compile and install these drivers with the “make install” command. See the OpenFAST regression test documentation for more details: … figuration.

Dear Jason,

unfortunately compilation of OpenFAST is still an issue for me. Could you provide the newest version of OpenFAST (2.0.0 or even 2.1.0) as *.exe for Windows?
Can you give a hint on how to compile OpenFAST without Visual Studio as 32bit version on Windows?

Thank you very much.

Best regards,

Dear Simon,

A compiled Windows executable of OpenFAST v2.0.0 is included on the release page of OpenFAST–see:

Documentation on how to compile OpenFAST is included on Read the Docs: … index.html. From my experience, the use of Visual Studio is the easiest / best way of compiling OpenFAST on Windows.

Best regards,

Dear Jason,

I am using OpenFast v2.1.0. I am trying to recompile DISCON.f90, but I am encountering some problems. You can see how it compiles in Compile.jpg. I get this warning: “Illegal preprocessor directive”, but it still compiles.

Then, I copy/paste the resulting DLL into the folder in which I am executing OpenFast. When I execute OpenFast (it worked perfectly fine before i tried to implement this change), I get this error “FAST_InitializeAll:SrvD_Init:BladedInterface_Init:The dynamic library
C:\Users\0272014\Desktop\PruebasFAST\VESTAS PRUEBA FAST\DISCON_x64.DLL could not be loaded. Check
that the file exists in the specified location and that it is compiled for 64-bit applications.”

I am using GFortran for 64 bit applications. (MinGW-w64)

I have been trying to fix this problem, but I don’t know if the error is due to the warning compiling the DLL, or it is due to my compiler being installed in a wrong way, or even another issue.

Thank you in advance.


Dear Jason,

I managed to solve the problem of the execution of FAST, it was just an stupid typo mistake, but I am still concerned about the warning during the compiling of DISCON.

Hope you can help me with that.



You need to tell the compiler to preprocess the source file. With gfortran, you add the “-cpp” option to the build command that you used (on Intel Fortran, you use ‘-fpp’):

gfortran -cpp -c -fPIC DISCONChanges.f90

In these particular source files, though, the preprocessor directives are used to skip some code that causes errors when building on Linux or Mac OS. So, I’m pretty sure that the DLLs you created are exactly the same as if you had used the “-cpp” option.

Hello Bonnie,

Thank you for your quick response.
Adding -cpp removed the warning in the code.
Also, as you predicted, the behaviour of both DLLs (with warning and without warning) is exactly the same when executing OpenFast.

I really appreciate your help.
Best regards,