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 2702 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 2702 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: 566
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 1994 times

Jason.Jonkman
Posts: 4862
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

Dhaneesh.Machavarapu
Posts: 56
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Instructions for Compiling FAST

Postby Dhaneesh.Machavarapu » Sun May 03, 2020 4:26 am

Hello,

I am trying to compile Seismic with Fast v7.02. For that should I follow the procedure mentioned at very top of the page or is there other way for that.

Thank you.

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

Re: Instructions for Compiling FAST

Postby Jason.Jonkman » Mon May 04, 2020 9:56 am

Dear Dhaneesh,

Yes, the instructions at the top of the page are for FAST v7, and Seismic is just a specialized version of FAST v7. To compile the FAST v7 code with support for seismic simulations, simply comment out the existing UserPtfmLd() subroutine located in UserSubs.f90 and add UserPtfmLd_Seismic.f90 to the list of files to be compiled following the instructions above.

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

Dhaneesh.Machavarapu
Posts: 56
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Instructions for Compiling FAST

Postby Dhaneesh.Machavarapu » Mon May 11, 2020 12:57 am

Hi,

I want to compile Fast v7 with the Seismic module. But I was having trouble with which Visual studio and Intel parallel studio xe. when I installed the latest versions of visual studio and parallel studio the option intel parallel studio with VS (Microsoft visual studio shell)in the parallel studio for compiling was not there. So when I checked into website I get to know that they haven't included that option for the latest 2017 & 2019 versions. And old versions of the parallel studio are not there in the website. So Can anyone help me with this problem?

Thank you.

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

Re: Instructions for Compiling FAST

Postby Jason.Jonkman » Mon May 11, 2020 8:41 am

Dear Dhaneesh,

You should be able to install Visual Studio Community Edition for free (or pay for the professional version), and then install the Intel compiler. It will find the version(s) of Visual Studio you have installed and use that. You do not need the Visual Studio Shell if you have the full Visual Studio installed.

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

Dhaneesh.Machavarapu
Posts: 56
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Instructions for Compiling FAST

Postby Dhaneesh.Machavarapu » Wed May 13, 2020 9:25 am

Sir,

In your last reply, you have mentioned full visual studio should be installed. Was it mean all the workloads of visual studio should be installed?

Thank you.

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

Re: Instructions for Compiling FAST

Postby Jason.Jonkman » Wed May 13, 2020 5:12 pm

I would recommend you install the C++ compiler, but feel free to install whatever parts of it you'd like (you don't need all of the available optional settings). After installing Visual Studio, you can install the Intel Fortran compiler so you can use that in Visual Studio.
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

Dhaneesh.Machavarapu
Posts: 56
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Instructions for Compiling FAST

Postby Dhaneesh.Machavarapu » Fri May 15, 2020 12:35 pm

Sir,

Thank you for the information, I tried to build FAST v7 with Seismic module by following the compiling instructions mentioned in this forum. But I was getting so many errors while building the solution. I have attached the Errors I got while compiling.

I have commented out the current directory of UserPtfmLd_Seismic.f90 in SUBROUTINE UserPtfmLd() of UserSubs.f90 like this.

CHARACTER(1024), INTENT(IN ) :: E:/softwares/Project/Fast v7/New folder/Source/UserPtfmLd_Seismic ! The name of the root file including the full path to the current working directory. This may be useful if you want this routine to write a permanent record of what it does to be stored with the simulation results: the results should be stored in a file whose name (including path) is generated by appending any suitable extension to DirRoot.

Is this the correct way??
Attachments
Errors.txt
(71.59 KiB) Downloaded 9 times

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

Re: Instructions for Compiling FAST

Postby Jason.Jonkman » Fri May 15, 2020 3:26 pm

Dear Dhaneesh,

I think there is some confusion about what "commented out" means. This is not valid Fortran syntax:

Code: Select all

CHARACTER(1024), INTENT(IN ) :: E:/softwares/Project/Fast v7/New folder/Source/UserPtfmLd_Seismic ! The name of the root file including the full path to the current working directory. This may be useful if you want this routine to write a permanent record of what it does to be stored with the simulation results: the results should be stored in a file whose name (including path) is generated by appending any suitable extension to DirRoot.

What you should do instead is put comment characters in front of every line of SUBROUTINE UserPtfmLd in UserSubs.f90; i.e., every line should start with a "!" character, like this line:

Code: Select all

! SUBROUTINE UserPtfmLd ( X, XD, ZTime, DirRoot, PtfmAM, PtfmFt )

Alternatively, you can just delete the lines of code starting with

Code: Select all

SUBROUTINE UserPtfmLd ( X, XD, ZTime, DirRoot, PtfmAM, PtfmFt )
and ending with

Code: Select all

END SUBROUTINE UserPtfmLd
(including all lines between the two).

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

Dhaneesh.Machavarapu
Posts: 56
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Instructions for Compiling FAST

Postby Dhaneesh.Machavarapu » Sat May 16, 2020 4:47 am

Sir,

I was able to compile FAST v7 with UserPtfmLd_Seismic without any errors. And a FAST application has been created. When I tried to run test case NRELOffshrBsline5MW_Onshore_udm_w_baseline_w_target in the Seismic module with FAST application which was created after compiling, Fast was aborting.

Initializing seismic parameters

Using Seismic file E:\softwares\Project\Seismic\New
folder\Examples\3_NRELOffshrBsline5MW_Onshore_udm_w_baseline_w_target\NRELOffshrBsline5MW_Onsho
The input file, "E:\softwares\Project\Seismic\New
folder\Examples\3_NRELOffshrBsline5MW_Onshore_udm_w_baseline_w_target\NRELOffshrBsline5MW_Onsho",
was not found.

Aborting FAST.

And also NRELOffshrBsline5MW_Onshore_Seismic.dat file was not mentioned as input in NRELOffshrBsline5MW_Onshore.fst file. Can I get some help on how to run Fast for performing seismic operations?

Thank you.


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest