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 599 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 599 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: 554
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


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest