Compiling FAST under Windows 7 with gfortran

Dear all,

I’m trying to compile FAST with gfortran on a 64 bit Windows 7 OS. I use the makefile given in the last version of FAST (v7.02.00d-bjj, 20-Feb-2013) with mingw32-make.exe. I have downloaded the last versions of Aerodyn, InflowWind and NWTC Subroutine Library.

The single change I made in the makefile given with FAST is to replace the location of the source files for FAST, AeroDyn, inflowWind, and the NWTC Library.

When I try to compile, I get these messages :

Any help would be welcomed.

Best Regards,

Damien

Hi, Damien.

Sorry for the late response to your question.

I haven’t seen this error before (though I admit I’ve only compiled with gfortran a few times!).

Make sure you’re using gfortran 4.6.2 or newer, and do a clean build (typing “make clean” should do it). I would expect SingPrec.f90 to be the first source file compiled on a clean build… yours has NWTC_IO.f90 first.

Let me know if you’re still having trouble with it.

Dear Bonnie,

Thank you for your response !

But I haven’t solved my problem…
I tried to do a clean build but it doesn’t work… gfortran tells me he can’t find any .mod and .obj file :

And when I try to run mingw32-make.exe (typing “make”) before a clean build (typing “make clean”) I got the same message I get in my last post first, and then gfortran deletes .mod and .obj files but FAST isn’t compiled.

About the version, I think I’m using gfortran 4.6.2 (In the “bin” repertory there is a “mingw32-gcc-4.6.2.exe” file)

It is the first time I compile something with gfortran and I don’t know if I use the good exec nor if I use it properly. Here is the directory where I try to compile FAST :
CompilerFAST.zip (500 KB)
Can you try to compile it with your gfortran ?

Best Regards,

Damien

Dear Damien,

I can’t read French, but it looks as if the Make Clean functionality is not set up correctly. I see that the files it is trying to delete have a double “” in the path. Try deleting one to see if that works.

Marshall

Marshall –
The message doesn’t indicate a problem with the Make Clean functionality. If there are no files to delete, the script will warn that it’s not deleting anything. The double ‘’, is necessary so that make doesn’t think ‘’ is a switch, but a file path separator. (I think you added that originally!)

Damien –
The script works fine on my PC. I’ve downloaded your files, changed the paths to

NWTC_LIB_DIR = ./Source_NWTC_Lib AERODYN_DIR = ./Source_AeroDyn WIND_DIR = ./Source_InflowWind FAST_DIR = ./Source_FASTand it works. I’m using gcc (gfortran) version 4.6.2. You can type gfortran -v at a command line to determine which version of gcc you are using.

I noticed that when you call make, you batch script contains the full path to the mingw32-make executable… One thing you might want to check is if you have set your PATH environment variable properly after installing MinGW. (See the Environment Settings section on this page: mingw.org/wiki/Getting_Started.) Perhaps mingw32-make isn’t finding some of the tools it needs.

Dear Bonnie,

Thanks for your help. I have reinstalled MinGW (version 4.7.2) and I have corrected the mistake I made in my path environment variable.
Sorry for not having done it earlier…

When I try to compile FAST (with a make or a make clean command) I get a new message :
130513_ErreurCompileFAST.jpg

Lines 28, 33, 39, 68, 77 and 86 match ifeq tests :

ifeq ($(OS),Windows_NT) NWTC_LIB_DIR = ./Source_NWTC_Lib AERODYN_DIR = ./Source_AeroDyn WIND_DIR = ./Source_InflowWind FAST_DIR = ./Source_FAST else NWTC_LIB_DIR = $(HOME)/PC/CAEtools/Miscellaneous/NWTC_Library/trunk/source AERODYN_DIR = $(HOME)/PC/CAEtools/simulators/AeroDyn/SVNdirectory/trunk/Source WIND_DIR = $(HOME)/PC/CAEtools/simulators/InflowWind/SVNdirectory/trunk/Source FAST_DIR = $(HOME)/PC/CAEtools/simulators/FAST/SVNdirectory/trunk/Source endif
and

ifeq ($(OS),Windows_NT) # Windows DEL_CMD = del EXE_EXT = _gwin$(BITS).exe INTER_DIR = Obj_win$(BITS) MD_CMD = @mkdir OBJ_EXT = .obj PATH_SEP = \\ SYS_FILE = SysGnuWin else # Linux DEL_CMD = rm -f EXE_EXT = _glin$(BITS) INTER_DIR = Obj_lin$(BITS) MD_CMD = @mkdir -p OBJ_EXT = .o PATH_SEP = / SYS_FILE = SysGnuLinux endif
When I remove these tests, keeping only :

NWTC_LIB_DIR = ./Source_NWTC_Lib AERODYN_DIR = ./Source_AeroDyn WIND_DIR = ./Source_InflowWind FAST_DIR = ./Source_FAST
and

DEL_CMD = del EXE_EXT = _gwin$(BITS).exe INTER_DIR = Obj_win$(BITS) MD_CMD = @mkdir OBJ_EXT = .obj PATH_SEP = \\ SYS_FILE = SysGnuWin
The 6 firsts messages disappear.

Messages for lines 146 to 149 match vpath declarations :

vpath %.f90 $(NWTC_LIB_DIR) $(AERODYN_DIR) $(WIND_DIR) $(FAST_DIR) vpath %.f $(FAST_DIR) vpath %.mod $(INTER_DIR) vpath %.obj $(INTER_DIR)
and I don’t know what is wrong with it…

Hi, Damien.

Now it looks like you are calling a different make tool. Your command line says you’re using MAKE from Inprise Corp (probably something from a different C++ installation).

Does it work if you type mingw32-make instead of make at the command line?

Thank you !

When I try with mingw32-make and I get this message :

130514_ErreurCompileFAST.jpg

It looks like my first message…

That seems like it’s an internal compiler error, so I think you’ll have to submit a bug report to the gcc community.

I don’t get that error with my gcc version 4.6.2, so maybe you can try to use that version of the compiler.

I encounter the same internal compiler error with gfortran version 4.6.3 under Ubuntu 12.04. I compiled gfortran version 4.6.2 from source and am able to successfully build FAST with that version.

I don’t know that much about MinGW, but if you can install gfortran version 4.6.2 somehow that might solve the issue.

I didn’t find gfortran version 4.6.2 but 4.6.1.

However, I have successfully compiled FAST with gfortran 4.6.1. So it seems there is an internal compiler error since gcc version 4.6.3…

Thank you for all your answers and your help. I solved my problem !

Best Regards,

Damien

Dear Damien,
I have run into very similar problems as the ones you have described.
I have not been able to find gfortran 4.6.1. Would it be possible for you to tell me where you have found this version of gfortran?
Thanks,
Best regards,
Simon

Dear Simon,

I have installed gfortran 4.6.1 downloading the application “mingw-get-inst-20111118.exe” from http://sourceforge.net/projects/mingw/files/.

I have seen that this application is not available any more in this website. If you don’t find what you need in the new files in sourceforge.net, give me your mail adresse and I’ll send you the application which work.

Best regards,

Damien

Dear Damien,
Thank you very much for your quick answer.
Indeed it seems that the application you are suggesting cannot be found on this website anymore.
It would be very nice if you could send it to me via e-mail. My address is sbreton2001@yahoo.ca.
Thank you very much once again.
Best regards,
Simon

I know this is an old thread now, but just as an update: I too encountered the internal error problem with my installed version of gfortran, but the latest version from sourceforge.net/projects/mingw-w64/ (gfortran version 5.1.0) seems to have it solved.
Cheers,
Matt

hi bonnie;
I am new to FAST and fortran. I need to alter the FAST code with flap control. How could i change and recompile and convert to MATLAB block .Is there any material explaining step by step operation in recompiling FAST and converting to MATLAB block ? pl help me with this aspect!

Hi, Srinivasa.

The FAST v8 archive contains compiling instructions; there is also a section about compiling the FAST S-Function for Simulink in the ReadMe distributed with FAST v8: wind.nrel.gov/nwtc/docs/README_FAST8.pdf.