Skip to content

Commit 32bfff1

Browse files
authored
Merge pull request #13168 from hppritcha/fix_binding_issue_for_use_mpi_f08_funcs
use-mpi-f08: fix prototypes and more
2 parents 32966da + 99cffec commit 32bfff1

33 files changed

+139
-102
lines changed

ompi/mpi/fortran/use-mpi-f08/add_error_string_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
subroutine MPI_Add_error_string_f08(errorcode,string,ierror)
1313
use :: ompi_mpifh_bindings, only : ompi_add_error_string_f
14+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1415
implicit none
1516
integer, intent(in) :: errorcode
1617
character(len=*), intent(in) :: string
1718
integer, optional, intent(out) :: ierror
1819
integer :: c_ierror
1920

20-
call ompi_add_error_string_f(errorcode, string, c_ierror, len(string))
21+
call ompi_add_error_string_f(errorcode, string, c_ierror, len(string,KIND=C_INT))
2122
if (present(ierror)) ierror = c_ierror
2223

2324
end subroutine MPI_Add_error_string_f08

ompi/mpi/fortran/use-mpi-f08/bindings/mpi-f-interfaces-bind.h

+68-68
Large diffs are not rendered by default.

ompi/mpi/fortran/use-mpi-f08/close_port_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111

1212
subroutine MPI_Close_port_f08(port_name,ierror)
1313
use :: ompi_mpifh_bindings, only : ompi_close_port_f
14+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1415
implicit none
1516
CHARACTER(LEN=*), INTENT(IN) :: port_name
1617
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1718
integer :: c_ierror
1819

19-
call ompi_close_port_f(port_name,c_ierror,len(port_name))
20+
call ompi_close_port_f(port_name,c_ierror,len(port_name,KIND=C_INT))
2021
if (present(ierror)) ierror = c_ierror
2122

2223
end subroutine MPI_Close_port_f08

ompi/mpi/fortran/use-mpi-f08/comm_accept_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
subroutine MPI_Comm_accept_f08(port_name,info,root,comm,newcomm,ierror)
1313
use :: mpi_f08_types, only : MPI_Info, MPI_Comm
1414
use :: ompi_mpifh_bindings, only : ompi_comm_accept_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
CHARACTER(LEN=*), INTENT(IN) :: port_name
1718
TYPE(MPI_Info), INTENT(IN) :: info
@@ -22,7 +23,7 @@ subroutine MPI_Comm_accept_f08(port_name,info,root,comm,newcomm,ierror)
2223
integer :: c_ierror
2324

2425
call ompi_comm_accept_f(port_name,info%MPI_VAL,root,comm%MPI_VAL,newcomm%MPI_VAL, &
25-
c_ierror,len(port_name))
26+
c_ierror,len(port_name,KIND=C_INT))
2627
if (present(ierror)) ierror = c_ierror
2728

2829
end subroutine MPI_Comm_accept_f08

ompi/mpi/fortran/use-mpi-f08/comm_connect_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
subroutine MPI_Comm_connect_f08(port_name,info,root,comm,newcomm,ierror)
1313
use :: mpi_f08_types, only : MPI_Info, MPI_Comm
1414
use :: ompi_mpifh_bindings, only : ompi_comm_connect_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
CHARACTER(LEN=*), INTENT(IN) :: port_name
1718
TYPE(MPI_Info), INTENT(IN) :: info
@@ -22,7 +23,7 @@ subroutine MPI_Comm_connect_f08(port_name,info,root,comm,newcomm,ierror)
2223
integer :: c_ierror
2324

2425
call ompi_comm_connect_f(port_name,info%MPI_VAL,root,comm%MPI_VAL,newcomm%MPI_VAL, &
25-
c_ierror,len(port_name))
26+
c_ierror,len(port_name,KIND=C_INT))
2627
if (present(ierror)) ierror = c_ierror
2728

2829
end subroutine MPI_Comm_connect_f08

ompi/mpi/fortran/use-mpi-f08/comm_create_from_group_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
subroutine MPI_Comm_create_from_group_f08(group, stringtag, info, errhandler, newcomm, ierror)
1515
use :: mpi_f08_types, only : MPI_Comm, MPI_Group, MPI_Errhandler, MPI_Info
1616
use :: ompi_mpifh_bindings, only : ompi_comm_create_from_group_f
17+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1718
implicit none
1819
TYPE(MPI_Group), INTENT(IN) :: group
1920
CHARACTER(LEN=*), INTENT(IN) :: stringtag
@@ -24,7 +25,7 @@ subroutine MPI_Comm_create_from_group_f08(group, stringtag, info, errhandler, ne
2425
integer :: c_ierror
2526

2627
call ompi_comm_create_from_group_f(group%MPI_VAL, stringtag, info%MPI_VAL, errhandler%MPI_VAL, &
27-
newcomm%MPI_VAL, c_ierror, len(stringtag))
28+
newcomm%MPI_VAL, c_ierror, len(stringtag,KIND=C_INT))
2829
if (present(ierror)) ierror = c_ierror
2930

3031
end subroutine MPI_Comm_create_from_group_f08

ompi/mpi/fortran/use-mpi-f08/comm_get_name_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
subroutine MPI_Comm_get_name_f08(comm,comm_name,resultlen,ierror)
1313
use :: mpi_f08_types, only : MPI_Comm, MPI_MAX_OBJECT_NAME
1414
use :: ompi_mpifh_bindings, only : ompi_comm_get_name_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_Comm), INTENT(IN) :: comm
1718
CHARACTER(LEN=*), INTENT(OUT) :: comm_name
@@ -20,7 +21,7 @@ subroutine MPI_Comm_get_name_f08(comm,comm_name,resultlen,ierror)
2021
integer :: c_ierror
2122

2223
call ompi_comm_get_name_f(comm%MPI_VAL,comm_name,resultlen,c_ierror, &
23-
len(comm_name))
24+
len(comm_name,KIND=C_INT))
2425
if (present(ierror)) ierror = c_ierror
2526

2627
end subroutine MPI_Comm_get_name_f08

ompi/mpi/fortran/use-mpi-f08/comm_set_name_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
subroutine MPI_Comm_set_name_f08(comm,comm_name,ierror)
1313
use :: mpi_f08_types, only : MPI_Comm
1414
use :: ompi_mpifh_bindings, only : ompi_comm_set_name_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_Comm), INTENT(IN) :: comm
1718
CHARACTER(LEN=*), INTENT(IN) :: comm_name
1819
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1920
integer :: c_ierror
2021

21-
call ompi_comm_set_name_f(comm%MPI_VAL,comm_name,c_ierror,len(comm_name))
22+
call ompi_comm_set_name_f(comm%MPI_VAL,comm_name,c_ierror,len(comm_name,KIND=C_INT))
2223
if (present(ierror)) ierror = c_ierror
2324

2425
end subroutine MPI_Comm_set_name_f08

ompi/mpi/fortran/use-mpi-f08/comm_spawn_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ subroutine MPI_Comm_spawn_f08(command,argv,maxprocs,info,root,comm,intercomm, &
1414
array_of_errcodes,ierror)
1515
use :: mpi_f08_types, only : MPI_Info, MPI_Comm
1616
use :: ompi_mpifh_bindings, only : ompi_comm_spawn_f
17+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1718
implicit none
1819
CHARACTER(LEN=*), INTENT(IN) :: command, argv(*)
1920
INTEGER, INTENT(IN) :: maxprocs, root
@@ -27,7 +28,7 @@ subroutine MPI_Comm_spawn_f08(command,argv,maxprocs,info,root,comm,intercomm, &
2728
call ompi_comm_spawn_f(command,argv,maxprocs, &
2829
info%MPI_VAL,root,comm%MPI_VAL,intercomm%MPI_VAL, &
2930
array_of_errcodes,c_ierror, &
30-
len(command), len(argv))
31+
len(command,KIND=C_INT), len(argv,KIND=C_INT))
3132
if (present(ierror)) ierror = c_ierror
3233

3334
end subroutine MPI_Comm_spawn_f08

ompi/mpi/fortran/use-mpi-f08/comm_spawn_multiple_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ subroutine MPI_Comm_spawn_multiple_f08(count,array_of_commands,array_of_argv, &
1515
comm,intercomm,array_of_errcodes,ierror)
1616
use :: mpi_f08_types, only : MPI_Info, MPI_Comm
1717
use :: ompi_mpifh_bindings, only : ompi_comm_spawn_multiple_f
18+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1819
implicit none
1920
INTEGER, INTENT(IN) :: count, root
2021
INTEGER, INTENT(IN) :: array_of_maxprocs(count)
@@ -33,7 +34,7 @@ subroutine MPI_Comm_spawn_multiple_f08(count,array_of_commands,array_of_argv, &
3334
call ompi_comm_spawn_multiple_f(count,array_of_commands,array_of_argv, &
3435
array_of_maxprocs,array_of_info(:)%MPI_VAL,root, &
3536
comm%MPI_VAL,intercomm%MPI_VAL,array_of_errcodes,c_ierror, &
36-
len(array_of_commands), len(array_of_argv))
37+
len(array_of_commands,KIND=C_INT), len(array_of_argv,KIND=C_INT))
3738
if (present(ierror)) ierror = c_ierror
3839

3940
end subroutine MPI_Comm_spawn_multiple_f08

ompi/mpi/fortran/use-mpi-f08/error_string_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111

1212
subroutine MPI_Error_string_f08(errorcode,string,resultlen,ierror)
1313
use :: ompi_mpifh_bindings, only : ompi_error_string_f
14+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1415
implicit none
1516
integer, intent(in) :: errorcode
1617
character(len=*), intent(out) :: string
1718
integer, intent(out) :: resultlen
1819
integer, optional, intent(out) :: ierror
1920
integer :: c_ierror
2021

21-
call ompi_error_string_f(errorcode,string,resultlen,c_ierror,len(string))
22+
call ompi_error_string_f(errorcode,string,resultlen,c_ierror,len(string,KIND=C_INT))
2223
if (present(ierror)) ierror = c_ierror
2324

2425
end subroutine MPI_Error_string_f08

ompi/mpi/fortran/use-mpi-f08/file_delete_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
subroutine MPI_File_delete_f08(filename,info,ierror)
1313
use :: mpi_f08_types, only : MPI_Info
1414
use :: ompi_mpifh_bindings, only : ompi_file_delete_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
CHARACTER(LEN=*), INTENT(IN) :: filename
1718
TYPE(MPI_Info), INTENT(IN) :: info
1819
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1920
integer :: c_ierror
2021

21-
call ompi_file_delete_f(filename,info%MPI_VAL,c_ierror,len(filename))
22+
call ompi_file_delete_f(filename,info%MPI_VAL,c_ierror,len(filename,KIND=C_INT))
2223
if (present(ierror)) ierror = c_ierror
2324

2425
end subroutine MPI_File_delete_f08

ompi/mpi/fortran/use-mpi-f08/file_get_view_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
subroutine MPI_File_get_view_f08(fh,disp,etype,filetype,datarep,ierror)
1313
use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_OFFSET_KIND
1414
use :: ompi_mpifh_bindings, only : ompi_file_get_view_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_File), INTENT(IN) :: fh
1718
INTEGER(MPI_OFFSET_KIND), INTENT(OUT) :: disp
@@ -22,7 +23,7 @@ subroutine MPI_File_get_view_f08(fh,disp,etype,filetype,datarep,ierror)
2223
integer :: c_ierror
2324

2425
call ompi_file_get_view_f(fh%MPI_VAL,disp,etype%MPI_VAL,filetype%MPI_VAL, &
25-
datarep,c_ierror,len(datarep))
26+
datarep,c_ierror,len(datarep,KIND=C_INT))
2627
if (present(ierror)) ierror = c_ierror
2728

2829
end subroutine MPI_File_get_view_f08

ompi/mpi/fortran/use-mpi-f08/file_open_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
subroutine MPI_File_open_f08(comm,filename,amode,info,fh,ierror)
1313
use :: mpi_f08_types, only : MPI_Comm, MPI_Info, MPI_File
1414
use :: ompi_mpifh_bindings, only : ompi_file_open_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_Comm), INTENT(IN) :: comm
1718
CHARACTER(LEN=*), INTENT(IN) :: filename
@@ -22,7 +23,7 @@ subroutine MPI_File_open_f08(comm,filename,amode,info,fh,ierror)
2223
integer :: c_ierror
2324

2425
call ompi_file_open_f(comm%MPI_VAL,filename,amode,info%MPI_VAL,fh%MPI_VAL, &
25-
c_ierror, len(filename))
26+
c_ierror, len(filename,KIND=C_INT))
2627
if (present(ierror)) ierror = c_ierror
2728

2829
end subroutine MPI_File_open_f08

ompi/mpi/fortran/use-mpi-f08/file_set_view_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
subroutine MPI_File_set_view_f08(fh,disp,etype,filetype,datarep,info,ierror)
1313
use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Info, MPI_OFFSET_KIND
1414
use :: ompi_mpifh_bindings, only : ompi_file_set_view_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_File), INTENT(IN) :: fh
1718
INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: disp
@@ -23,7 +24,7 @@ subroutine MPI_File_set_view_f08(fh,disp,etype,filetype,datarep,info,ierror)
2324
integer :: c_ierror
2425

2526
call ompi_file_set_view_f(fh%MPI_VAL,disp,etype%MPI_VAL,filetype%MPI_VAL, &
26-
datarep,info%MPI_VAL,c_ierror,len(datarep))
27+
datarep,info%MPI_VAL,c_ierror,len(datarep,KIND=C_INT))
2728
if (present(ierror)) ierror = c_ierror
2829

2930
end subroutine MPI_File_set_view_f08

ompi/mpi/fortran/use-mpi-f08/get_library_version_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
subroutine MPI_Get_library_version_f08(version,resultlen,ierror)
1313
use :: mpi_f08_types, only : MPI_MAX_LIBRARY_VERSION_STRING
1414
use :: ompi_mpifh_bindings, only : ompi_get_library_version_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
character(len=MPI_MAX_LIBRARY_VERSION_STRING), intent(out) :: version
1718
integer, intent(out) :: resultlen
1819
integer, optional, intent(out) :: ierror
1920
integer :: c_ierror
2021

21-
call ompi_get_library_version_f(version,resultlen,c_ierror,len(version))
22+
call ompi_get_library_version_f(version,resultlen,c_ierror,len(version,KIND=C_INT))
2223
if (present(ierror)) ierror = c_ierror
2324

2425
end subroutine MPI_Get_library_version_f08

ompi/mpi/fortran/use-mpi-f08/get_processor_name_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
subroutine MPI_Get_processor_name_f08(name,resultlen,ierror)
1313
use :: ompi_mpifh_bindings, only : ompi_get_processor_name_f
14+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1415
implicit none
1516
character(len=*), intent(out) :: name
1617
integer, intent(out) :: resultlen
1718
integer, optional, intent(out) :: ierror
1819
integer :: c_ierror
1920

20-
call ompi_get_processor_name_f(name,resultlen,c_ierror,len(name))
21+
call ompi_get_processor_name_f(name,resultlen,c_ierror,len(name,KIND=C_INT))
2122
if (present(ierror)) ierror = c_ierror
2223

2324
end subroutine MPI_Get_processor_name_f08

ompi/mpi/fortran/use-mpi-f08/group_from_session_pset_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
subroutine MPI_Group_from_session_pset_f08(session, pset_name, newgroup, ierror)
1616
use :: mpi_f08_types, only : MPI_Session, MPI_Group
1717
use :: ompi_mpifh_bindings, only : ompi_group_from_session_pset_f
18+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1819
implicit none
1920
TYPE(MPI_Session), INTENT(IN) :: session
2021
CHARACTER(LEN=*), INTENT(IN) :: pset_name
2122
TYPE(MPI_Group), INTENT(OUT) :: newgroup
2223
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
2324
integer :: c_ierror
2425

25-
call ompi_group_from_session_pset_f(session%MPI_VAL, pset_name, newgroup%MPI_VAL, c_ierror, len(pset_name))
26+
call ompi_group_from_session_pset_f(session%MPI_VAL, pset_name, newgroup%MPI_VAL, c_ierror, len(pset_name,KIND=C_INT))
2627
if (present(ierror)) ierror = c_ierror
2728

2829
end subroutine MPI_Group_from_session_pset_f08

ompi/mpi/fortran/use-mpi-f08/info_delete_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
subroutine MPI_Info_delete_f08(info,key,ierror)
1313
use :: mpi_f08_types, only : MPI_Info
1414
use :: ompi_mpifh_bindings, only : ompi_info_delete_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_Info), INTENT(IN) :: info
1718
CHARACTER(LEN=*), INTENT(IN) :: key
1819
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1920
integer :: c_ierror
2021

21-
call ompi_info_delete_f(info%MPI_VAL,key,c_ierror,len(key))
22+
call ompi_info_delete_f(info%MPI_VAL,key,c_ierror,len(key,KIND=C_INT))
2223
if (present(ierror)) ierror = c_ierror
2324

2425
end subroutine MPI_Info_delete_f08

ompi/mpi/fortran/use-mpi-f08/info_get_nthkey_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
subroutine MPI_Info_get_nthkey_f08(info,n,key,ierror)
1313
use :: mpi_f08_types, only : MPI_Info
1414
use :: ompi_mpifh_bindings, only : ompi_info_get_nthkey_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_Info), INTENT(IN) :: info
1718
INTEGER, INTENT(IN) :: n
1819
CHARACTER(lEN=*), INTENT(OUT) :: key
1920
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
2021
integer :: c_ierror
2122

22-
call ompi_info_get_nthkey_f(info%MPI_VAL,n,key,c_ierror,len(key))
23+
call ompi_info_get_nthkey_f(info%MPI_VAL,n,key,c_ierror,len(key,KIND=C_INT))
2324
if (present(ierror)) ierror = c_ierror
2425

2526
end subroutine MPI_Info_get_nthkey_f08

ompi/mpi/fortran/use-mpi-f08/info_set_f08.F90

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
subroutine MPI_Info_set_f08(info,key,value,ierror)
1313
use :: mpi_f08_types, only : MPI_Info
1414
use :: ompi_mpifh_bindings, only : ompi_info_set_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_Info), INTENT(IN) :: info
1718
CHARACTER(LEN=*), INTENT(IN) :: key, value
1819
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1920
integer :: c_ierror
2021

21-
call ompi_info_set_f(info%MPI_VAL,key,value,c_ierror,len(key),len(value))
22+
call ompi_info_set_f(info%MPI_VAL,key,value,c_ierror, &
23+
len(key,KIND=C_INT),len(value,KIND=C_INT))
2224
if (present(ierror)) ierror = c_ierror
2325

2426
end subroutine MPI_Info_set_f08

ompi/mpi/fortran/use-mpi-f08/intercomm_create_from_groups_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ subroutine MPI_Intercomm_create_from_groups_f08(local_group, local_leader, remot
1616
newintercomm, ierror)
1717
use :: mpi_f08_types, only : MPI_Comm, MPI_Group, MPI_Errhandler, MPI_Info
1818
use :: ompi_mpifh_bindings, only : ompi_intercomm_create_from_groups_f
19+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1920
implicit none
2021
TYPE(MPI_Group), INTENT(IN) :: local_group, remote_group
2122
INTEGER, INTENT(IN):: local_leader, remote_leader
@@ -30,7 +31,7 @@ subroutine MPI_Intercomm_create_from_groups_f08(local_group, local_leader, remot
3031
remote_group%MPI_VAL, &
3132
remote_leader, stringtag, info%MPI_VAL, &
3233
errhandler%MPI_VAL, &
33-
newintercomm%MPI_VAL, c_ierror, len(stringtag))
34+
newintercomm%MPI_VAL, c_ierror, len(stringtag,KIND=C_INT))
3435
if (present(ierror)) ierror = c_ierror
3536

3637
end subroutine MPI_Intercomm_create_from_groups_f08

ompi/mpi/fortran/use-mpi-f08/lookup_name_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
subroutine MPI_Lookup_name_f08(service_name,info,port_name,ierror)
1313
use :: mpi_f08_types, only : MPI_Info
1414
use :: ompi_mpifh_bindings, only : ompi_lookup_name_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
CHARACTER(LEN=*), INTENT(IN) :: service_name
1718
TYPE(MPI_Info), INTENT(IN) :: info
@@ -20,7 +21,7 @@ subroutine MPI_Lookup_name_f08(service_name,info,port_name,ierror)
2021
integer :: c_ierror
2122

2223
call ompi_lookup_name_f(service_name,info%MPI_VAL,port_name,c_ierror, &
23-
len(service_name),len(port_name))
24+
len(service_name,KIND=C_INT),len(port_name,KIND=C_INT))
2425
if (present(ierror)) ierror = c_ierror
2526

2627
end subroutine MPI_Lookup_name_f08

ompi/mpi/fortran/use-mpi-f08/open_port_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
subroutine MPI_Open_port_f08(info,port_name,ierror)
1313
use :: mpi_f08_types, only : MPI_Info
1414
use :: ompi_mpifh_bindings, only : ompi_open_port_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_Info), INTENT(IN) :: info
1718
CHARACTER(LEN=*), INTENT(OUT) :: port_name
1819
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1920
integer :: c_ierror
2021

21-
call ompi_open_port_f(info%MPI_VAL,port_name,c_ierror,len(port_name))
22+
call ompi_open_port_f(info%MPI_VAL,port_name,c_ierror,len(port_name,KIND=C_INT))
2223
if (present(ierror)) ierror = c_ierror
2324

2425
end subroutine MPI_Open_port_f08

ompi/mpi/fortran/use-mpi-f08/publish_name_f08.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
subroutine MPI_Publish_name_f08(service_name,info,port_name,ierror)
1313
use :: mpi_f08_types, only : MPI_Info
1414
use :: ompi_mpifh_bindings, only : ompi_publish_name_f
15+
use, intrinsic :: ISO_C_BINDING, only : C_INT
1516
implicit none
1617
TYPE(MPI_Info), INTENT(IN) :: info
1718
CHARACTER(LEN=*), INTENT(IN) :: service_name, port_name
1819
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1920
integer :: c_ierror
2021

2122
call ompi_publish_name_f(service_name,info%MPI_VAL,port_name,c_ierror, &
22-
len(service_name), len(port_name))
23+
len(service_name,KIND=C_INT), len(port_name,KIND=C_INT))
2324
if (present(ierror)) ierror = c_ierror
2425

2526
end subroutine MPI_Publish_name_f08

0 commit comments

Comments
 (0)