Instructions for Compiling FAST

You should always “Use File Extension” for the “Source File Format”. If you use the gfortran compiler, you have to set a compile flag or it stops reading free-format source code at column 132. In Visual Studio, you don’t have to set anything special to get it to recognize free-format source lines that are longer that 132 columns.

I don’t see a log file, but the error “Entry point must be defined” indicates that you do not have a main program. Is FAST_Prog.f90 in your project?

Hello Bonnie,

Finally, I have figured out how to compile it on my OS.
The error is due to that Windows 7 didn’t have the Universal CRT lib for the Visual Studio 2015.
If you compile it on a Windows 10+VS 2015, which already have a CRT lib, this problem won’t occur.
So if someone likes to compile it with Win7+VS 2015, he/she needs to:

  1. download and install standalone windows SDK
  2. download and install VCRedist.
    all from Microsoft website.
    for the VS configuration
    add $(UniversalCRT_IncludePath) to the “include”
    add $(UniversalCRT_LibraryPath_x64) or_x86 to the “Link”.

Then the project can be compiled successfully.

I test the generated .exe file with some CertTest, it works.

Hi Dr.Bonnie ;
I am trying to compile FAST8.10 in Windows10,visual studio15 with Intel visual fortran integrated but while compiling using VS i the error as “rc.exe not found”!! when i try to compile the Compile_FAST.bat in ia-32 intel command prompt i get the following error;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Compiling NWTC Library:
‘ifort’ is not recognized as an internal or external command,
operable program or batch file.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Error creating …\bin\FAST_iwin32.exe
your kind suggestions to solve this problem please!!!

hi Dr.Bonnie;
I am trying to compile FAST8.10 batch file Compile_Fast.bat in Intel visual fortran command prompt. After reading the compile instructions and making changes in Paths and compilers i tried compiling it but in the IVF compiling section of the batch file i get the following error: I have made changes in “set path” and “registry” locations but even after that i get this error. what changes have to be made in local variables and intermittent directory??? kindly give your suggestions.

Hi, Srinivasa.

I think all of the errors you are getting are related to a problem with your Intel Fortran installation. I searched for “rc.exe not found” and came up with this link that may be helpful: software.intel.com/en-us/forums … pic/287049

Did you by chance install an evaluation copy of IVF and get the Visual Studio shell directly from Microsoft’s web site? Microsoft has a Community edition of Visual Studio available (it’s free for open-source development, but to read their license for details). I recommend you install this version instead of using any Visual Studio shell. Then after that’s installed, install Intel Fortran.

Dear all,
I compiled in linux x64 the FAST registry, MAP++ library and FAST v8 source files. But the compilation of the DISCON_DLL fails. The error that I get is the following:

gfortran -shared -O2 -m64 -fbacktrace -fPIC -I Obj_lin64 -o ../CertTest/5MW_Baseline/ServoData/DISCON_glin64.so \ Obj_lin64/DISCON.obj /usr/bin/ld: Obj_lin64/DISCON.obj: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC Obj_lin64/DISCON.obj: error adding symbols: Bad value collect2: error: ld returned 1 exit status make: *** [../CertTest/5MW_Baseline/ServoData/DISCON_glin64.so] Error 1
Does anyone have any idea why this occurs? Thank you in advance.

The error indicates that you need to compile with -fPIC. (This option generates position-independent code, which is required for shared libraries on Linux, but is not supported on all target machines.) As this option is already on the compile line, I would guess that it needs to be placed in a different position on the line. I’d first try to put it at the end.

Try changing line 113 (?) in makefile_DISCON_DLL from $(foreach src, $(ALL_OBJS), $(addprefix $(INTER_DIR)/,$(src))) to $(foreach src, $(ALL_OBJS), $(addprefix $(INTER_DIR)/,$(src))) -fPIC and see if that helps.

Hey Bonnie,

The DISCON dynamically loaded libraries were finally compiled. I am just posting here the changes with respect to the compiling instructions, in case that someone else faces similar problem. The -fPIC flag was added to the end of the FFLAGS line of the makefile_DISCON_DLL and was compiled first (before creating the FAST executable). Finally, the ‘DLL_FileName’ of the NREL_*_ServoDyn.dat was changed to ‘ServoData/DISCON_glin64.so’.

Dear all,

I need a version of FAST v8 running without DLLs. During the compilation at least three DLLs are required (blas, lapack and MAP_Win32). My question is: is it possible to include blas, lapack and MAP_Win32 only as static libraries?
I am using FAST_v8.12.00a-bjj_0 with gfortran and MinGW-w64 (v. 5.1.0-2) in Windows 7.

Than you in advance for the help.
Best regards
Adrian

Adrian,

Yes, it should be possible to link with static versions of those libraries, assuming you have compiled them as static libraries using a compiler and compiling options that are compatible with what you are using to compile FAST.

Thank you Bonnie for your answer,

I am now trying to compile FAST and all libraries,
and I am receiving a couple of error from Linker of the type

Obj_win64/NWTC_LAPACK.obj:NWTC_LAPACK.f90:(.text+0xc4): undefined reference to spptrf_' Obj_win64/NWTC_LAPACK.obj:NWTC_LAPACK.f90:(.text+0x3f4): undefined reference to dpptrf_’

Do you have any idea, where could be the problem? I guess my compiled Lapack library is not correct but I am not sure.

Best regards
Adrian

Those two routines that the linker can’t find should be in the LAPACK library. So, I would guess that either the linker isn’t finding your compiled library or the library doesn’t contain those two routines [at least not with arguments the way they are being called in NWTC_LAPACK.f90].

Thank you for the answer.
Yes, this was also my presumption. Actually, these messages are produced for all routines of Lapack but they are for sure in the compiled library. Probably, it was something wrong during the generation of the library. Thank again.
Best regards

Hello,

I am trying to compile FAST v8 with Microsoft Visual Studio 2015 and Intel Fortran Compiler. The matter is that when building the project this 3 error appear.

1>C:\Users\itrojaola\Documents\FAST V8\Source\dependencies\ElastoDyn\ElastoDyn.f90(11140): error #6633: The type of the actual argument differs from the type of the dummy argument. [TEETDEF]
1>C:\Users\itrojaola\Documents\FAST V8\Source\dependencies\ElastoDyn\ElastoDyn.f90(11140): error #6633: The type of the actual argument differs from the type of the dummy argument. [TEETRATE]
1>compilation aborted for C:\Users\itrojaola\Documents\FAST V8\Source\dependencies\ElastoDyn\ElastoDyn.f90

What do I have to do in order to solve this?

Thanks in advance
Regards

Hi, Ignacio.

FAST 8.12 had a problem with some arguments in the user-defined subroutines. If you replace UserSubs.f90 in the ServoDyn source code with this one, it should hopefully get rid of these problems.

Sorry for the inconvenience.

Dear Bonnie,

I have already changed the source code of UserSubs.f90 in ServoDyn. Unfortunately, now I get another different error.

1>C:\Users\itrojaola\Desktop\Karpeta berria\Source\dependencies\ServoDyn\UserSubs.f90(1): error #5078: Unrecognized token ‘?’ skipped
1>C:\Users\itrojaola\Desktop\Karpeta berria\Source\dependencies\ServoDyn\UserSubs.f90(1): error #5078: Unrecognized token ‘?’ skipped
1>C:\Users\itrojaola\Desktop\Karpeta berria\Source\dependencies\ServoDyn\UserSubs.f90(1): error #5078: Unrecognized token ‘?’ skipped
1>compilation aborted for C:\Users\itrojaola\Desktop\Karpeta berria\Source\dependencies\ServoDyn\UserSubs.f90 (code 1)

Could it be that something went wrong while copying and pasting the source code that you gave me?
Thanks in advance,
Regards,
Ignacio

I finally solve it. I copy the new source code and paste it in NotePad++ file. Then, I create a txt file with that document and transform it a a .f90 file.

Hi Bonnie,

I am new to compiling a Fortran code, so I follow closely to the compiling instruction. I uses Visual Studio 2015 and Intel Parallel Studio XE 2016 to compile FAST.

I finally able to get “FAST_dev_Win32.exe”. However, when I tried to run a test input,I received a error message “FAST encountered an error during module initialization. Simulation error level: FATAL ERROR”.

The Buildinglog are mostly warning not errors.
The first error is “TargetPath(C:\FAST\bin\FAST_Project.exe) does not match the Linker’s OutputFile property value (C:\FAST\bin\FAST_dev_Win32.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
Compiling with Intel(R) Visual Fortran Compiler 16.0 [IA-32]…”

I dont know how to fix it and I am not sure the warning will cause problem in compiling since the instruction does not mention this.

I am not sure I successfully compiled FAST or the way I specify the input is wrong.

Please let me know how to correctly compile FAST…

Thank you…

Please see the attachment for the picture .

Dear Daniel,

Please check the details of the path for the file Test01_ElastoDyn.dat. For example, that forward slash should be a backward slash in the input file, and make sure the input file is where you specify it is.

Best,
Mike

Hi Mike,

Thank you for your help. I successfully solve the issue. The compiling process is correct, but I did not place the input file in the proper directory.