Compiling Fast v8 using gfortran

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

Moderators: Bonnie.Jonkman, Jason.Jonkman

Ana.Fernandez
Posts: 6
Joined: Wed Jan 13, 2016 2:16 am
Organization: self
Location: Spain

Re: Compiling Fast v8 using gfortran

Postby Ana.Fernandez » Thu Jan 14, 2016 11:07 am

Thank you Marco, that is a good suggestion but it was the first thing I checked. I am pointing to the x64 binaries as you can see in the images attached ("C:/LAPACKprecompile/x64) and yes, I downloaded them again from http://icl.cs.utk.edu/lapack-for-windows/lapack/ in case I saved them incorrectly.

I really don't know what I am doing wrong.

Bonnie.Jonkman
Posts: 561
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Compiling Fast v8 using gfortran

Postby Bonnie.Jonkman » Fri Jan 15, 2016 9:00 am

Hi, Ana.

Do you have the .lib files in that directory? The error message says it's skipping the .dll files, not the .lib files. gfortran can link with the .dll files only if they were generated with gfortran; otherwise it needs the .lib files.
Bonnie Jonkman

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

Ana.Fernandez
Posts: 6
Joined: Wed Jan 13, 2016 2:16 am
Organization: self
Location: Spain

Re: Compiling Fast v8 using gfortran

Postby Ana.Fernandez » Mon Jan 18, 2016 2:12 am

Hello Bonnie,

Thank you for your feedback. Yes, I have both .dll and .lib in the same directory... I have also tried including that directory in Windows path but it doesn't work either.

Ana.Fernandez
Posts: 6
Joined: Wed Jan 13, 2016 2:16 am
Organization: self
Location: Spain

Re: Compiling Fast v8 using gfortran

Postby Ana.Fernandez » Tue Jan 19, 2016 1:30 am

As I was stuck with the precompiled libraries, I tried compiling them again. Apparently I did something wrong the first time because I have finally managed to complete the build:

buildcompleto.PNG
buildcompleto.PNG (93.4 KiB) Viewed 2416 times


For those with the same problem, I followed the instruccions from "Build Instructions to create LAPACK and LAPACKE 3.5.0 dlls for Windows with MinGW" in http://icl.cs.utk.edu/lapack-for-windows/lapack/#build

Ana.Fernandez
Posts: 6
Joined: Wed Jan 13, 2016 2:16 am
Organization: self
Location: Spain

Re: Compiling Fast v8 using gfortran

Postby Ana.Fernandez » Wed Jan 20, 2016 2:55 am

Hello again,
I am now running some tests with my build before changing any source code in FAST. I have run Test01.fst both with my FAST executable (FAST_gwin64.exe) and the distributed one (FAST_x64.exe).
What I get is a SLOW simulation (awful time ratio):
simulacionSLOW.PNG
simulacionSLOW.PNG (77.27 KiB) Viewed 2409 times


instead of a FAST one:
simulacionFAST.PNG
simulacionFAST.PNG (62.86 KiB) Viewed 2409 times


I think the problem comes from the compiled libraries not being optimised. Therefore I would really like to make the build work with the precompiled libraries, any help out there?

Bonnie.Jonkman
Posts: 561
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Compiling Fast v8 using gfortran

Postby Bonnie.Jonkman » Wed Jan 20, 2016 9:42 am

Hi, Ana.

You can expect gfortran-generated executables to run slower than the Intel-generated ones. I just ran a comparison on my PC: test 01 takes about 3.6 seconds (Intel) compared to 10.8 seconds (gfortran), even with similar optimization options.

However, looking at your output, I see some debugging information. It looks like you've compiled with options to give you run-time checks. This will certainly slow down the code. So, the first thing I would do is look at your FAST makefile and see what you've specified for FFLAGS. This is what I generally specify for production-type code:

Code: Select all

FFLAGS  = -O2 -m$(BITS) -fbacktrace -ffree-line-length-none -x f95-cpp-input
LDFLAGS = -O2 -m$(BITS) -fbacktrace
Bonnie Jonkman

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

Ana.Fernandez
Posts: 6
Joined: Wed Jan 13, 2016 2:16 am
Organization: self
Location: Spain

Re: Compiling Fast v8 using gfortran

Postby Ana.Fernandez » Thu Jan 21, 2016 1:41 am

Thank you very much, Bonnie.
With you recommendation I get a two times quicker result even if it is not as fast as yours:
simulacionFAST_2.PNG
simulacionFAST_2.PNG (50.36 KiB) Viewed 2402 times

Mohibb.Malik
Posts: 1
Joined: Wed Jan 27, 2016 7:21 am
Organization: NTNU - Student
Location: Norway

Re: Compiling Fast v8 using gfortran

Postby Mohibb.Malik » Thu Jan 28, 2016 3:24 am

Hi, Ana.

I am having the exact same problem as you, where the project finds the lapack/blas library, but then gives the "Skipping incompatible.." message. I tried compiling the libraries myself, following the instructions at http://icl.cs.utk.edu/lapack-for-windows/lapack/, but I keep running into problems I do not understand at all.

Do you think you could help me out by uploading the 64 bit lapack/blas libraries you compiled with gfortran?

Thanks,
Mohibb Malik

Luke.Cunningham
Posts: 13
Joined: Thu Sep 27, 2018 10:53 am
Organization: Trinity College Dublin
Location: Ireland

Re: Compiling Fast v8 using gfortran

Postby Luke.Cunningham » Fri Nov 16, 2018 10:18 am

Hi,

I have successfully compiled Fast v8 and Turbsim v2 using a gfortran compiler, and both are working very well. A strange issue has come to my attention, however.

I was getting errors such as 'Segmentation Error- core dumped' and found the reason for this error to be the "Hdsum" flag in the OC3Hywind HydroDyn.dat file. When this flag is set to 'True' - no errors. When it is set to 'False' - I get the segmentation error.

Could anyone explain why this might be happening?

Thanks,
Luke

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

Re: Compiling Fast v8 using gfortran

Postby Jason.Jonkman » Wed Nov 28, 2018 7:46 am

Dear Luke,

Thanks for reporting this issue. Rafael Mudafort traced this back to a minor bug in HydroDyn, which he has now fixed in OpenFAST--see: https://github.com/OpenFAST/openfast/pull/207.

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

Luke.Cunningham
Posts: 13
Joined: Thu Sep 27, 2018 10:53 am
Organization: Trinity College Dublin
Location: Ireland

Re: Compiling Fast v8 using gfortran

Postby Luke.Cunningham » Thu Dec 06, 2018 6:34 am

Hi Jason,

Great, thanks! I am now trying to compile FAST on a high performance computer using Linux to run some extensive simulations. I am running into some compilation error with FAST which I do not understand.

I'm trying to follow the instructions at https://github.com/old-NWTC/FAST/blob/m ... owsCompile but running into a problem. I have the Registry and MAP++ steps done. I did have to edit the make file for how MAP++ links to lapacke but the library was generated so I don't think that is the issue.

The problem I encounter is when doing a make in ~/src/FAST/Compiling leads to the following error:

Registry warning: type MeshMapType used before defined for IceD_P_2_SD_P
Registry warning: type MeshMapType used before defined for SD_P_2_IceD_P
generating ../Source/FAST_Types.f90
make: *** [../Source/FAST_Types.f90] Segmentation fault
make: *** Deleting file `../Source/FAST_Types.f90'
I've attached the full output from the attempted compilation here.

Here are some environment details:

$ gfortran --version
GNU Fortran (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc --version
gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cat /etc/redhat-release
Scientific Linux release 6.10 (Carbon)
$ uname -r
2.6.32-754.3.5.el6.x86_64


I'd really appreciate any help you can offer and sorry if I'm missing something basic or obvious.

Thanks,
Luke Cunningham

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

Re: Compiling Fast v8 using gfortran

Postby Jason.Jonkman » Thu Dec 06, 2018 7:07 am

Dear Luke,

I'm not sure, but this old-NWTC version of FAST is no longer supported. Hopefully switching to OpenFAST will solve your problem: https://github.com/OpenFAST/openfast.

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


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest