Skip to content

Commit

Permalink
Merge pull request pmodels#6694 from hzhou/2309_f90_ierr
Browse files Browse the repository at this point in the history
binding/f90: fix ierr as ierror

Approved-by: Ken Raffenetti
  • Loading branch information
hzhou authored Sep 25, 2023
2 parents 16e1e60 + 66a7300 commit ab0b77d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

# Use the error handler bound to MPI_COMM_SELF as the default error handler.

# Use ierror instead of ierr in "use mpi" Fortran interface. This affects
user code if they call with explicit keyword, e.g. call MPI_Init(ierr=arg).
"ierror" is the correct name specified in the MPI specification. We only
added subroutine interface in "mpi.mod" since 4.1.

===============================================================================
Changes in 4.1
===============================================================================
Expand Down
4 changes: 2 additions & 2 deletions maint/local_python/binding_f90.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def dump_ignore_tkr():
G.out.append("")
if 'return' not in func:
if not len(f_param_list) or not RE.match(r'ierr(or)?', f_param_list[-1]):
f_param_list.append('ierr')
decl_list.append("INTEGER :: ierr")
f_param_list.append('ierror')
decl_list.append("INTEGER :: ierror")
dump_fortran_line("SUBROUTINE %s(%s)" % (func_name, ', '.join(f_param_list)))
else:
dump_fortran_line("FUNCTION %s(%s) result(res)" % (func_name, ', '.join(f_param_list)))
Expand Down

0 comments on commit ab0b77d

Please sign in to comment.