Instructions for Compiling FAST

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

Moderators: Bonnie.Jonkman, Jason.Jonkman

Juan.Fernandez
Posts: 6
Joined: Tue May 07, 2019 7:34 am
Organization: Sener
Location: Spain

Re: Instructions for Compiling FAST

Postby Juan.Fernandez » Wed May 08, 2019 3:06 am

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.
Compile.JPG
Compile.JPG (54.25 KiB) Viewed 845 times

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."

OpenFast.JPG
OpenFast.JPG (80.68 KiB) Viewed 845 times

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.

Juan

Juan.Fernandez
Posts: 6
Joined: Tue May 07, 2019 7:34 am
Organization: Sener
Location: Spain

Re: Instructions for Compiling FAST

Postby Juan.Fernandez » Wed May 08, 2019 3:55 am

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.

Juan

Bonnie.Jonkman
Posts: 557
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 » Wed May 08, 2019 9:13 pm

Juan,

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'):

Code: Select all

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

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

Juan.Fernandez
Posts: 6
Joined: Tue May 07, 2019 7:34 am
Organization: Sener
Location: Spain

Re: Instructions for Compiling FAST

Postby Juan.Fernandez » Thu May 09, 2019 2:00 am

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,

Juan

George.Elderfield
Posts: 3
Joined: Mon Aug 12, 2019 5:43 am
Organization: University of Strathclyde
Location: United Kingdom

Re: Instructions for Compiling FAST

Postby George.Elderfield » Tue Aug 13, 2019 10:37 am

Hi Bonnie,

I am trying to compile openFAST on windows using the visual studio method from here ... https://openfast.readthedocs.io/en/mast ... ndows.html

When doing the Build>Build Solution step I got errors as suggested in the document so I closed and tried again as per the instructions. I now get the 5 errors shown below every time I close and Build solution again. How can I overcome this problem?

Many Thanks

George
Openfast error list.JPG
Openfast error list.JPG (110.63 KiB) Viewed 137 times

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

Re: Instructions for Compiling FAST

Postby Jason.Jonkman » Wed Aug 14, 2019 8:07 am

George.Elderfield's question has been answered on OpenFAST issues (https://github.com/OpenFAST/openfast/issues/322), and so, will not be answered here.
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