Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error when compiling aerodyn (AeroDyn_Types.f90) #2477

Open
fredrikekre opened this issue Oct 23, 2024 · 1 comment
Open

Compilation error when compiling aerodyn (AeroDyn_Types.f90) #2477

fredrikekre opened this issue Oct 23, 2024 · 1 comment

Comments

@fredrikekre
Copy link

Hi, I am trying to compile the current dev branch (commit c5cdcdd to be specific) using BinaryBuilder on a plethora of platforms, see https://buildkite.com/julialang/yggdrasil/builds/14160#0192b8f1-9f27-4a9c-885f-11b055685e7e for the build logs.

With the current dev branch all1 builds fail with a similar error message (see the logs on the link above). For example, for x86_64-linux-gnu:

/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:400:55:

     TYPE(AD_InflowType) , DIMENSION(:), ALLOCATABLE  :: Inflow      !< Inflow storage (size of u for history of inputs) [-]
                                                       1
Error: Derived type at (1) has not been previously defined and so cannot appear in a derived type definition
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4189:35:

    if (allocated(SrcMiscData%Inflow)) then
                                   1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4190:41:

       LB(1:1) = lbound(SrcMiscData%Inflow, kind=B8Ki)
                                         1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4191:41:

       UB(1:1) = ubound(SrcMiscData%Inflow, kind=B8Ki)
                                         1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4192:44:

       if (.not. allocated(DstMiscData%Inflow)) then
                                            1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4193:36:

          allocate(DstMiscData%Inflow(LB(1):UB(1)), stat=ErrStat2)
                                    1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4198:9:

       end if
         1
Error: Expecting END SUBROUTINE statement at (1)
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4200:50:

          call AD_CopyInflowType(SrcMiscData%Inflow(i1), DstMiscData%Inflow(i1), CtrlCode, ErrStat2, ErrMsg2)
                                                  1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4204:6:

    end if
      1
Error: Expecting END SUBROUTINE statement at (1)
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4249:32:

    if (allocated(MiscData%Inflow)) then
                                1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4250:38:

       LB(1:1) = lbound(MiscData%Inflow, kind=B8Ki)
                                      1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4251:38:

       UB(1:1) = ubound(MiscData%Inflow, kind=B8Ki)
                                      1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4253:50:

          call AD_DestroyInflowType(MiscData%Inflow(i1), ErrStat2, ErrMsg2)
                                                  1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4256:32:

       deallocate(MiscData%Inflow)
                                1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4257:6:

    end if
      1
Error: Expecting END SUBROUTINE statement at (1)
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4290:43:

    call RegPack(RF, allocated(InData%Inflow))
                                           1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4291:30:

    if (allocated(InData%Inflow)) then
                              1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4292:52:

       call RegPackBounds(RF, 1, lbound(InData%Inflow, kind=B8Ki), ubound(InData%Inflow, kind=B8Ki))
                                                    1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4293:36:

       LB(1:1) = lbound(InData%Inflow, kind=B8Ki)
                                    1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4294:36:

       UB(1:1) = ubound(InData%Inflow, kind=B8Ki)
                                    1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4296:49:

          call AD_PackInflowType(RF, InData%Inflow(i1))
                                                 1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4298:6:

    end if
      1
Error: Expecting END SUBROUTINE statement at (1)
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4342:31:

    if (allocated(OutData%Inflow)) deallocate(OutData%Inflow)
                               1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4346:29:

       allocate(OutData%Inflow(LB(1):UB(1)),stat=stat)
                             1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
/workspace/srcdir/openfast/modules/aerodyn/src/AeroDyn_Types.f90:4352:52:

          call AD_UnpackInflowType(RF, OutData%Inflow(i1)) ! Inflow
                                                    1
Error: ‘inflow’ at (1) is not a member of the ‘ad_miscvartype’ structure
make[2]: *** [modules/aerodyn/CMakeFiles/aerodynlib.dir/build.make:179: modules/aerodyn/CMakeFiles/aerodynlib.dir/src/AeroDyn_Types.f90.o] Error 1

OpenFAST have previously successfully been built on all the platforms above in the the same build environment (most recently commit 24c05a7). I am not very familiar with Fortran, much less with OpenFAST, so I don't think I can debug this any further.

Footnotes

  1. Strangely enough aarch64-apple-darwin successfully builds.

@andrew-platt
Copy link
Collaborator

On reviewing this, we see the underlying issue is an incompatibility of the AeroDyn_Types.f90 with the older gcc 8.x compilers. @fredrikekre confirmed that it works with gcc 13.

We may need to add a test for the minimum compiler version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants