Skip to content

Compilation with gfortran fails on current master at time of opening this issue. #2

@jreniel

Description

@jreniel

The commit reference is: 6f1dd96
When compiling with gfortran 11.2.0 we get the error:

../../../src/xbeachlibrary/mnemoniciso.F90:13:52:

   13 |       character(kind=c_char, len=maxnamelen) :: name     ! 'v','ve', .....
      |                                                    1
Error: Component 'name' of BIND(C) type at (1) must have length one
../../../src/xbeachlibrary/mnemoniciso.F90:14:45:

   14 |       character(kind=c_char, len=20) :: units     ! m, following udunits convention
      |                                             1
Error: Component 'units' of BIND(C) type at (1) must have length one
../../../src/xbeachlibrary/mnemoniciso.F90:15:53:

   15 |       character(kind=c_char, len=1024) :: description
      |                                                     1
Error: Component 'description' of BIND(C) type at (1) must have length one
../../../src/xbeachlibrary/mnemoniciso.F90:16:70:

   16 |       character(kind=c_char, len=20), dimension(maxrank) :: dimensions ! the dimensions of the variable, for example (s%nx, s%ny)
      |                                                                      1
Error: Component 'dimensions' of BIND(C) type at (1) must have length one

Proposed solution is (this has been tested):
On src/xbeachlibrary/mnemoniciso.F90 lines 13 - 16, change to:

      character(kind=c_char) :: name(maxnamelen)     ! 'v','ve', .....
      character(kind=c_char) :: units(20) ! m, following udunits convention
      character(kind=c_char) :: description(1024)
      character(kind=c_char), dimension(maxrank) :: dimensions(20)

I would do a pull request but if I understood correctly, this is just a mirror and SVN wouldn't update, so I leave this here for your attention.

Thanks,
-Jaime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions