Instructions for Compiling FAST

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

Moderators: Bonnie.Jonkman, Jason.Jonkman

Bonnie.Jonkman
Posts: 561
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 » Fri Jul 17, 2015 9:35 am

Hi, Georgios.

I receive this error occasionally, too. The executable is created, but the manifest file is not. I have found that closing Visual Studio and reopening it sometimes helps. Alternatively, you can tell Visual Studio not to generate the manifest file (under Project->properties->Linker->Manifest File, set "generate manifest" to "no").

However, you can safely ignore the error message. It's a nuisance, but harmless.
Bonnie Jonkman

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

Xiao.Sun
Posts: 36
Joined: Fri Jul 12, 2013 2:59 pm
Organization: Michigan Technological University
Location: U.S. state

Re: Instructions for Compiling FAST

Postby Xiao.Sun » Sun Nov 22, 2015 2:26 pm

Hello,

I am trying to compile the FAST v8.12.00a in window 7 (x64)
I used following tools and followed the compiling instructions to compile the FAST for 64-bit system:
Microsoft Visual Studio Community 2015
Intel Parallel Studio XE 2016 (including Visual fortran 16, MKL 11.3)

However, I got lots of errors as shown in the attached log file.
I also test it with my VS2008 and IVF 2011 with LAPACK and BLAS package, the same amount of errors ocurred.

Can anyone give me some suggestions?

Thank you.
Xiao
Attachments
BuildLog.zip
(118.93 KiB) Downloaded 211 times

Bonnie.Jonkman
Posts: 561
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 » Mon Nov 23, 2015 9:29 am

Hi, Xiao.

The errors messages in your attachment say "Bad # preprocessor line."

That tells me that you need to tell the compiler to preprocess the source files. FAST 8.12 has a Visual Studio project in its compiling folder that you should be able to open and use (with the compiling options and source files already set up). There are also some compiling instructions in the compiling folder of the archive that can help you figure out how to set up the preprocessing and help with any additional questions.
Bonnie Jonkman

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

Xiao.Sun
Posts: 36
Joined: Fri Jul 12, 2013 2:59 pm
Organization: Michigan Technological University
Location: U.S. state

Re: Instructions for Compiling FAST

Postby Xiao.Sun » Tue Nov 24, 2015 1:46 pm

Hello Bonnie,

Thank you for your reply.
I found the mistake I made.
I need to enable the preprocess source file (/fpp) as the table 1 suggested.
However, I found an awkward point. The table suggested allow free-format code to exceed 132 columns.
But if I change to "use free format", the fftpack4.1.f cannot be compiled correctly.
So I have to change to "use file extension" with "132 columns"
Then the file can be compiled.
Don't know why.

Best regards,
Xiao

Xiao.Sun
Posts: 36
Joined: Fri Jul 12, 2013 2:59 pm
Organization: Michigan Technological University
Location: U.S. state

Re: Instructions for Compiling FAST

Postby Xiao.Sun » Wed Nov 25, 2015 2:11 pm

Hello Bonnie,

Now I can compile all the .f90 files and get the .obj
However, I got a new error when the VS tried to link them together.
It said:"LINK : fatal error LNK1561: entry point must be defined"
The log file is attached.
Can you give me some suggestions?
Thank you.
Xiao

Bonnie.Jonkman
Posts: 561
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 Nov 25, 2015 10:33 pm

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

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

Xiao.Sun
Posts: 36
Joined: Fri Jul 12, 2013 2:59 pm
Organization: Michigan Technological University
Location: U.S. state

Re: Instructions for Compiling FAST

Postby Xiao.Sun » Mon Nov 30, 2015 2:49 pm

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.

Srinivasa.Sudharsan
Posts: 39
Joined: Mon Jun 08, 2015 10:59 pm
Organization: thiagarajar college of engineering
Location: India

Re: Instructions for Compiling FAST

Postby Srinivasa.Sudharsan » Tue Jan 05, 2016 9:19 pm

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!!!!!!

Srinivasa.Sudharsan
Posts: 39
Joined: Mon Jun 08, 2015 10:59 pm
Organization: thiagarajar college of engineering
Location: India

Re: Instructions for Compiling FAST

Postby Srinivasa.Sudharsan » Wed Jan 06, 2016 6:46 am

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.
fast.png
fast.png (94.51 KiB) Viewed 10004 times

Bonnie.Jonkman
Posts: 561
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 Jan 06, 2016 12:11 pm

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: https://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.
Bonnie Jonkman

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

Athanasios.Vitsas
Posts: 2
Joined: Mon Jun 23, 2014 8:02 am
Organization: KU Leuven
Location: Belgium

Re: Instructions for Compiling FAST

Postby Athanasios.Vitsas » Thu Jan 07, 2016 10:33 am

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:

Code: Select all

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.

Bonnie.Jonkman
Posts: 561
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 » Fri Jan 08, 2016 11:16 am

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

Code: Select all

   $(foreach src, $(ALL_OBJS), $(addprefix $(INTER_DIR)/,$(src)))
to

Code: Select all

   $(foreach src, $(ALL_OBJS), $(addprefix $(INTER_DIR)/,$(src))) -fPIC
and see if that helps.
Bonnie Jonkman

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

Athanasios.Vitsas
Posts: 2
Joined: Mon Jun 23, 2014 8:02 am
Organization: KU Leuven
Location: Belgium

Re: Instructions for Compiling FAST

Postby Athanasios.Vitsas » Mon Jan 18, 2016 6:26 am

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

Adrian.Gambier
Posts: 9
Joined: Wed Dec 09, 2015 8:50 am
Organization: Fraunhofer IWES
Location: Germany

Re: Instructions for Compiling FAST

Postby Adrian.Gambier » Thu Feb 04, 2016 4:16 am

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

Bonnie.Jonkman
Posts: 561
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 » Thu Feb 04, 2016 10:04 am

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

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


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest