Skip to content

Conversation

@artpol84
Copy link
Contributor

C and FORTRAN handle strings differently (see here and here).

  • In C they are null-terminated
  • In FORTRAN - arrays with known length (possibly padded with spaces at the end)

FORTRAN puts the hidden parameters with lengths at the end of the subroutine list. This needs to be considered in the F77 wrapper.
Open MPI handles this in the similar manner.

Way to reproduce:

  • Use the following simple MPI-IO test
  • On my platform with the current mpiP version I'm getting testfilenative as C binds two strings from MPI_File_open and MPI_File_set_view together because \0 is missing.
  • With this fix the filename is correct.

NOTES:

@artpol84
Copy link
Contributor Author

@cchambreau I've rebased this one as well and dropped dependency from #14. Son once #13 is in we can rebase/merge this one.

@artpol84
Copy link
Contributor Author

@cchambreau, rebased on top of #13

@cchambreau cchambreau merged commit 68c2d0e into LLNL:master Aug 29, 2019
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

Successfully merging this pull request may close these issues.

2 participants