Instructions for Compiling FAST

Provide feedback, request enhancements, and get help with wind-turbine computer-aided engineering tools.

Moderators: Bonnie.Jonkman, Jason.Jonkman

JuanPablo.Echenique
Posts: 1
Joined: Mon Apr 10, 2017 5:07 am
Organization: University of Edinburgh
Location: UK

Re: Instructions for Compiling FAST

Postby JuanPablo.Echenique » Thu Apr 20, 2017 3:24 am

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:

Code: Select all

 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:

FAST_dSPACE_logError.png
FAST_dSPACE_logError.png (274.97 KiB) Viewed 6711 times



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:

Code: Select all


Latest logbook entries:
### ------------------------------------------------------------------------------------------------------------------------------
33    I    0x3a43    mMSYS    04-18-2017 16.44.31.474+0000    SYS_MAIN: MSys-Software successfully started.
34    I    0x4220    mRES    04-18-2017 16.44.32.481+0000    DBG_INIT: 'DBG' successfully started.
35    I    0x98ea    bSWGIO212    04-18-2017 16.44.43.590+0000    SWGIO212: Module deleted.
36    E    0x8d73a9    mMOD    04-18-2017 18.01.39.109+0000    Undefined symbol: _FAST_End (binding 1 type 0)
37    E    0x8d73a9    mMOD    04-18-2017 18.01.39.109+0000    Undefined symbol: _FAST_Sizes (binding 1 type 0)
38    E    0x8d73a9    mMOD    04-18-2017 18.01.39.110+0000    Undefined symbol: _FAST_Update (binding 1 type 0)
39    E    0x8d73aa    mMOD    04-18-2017 18.01.39.110+0000    Undefined symbol: _FAST_Start (binding 1 type 0)
40    E    0x8d73b9    mMOD    04-18-2017 18.01.39.117+0000    MOD_LOADVXW: Error mod=028 status=01 in loadModule() file '/ram0/wt21_v.o'!
41    I    0x8d73b9    mMOD    04-18-2017 18.01.39.117+0000    MOD_LOADVXW: Unloading Module /ram0/wt21_v.o because of unresolved symbols
42    E    0x8d73bc    mMOD    04-18-2017 18.01.39.119+0000    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

Joannes.Olondriz
Posts: 38
Joined: Mon Nov 30, 2015 4:13 am
Organization: IK4-Ikerlan
Location: Spain

Re: Instructions for Compiling FAST

Postby Joannes.Olondriz » Wed May 10, 2017 6:32 am

Dear all,

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

CMD_Error.png
CMD_Error.png (16.68 KiB) Viewed 6658 times


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,
JOE
Joannes Olondriz
Engineer | IK4-Ikerlan

Control and Monitoring area, IK4-Ikerlan (Olandixo)
20500 Arrasate-Mondragon (Gipuzkoa). Spain
Paseo J.Mª Arizmendiarrieta, 2
(+34)943 712400 | jolondriz@ikerlan.es

Gabriele.Barbanti
Posts: 24
Joined: Tue Sep 12, 2017 4:56 am
Organization: University of Florence
Location: Italy

Re: Instructions for Compiling FAST

Postby Gabriele.Barbanti » Tue Sep 12, 2017 6:27 am

Hello,
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.
Gabriele
Attachments
VS2013 error.png
VS2013 error.png (208.85 KiB) Viewed 6434 times

Mahmoud.Mousavi
Posts: 7
Joined: Mon Nov 06, 2017 6:47 am
Organization: National Taiwan University
Location: Taiwan

Re: Instructions for Compiling FAST

Postby Mahmoud.Mousavi » Sun Nov 12, 2017 7:25 pm

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 (musavi6889@yahoo.com). Thank you, Dr. Jonkman.

Best regards,
Mahmoud

Jason.Jonkman
Posts: 4280
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Instructions for Compiling FAST

Postby Jason.Jonkman » Mon Nov 13, 2017 6:26 am

Dear Mahmoud,

As I mentioned to you in another forum topic: viewtopic.php?f=4&t=1382&start=15, 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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Luca.Greco
Posts: 2
Joined: Wed Dec 06, 2017 6:46 am
Organization: CNR
Location: Italy

Re: Instructions for Compiling FAST

Postby Luca.Greco » Wed Dec 06, 2017 7:46 am

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/libmap-1.20.10.so: 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,

Luca

Bonnie.Jonkman
Posts: 558
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Instructions for Compiling FAST

Postby Bonnie.Jonkman » Mon Jan 22, 2018 9:35 pm

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 (https://github.com/OpenFAST/openfast) and using cmake. If you have questions about compiling it, you can post in the GitHub Issues page there.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Zahir.Azam
Posts: 1
Joined: Tue Aug 07, 2018 3:07 am
Organization: Self
Location: Germany

Re: Instructions for Compiling FAST

Postby Zahir.Azam » Tue Aug 07, 2018 11:59 am

HEllo

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.

Regards
Zahir Azam
Attachments
FAST ERROR.docx
(14.75 KiB) Downloaded 90 times

Bonnie.Jonkman
Posts: 558
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Instructions for Compiling FAST

Postby Bonnie.Jonkman » Tue Aug 07, 2018 1:10 pm

Zahir,

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:

Code: Select all

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.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Majid.Ebr
Posts: 2
Joined: Wed Jun 27, 2018 8:06 am
Organization: University of Tehran
Location: Iran,Tehran

Re: Instructions for Compiling FAST

Postby Majid.Ebr » Sun Oct 14, 2018 8:58 am

Hello
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

Luke.Cunningham
Posts: 13
Joined: Thu Sep 27, 2018 10:53 am
Organization: Trinity College Dublin
Location: Ireland

Re: Instructions for Compiling FAST

Postby Luke.Cunningham » Thu Nov 08, 2018 6:30 am

Hi,

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 libmap-1.20.10.so 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:

Code: Select all

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
ubuntu@ubuntu:~/Desktop/FAST_v8.16.00a-bjj.tar/Compiling$


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

Luke.Cunningham
Posts: 13
Joined: Thu Sep 27, 2018 10:53 am
Organization: Trinity College Dublin
Location: Ireland

Re: Instructions for Compiling FAST

Postby Luke.Cunningham » Sat Dec 29, 2018 8:19 am

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?

Thanks,
Luke Cunningham

Rafael.Mudafort
Posts: 2
Joined: Fri Mar 30, 2018 3:51 pm
Organization: NREL NWTC
Location: Boulder, CO

Re: Instructions for Compiling FAST

Postby Rafael.Mudafort » Wed Jan 02, 2019 11:02 am

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: https://openfast.readthedocs.io/en/mast ... figuration.

Simon.Wiedemann
Posts: 70
Joined: Mon Jan 09, 2017 1:00 am
Organization: Ruhr-Uni Bochum
Location: Germany - Bochum

Re: Instructions for Compiling FAST

Postby Simon.Wiedemann » Wed Jan 30, 2019 6:11 am

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,
Simon

Jason.Jonkman
Posts: 4280
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Instructions for Compiling FAST

Postby Jason.Jonkman » Wed Jan 30, 2019 7:54 am

Dear Simon,

A compiled Windows executable of OpenFAST v2.0.0 is included on the release page of OpenFAST--see: https://github.com/OpenFAST/openfast/releases.

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

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest