OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
671 stars 453 forks source link

Compilation fails using gfortran ubuntu 22.04 #2030

Closed jantheron69 closed 7 months ago

jantheron69 commented 7 months ago

Bug description <OpenFast compilations fails when using Ubuntu 22.04 and gfortran 11.3. This bug was reported as 743 and 744 (https://github.com/OpenFAST/openfast/issues/743) in OpenFAST 2.5.1 but it appears to still be present in 3.5.2 >

To Reproduce <configured with: cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBLAS_LIBRARIES="/usr/lib/x86_64-linux-gnu/libblas.so" -DLAPACK_LIBRARIES="/usr/lib/x86_64-linux-gnu/liblapack.so"> Steps to reproduce the behavior:

  1. Compile with 'make -j12'
  2. Error message: OpenFAST/modules/openfast-library/src/FAST_Solver.f90:3016:39:

    2297 | CALL CleanUp() | 2
    ...... 3016 | do nb=1,size(y_BD_perturb) | 1 Error: Index variable ‘nb’ redefined at (1) in procedure ‘cleanup’ called from within DO loop at (2)

OpenFAST Version <Version 3.5.2 Master branch>

**************************************************************************************************
 OpenFAST

 Copyright (C)  National Renewable Energy Laboratory
 Copyright (C)  Envision Energy USA LTD

 This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY.
 See the "LICENSE" file distributed with this software for details.
 **************************************************************************************************

 OpenFAST-v3.5.2
 Compile Info:
  - Architecture: 64 bit
  - Precision: double
  - Date: Feb 12 2024
  - Time: 17:19:38
 Execution Info:

System Information (please complete the following information):

Additional context

andrew-platt commented 7 months ago

@jantheron69, could you share the compilation errors from 3.5.2 with a clean build? The line numbers above don't correspond with the 3.5.2 source code for FAST_Solver.f90.

jantheron69 commented 7 months ago

Hi Andrew, here is the result of my git branch query: git branch -a

The line numbers are as I pasted in the bug report. Here again:

2297 | CALL CleanUp() | 2
...... 3016 | do nb=1,size(y_BD_perturb) | 1 Error: Index variable ‘nb’ redefined at (1) in procedure ‘cleanup’ called from within DO loop at (2) make[2]: [modules/openfast-library/CMakeFiles/openfast_postlib.dir/build.make:114: modules/openfast-library/CMakeFiles/openfast_postlib.dir/src/FAST_Solver.f90.o] Error 1 make[1]: [CMakeFiles/Makefile2:1490: modules/openfast-library/CMakeFiles/openfast_postlib.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

Do I explicitly have to pull branch "rc-3.5.2"?

andrew-platt commented 7 months ago

The master branch was removed a few years ago. So what you have in your master branch is likely from the last release before we renamed master to `main.

For version 3.5.2, you need to use the main branch, or the v3.5.2 tag.

The branch rc-3.5.2 was removed after we posted the 3.5.2 release.

jantheron69 commented 7 months ago

Thanks Andrew! That worked. Maybe put something like this in the compile instructions for Linux? Or maybe I missed it?

andrew-platt commented 7 months ago

Excellent! Good to hear that worked.

The issue is more of a git usage issue than OpenFAST. I'll think about what to add to the docs

jantheron69 commented 7 months ago

[like] Theron, Johannes Nicolaas reacted to your message:


From: Andy Platt @.> Sent: Monday, February 12, 2024 7:56:40 PM To: OpenFAST/openfast @.> Cc: Theron, Johannes Nicolaas @.>; Mention @.> Subject: Re: [OpenFAST/openfast] Compilation fails using gfortran ubuntu 22.04 (Issue #2030)

Excellent! Good to hear that worked.

The issue is more of a git usage issue than OpenFAST. I'll think about what to add to the docs

— Reply to this email directly, view it on GitHubhttps://github.com/OpenFAST/openfast/issues/2030#issuecomment-1939457339, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS7EVWR5VIOQWMKQRTFRE63YTJXXRAVCNFSM6AAAAABDEMD54WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZZGQ2TOMZTHE. You are receiving this because you were mentioned.Message ID: @.***>

jantheron69 commented 7 months ago

Have a good day; thanks for your super fast response