Instructions for Compiling FAST

George.Elderfield’s question has been answered on OpenFAST issues (github.com/OpenFAST/openfast/issues/322), and so, will not be answered here.

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.

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,

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.

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,

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.

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.

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??
Errors.txt (71.6 KB)

Dear Dhaneesh,

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

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:

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

Alternatively, you can just delete the lines of code starting with SUBROUTINE UserPtfmLd ( X, XD, ZTime, DirRoot, PtfmAM, PtfmFt ) and ending with END SUBROUTINE UserPtfmLd (including all lines between the two).

Best regards,

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.

Dear Dhaneesh,

The input file handling in Seismic does not appear to be very robust. Looking at the UserPtfmLd.f90 source file, the seismic input filename is hard coded and limited to 128 characters in length, including path. It appears that–due to the long pathname (with many subdirectories)–that you’ve exceeded the 128 character limit. I would suggest either changing the UserPtfmLd.f90 source file to use more than 128 characters or not using so many subdirectories.

Best regards,

Sir,

I tried reducing the subdirectories so that it shouldn’t exceed the character(128) limit. Even though FAST was not running. The messaged showed like this. Was it telling that there is something wrong while compiling seismic and Fast? If it is Can I know where?

C:\Users\Bhargav>E:\Seismic\FAST.exe E:\Seismic\NRELOffshrBsline5MW_Onshore.fst

Running NWTC Subroutine Library (v1.07.00b-mlb, 10-Jan-2013).

Running FAST (v7.02.00d-bjj, 20-Feb-2013).

Heading of the FAST input file: NREL 5.0 MW Baseline Wind Turbine for Use in Offshore Analysis.

Running NWTC Subroutine Library (v1.07.00b-mlb, 10-Jan-2013).

Running AeroDyn (v13.00.02a-bjj, 20-Feb-2013).
Heading of the AeroDyn input file: NREL 5.0 MW offshore baseline aerodynamic input properties;
Compatible with AeroDyn v12.58.

Running NWTC Subroutine Library (v1.07.00b-mlb, 10-Jan-2013).

Using InflowWind (v1.02.00c-bjj, 23-Apr-2013)

Assuming E:\Seismic\WindData\NoShr_12.wnd is a formatted HH wind file.

Running NWTC Subroutine Library (v1.07.00b-mlb, 10-Jan-2013).
Reading 3 lines of data from the HH wind file.

Initializing seismic parameters

forrtl: severe (408): fort: (18): Dummy character variable ‘FILENAME’ has length 128 which is greater than actual variable length 41

Image PC Routine Line Source
libifcoremdd.dll 642D444F Unknown Unknown Unknown
FAST.exe 00FBF544 _SEISMIC_mp_CHECK 677 UserPtfmLd_Seismic.f90
FAST.exe 00FAF828 _SEISMIC_mp_READS 219 UserPtfmLd_Seismic.f90
FAST.exe 00FE072F _USERPTFMLD 1801 UserPtfmLd_Seismic.f90
FAST.exe 010BEBAE _FASTSUBS_mp_PTFM 4698 FAST.f90
FAST.exe 01239117 _FASTSUBS_mp_RTHS 6699 FAST.f90
FAST.exe 01293F8A _FASTSUBS_mp_SOLV 7945 FAST.f90
FAST.exe 012A583A FASTSUBS_mp_TIME 8335 FAST.f90
FAST.exe 01475E0A MAIN
104 FAST_Prog.f90
FAST.exe 014808FF Unknown Unknown Unknown
FAST.exe 01482563 Unknown Unknown Unknown
FAST.exe 01482437 Unknown Unknown Unknown
FAST.exe 014822DD Unknown Unknown Unknown
FAST.exe 014825C8 Unknown Unknown Unknown
KERNEL32.DLL 75166359 Unknown Unknown Unknown
ntdll.dll 771F7C24 Unknown Unknown Unknown
ntdll.dll 771F7BF4 Unknown Unknown Unknown

Dear Dhaneesh,

As far as I can tell, there is a small bug in how strings are passed within the UserPtfmLd_Seismic.f90 source file. Changing the following line in SUBROUTINE CheckFileExists() from:

CHARACTER(128), INTENT(IN )         :: fileName

to

CHARACTER(*), INTENT(IN )         :: fileName

should fix this error, but there may be other bugs in the source code. My guess is this was not noticed before because the newer Fortran compilers check different things.

Best regards,

Sir,

I made that change in UserPtfmLd_Seismic.f90 as you suggested earlier even though I was having the same problem of initializing seismic parameters. I tried to make changes to those lines mentioned in the message but it didn’t work because of my poor coding skills and I was having the same message displayed in my command prompt window. As you mentioned earlier, new Fortron compilers can’t check these bugs. How can I identify and fix these bugs so that I can run Fast?

Thank you.

Dear Dhaneesh,

I’m not understanding your reply. Did you change that one line of code in source file UserPtfmLd_Seismic.f90, recompile, and rerun? If so, what error message are getting?

Best regards,

Sir,

This was the error message I was getting after changing the line to CHARACTER(*) in SUBROUTINE CheckFileExists(), SUBROUTINE ReadMotionFile() and SUBROUTINE TargetResponse() in UserPtfmLd_Seismic.f90 and then recompiling.

Initializing seismic parameters

Using Seismic file E:\Seismic\NRELOffshrBsline5MW_Onshore_Seismic.dat

Using E:\Seismic\El_Centro_0.0050_270_value.dat for X motion file

Done reading motion file: E:\Seismic\El_Centro_0.0050_270_value.dat

Using E:\Seismic\El_Centro_0.0050_180_value.dat for Y motion file

Done reading motion file: E:\Seismic\El_Centro_0.0050_180_value.dat

Using E:\Seismic\El_Centro_0.0050_180_value.dat for Z motion file

Done reading motion file: E:\Seismic\El_Centro_0.0050_180_value.dat

Done Making ACC Input file for RSPM09

Done opening target response file

Done converting units for PSA

Done making All-Files

Done making RUN1.INP

Done making RUN2.INP

Done making RUN3.INP

‘rspm09.exe’ is not recognized as an internal or external command,
operable program or batch file.

The input file, “E:\Seismic\El_Centro_0.0050_270_value_TGT_RUN4.unm”, was not found.

Aborting FAST.

Does rspm09 application will also be generated along with FAST application after compiling? If that so I didn’t found rspm09 application after compiling.

Thank you

Dear Dhaneesh,

OK, so, it looks like that one line of code change fixed the original problem you were facing.

The error regarding rspm09.exe is triggered because that executable cannot be found. rspm09.exe is an executable provided in the Seismic archive. Make sure that it is included in the search path, or simply place it in the same directory as your compiled FAST executable.

Best regards,

Sir,

I have placed the rpsm09.exe in the same directory folder as FAST.exe which I got after compiling and tried to run fast. Even though the same error message was displayed.

‘rspm09.exe’ is not recognized as an internal or external command,
operable program or batch file.

The input file, “E:\Seismic\El_Centro_0.0050_270_value_TGT_RUN4.unm”, was not found.

Aborting FAST.

Dear Dhaneesh,

What happens when you try to run rspm09.exe by itself. Enter rspm09 at the command prompt and type enter.

Backing up, what was the reason that you need to recompile FAST v7 with Seismic in the first place? Were you not able to use the FAST with Seismic executable (FAST.exe) provided in the archive for some reason?

Best regards,

Sir,

When I run rspm09 itself. Run files have been generated for only x-direction MotionFile(El_Centro_0.0050_270_value). And the reason behind recompiling is nothing much, Even when I ran with FAST.exe provided in the archive I got same error, so I thought it would be better If I recompile Fast. But even after recompiling I end up getting the same error.

Can I get some help regarding this?