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 with gfortran fails on current master at time of opening this issue. #2

Open
jreniel opened this issue May 1, 2022 · 1 comment

Comments

@jreniel
Copy link

jreniel commented May 1, 2022

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

@alisonpeard
Copy link

I have also experienced this issue - thanks for the fix.

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

No branches or pull requests

2 participants