Skip to content

use-mpi-f08: fix prototypes and more #13168

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/add_error_string_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

subroutine MPI_Add_error_string_f08(errorcode,string,ierror)
use :: ompi_mpifh_bindings, only : ompi_add_error_string_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
integer, intent(in) :: errorcode
character(len=*), intent(in) :: string
integer, optional, intent(out) :: ierror
integer :: c_ierror

call ompi_add_error_string_f(errorcode, string, c_ierror, len(string))
call ompi_add_error_string_f(errorcode, string, c_ierror, len(string,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Add_error_string_f08
136 changes: 68 additions & 68 deletions ompi/mpi/fortran/use-mpi-f08/bindings/mpi-f-interfaces-bind.h

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/close_port_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

subroutine MPI_Close_port_f08(port_name,ierror)
use :: ompi_mpifh_bindings, only : ompi_close_port_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
CHARACTER(LEN=*), INTENT(IN) :: port_name
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

call ompi_close_port_f(port_name,c_ierror,len(port_name))
call ompi_close_port_f(port_name,c_ierror,len(port_name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Close_port_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/comm_accept_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
subroutine MPI_Comm_accept_f08(port_name,info,root,comm,newcomm,ierror)
use :: mpi_f08_types, only : MPI_Info, MPI_Comm
use :: ompi_mpifh_bindings, only : ompi_comm_accept_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
CHARACTER(LEN=*), INTENT(IN) :: port_name
TYPE(MPI_Info), INTENT(IN) :: info
Expand All @@ -22,7 +23,7 @@ subroutine MPI_Comm_accept_f08(port_name,info,root,comm,newcomm,ierror)
integer :: c_ierror

call ompi_comm_accept_f(port_name,info%MPI_VAL,root,comm%MPI_VAL,newcomm%MPI_VAL, &
c_ierror,len(port_name))
c_ierror,len(port_name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Comm_accept_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/comm_connect_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
subroutine MPI_Comm_connect_f08(port_name,info,root,comm,newcomm,ierror)
use :: mpi_f08_types, only : MPI_Info, MPI_Comm
use :: ompi_mpifh_bindings, only : ompi_comm_connect_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
CHARACTER(LEN=*), INTENT(IN) :: port_name
TYPE(MPI_Info), INTENT(IN) :: info
Expand All @@ -22,7 +23,7 @@ subroutine MPI_Comm_connect_f08(port_name,info,root,comm,newcomm,ierror)
integer :: c_ierror

call ompi_comm_connect_f(port_name,info%MPI_VAL,root,comm%MPI_VAL,newcomm%MPI_VAL, &
c_ierror,len(port_name))
c_ierror,len(port_name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Comm_connect_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/comm_create_from_group_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
subroutine MPI_Comm_create_from_group_f08(group, stringtag, info, errhandler, newcomm, ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_Group, MPI_Errhandler, MPI_Info
use :: ompi_mpifh_bindings, only : ompi_comm_create_from_group_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Group), INTENT(IN) :: group
CHARACTER(LEN=*), INTENT(IN) :: stringtag
Expand All @@ -24,7 +25,7 @@ subroutine MPI_Comm_create_from_group_f08(group, stringtag, info, errhandler, ne
integer :: c_ierror

call ompi_comm_create_from_group_f(group%MPI_VAL, stringtag, info%MPI_VAL, errhandler%MPI_VAL, &
newcomm%MPI_VAL, c_ierror, len(stringtag))
newcomm%MPI_VAL, c_ierror, len(stringtag,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Comm_create_from_group_f08
Expand Down
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/comm_get_name_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
subroutine MPI_Comm_get_name_f08(comm,comm_name,resultlen,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_MAX_OBJECT_NAME
use :: ompi_mpifh_bindings, only : ompi_comm_get_name_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
CHARACTER(LEN=*), INTENT(OUT) :: comm_name
Expand All @@ -20,7 +21,7 @@ subroutine MPI_Comm_get_name_f08(comm,comm_name,resultlen,ierror)
integer :: c_ierror

call ompi_comm_get_name_f(comm%MPI_VAL,comm_name,resultlen,c_ierror, &
len(comm_name))
len(comm_name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Comm_get_name_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/comm_set_name_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
subroutine MPI_Comm_set_name_f08(comm,comm_name,ierror)
use :: mpi_f08_types, only : MPI_Comm
use :: ompi_mpifh_bindings, only : ompi_comm_set_name_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
CHARACTER(LEN=*), INTENT(IN) :: comm_name
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

call ompi_comm_set_name_f(comm%MPI_VAL,comm_name,c_ierror,len(comm_name))
call ompi_comm_set_name_f(comm%MPI_VAL,comm_name,c_ierror,len(comm_name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Comm_set_name_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/comm_spawn_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ subroutine MPI_Comm_spawn_f08(command,argv,maxprocs,info,root,comm,intercomm, &
array_of_errcodes,ierror)
use :: mpi_f08_types, only : MPI_Info, MPI_Comm
use :: ompi_mpifh_bindings, only : ompi_comm_spawn_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
CHARACTER(LEN=*), INTENT(IN) :: command, argv(*)
INTEGER, INTENT(IN) :: maxprocs, root
Expand All @@ -27,7 +28,7 @@ subroutine MPI_Comm_spawn_f08(command,argv,maxprocs,info,root,comm,intercomm, &
call ompi_comm_spawn_f(command,argv,maxprocs, &
info%MPI_VAL,root,comm%MPI_VAL,intercomm%MPI_VAL, &
array_of_errcodes,c_ierror, &
len(command), len(argv))
len(command,KIND=C_INT), len(argv,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Comm_spawn_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/comm_spawn_multiple_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ subroutine MPI_Comm_spawn_multiple_f08(count,array_of_commands,array_of_argv, &
comm,intercomm,array_of_errcodes,ierror)
use :: mpi_f08_types, only : MPI_Info, MPI_Comm
use :: ompi_mpifh_bindings, only : ompi_comm_spawn_multiple_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
INTEGER, INTENT(IN) :: count, root
INTEGER, INTENT(IN) :: array_of_maxprocs(count)
Expand All @@ -33,7 +34,7 @@ subroutine MPI_Comm_spawn_multiple_f08(count,array_of_commands,array_of_argv, &
call ompi_comm_spawn_multiple_f(count,array_of_commands,array_of_argv, &
array_of_maxprocs,array_of_info(:)%MPI_VAL,root, &
comm%MPI_VAL,intercomm%MPI_VAL,array_of_errcodes,c_ierror, &
len(array_of_commands), len(array_of_argv))
len(array_of_commands,KIND=C_INT), len(array_of_argv,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Comm_spawn_multiple_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/error_string_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

subroutine MPI_Error_string_f08(errorcode,string,resultlen,ierror)
use :: ompi_mpifh_bindings, only : ompi_error_string_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
integer, intent(in) :: errorcode
character(len=*), intent(out) :: string
integer, intent(out) :: resultlen
integer, optional, intent(out) :: ierror
integer :: c_ierror

call ompi_error_string_f(errorcode,string,resultlen,c_ierror,len(string))
call ompi_error_string_f(errorcode,string,resultlen,c_ierror,len(string,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Error_string_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/file_delete_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
subroutine MPI_File_delete_f08(filename,info,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: ompi_mpifh_bindings, only : ompi_file_delete_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
CHARACTER(LEN=*), INTENT(IN) :: filename
TYPE(MPI_Info), INTENT(IN) :: info
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

call ompi_file_delete_f(filename,info%MPI_VAL,c_ierror,len(filename))
call ompi_file_delete_f(filename,info%MPI_VAL,c_ierror,len(filename,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_File_delete_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/file_get_view_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
subroutine MPI_File_get_view_f08(fh,disp,etype,filetype,datarep,ierror)
use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_OFFSET_KIND
use :: ompi_mpifh_bindings, only : ompi_file_get_view_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_File), INTENT(IN) :: fh
INTEGER(MPI_OFFSET_KIND), INTENT(OUT) :: disp
Expand All @@ -22,7 +23,7 @@ subroutine MPI_File_get_view_f08(fh,disp,etype,filetype,datarep,ierror)
integer :: c_ierror

call ompi_file_get_view_f(fh%MPI_VAL,disp,etype%MPI_VAL,filetype%MPI_VAL, &
datarep,c_ierror,len(datarep))
datarep,c_ierror,len(datarep,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_File_get_view_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/file_open_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
subroutine MPI_File_open_f08(comm,filename,amode,info,fh,ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_Info, MPI_File
use :: ompi_mpifh_bindings, only : ompi_file_open_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
CHARACTER(LEN=*), INTENT(IN) :: filename
Expand All @@ -22,7 +23,7 @@ subroutine MPI_File_open_f08(comm,filename,amode,info,fh,ierror)
integer :: c_ierror

call ompi_file_open_f(comm%MPI_VAL,filename,amode,info%MPI_VAL,fh%MPI_VAL, &
c_ierror, len(filename))
c_ierror, len(filename,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_File_open_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/file_set_view_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
subroutine MPI_File_set_view_f08(fh,disp,etype,filetype,datarep,info,ierror)
use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Info, MPI_OFFSET_KIND
use :: ompi_mpifh_bindings, only : ompi_file_set_view_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_File), INTENT(IN) :: fh
INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: disp
Expand All @@ -23,7 +24,7 @@ subroutine MPI_File_set_view_f08(fh,disp,etype,filetype,datarep,info,ierror)
integer :: c_ierror

call ompi_file_set_view_f(fh%MPI_VAL,disp,etype%MPI_VAL,filetype%MPI_VAL, &
datarep,info%MPI_VAL,c_ierror,len(datarep))
datarep,info%MPI_VAL,c_ierror,len(datarep,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_File_set_view_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/get_library_version_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
subroutine MPI_Get_library_version_f08(version,resultlen,ierror)
use :: mpi_f08_types, only : MPI_MAX_LIBRARY_VERSION_STRING
use :: ompi_mpifh_bindings, only : ompi_get_library_version_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
character(len=MPI_MAX_LIBRARY_VERSION_STRING), intent(out) :: version
integer, intent(out) :: resultlen
integer, optional, intent(out) :: ierror
integer :: c_ierror

call ompi_get_library_version_f(version,resultlen,c_ierror,len(version))
call ompi_get_library_version_f(version,resultlen,c_ierror,len(version,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Get_library_version_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/get_processor_name_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

subroutine MPI_Get_processor_name_f08(name,resultlen,ierror)
use :: ompi_mpifh_bindings, only : ompi_get_processor_name_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
character(len=*), intent(out) :: name
integer, intent(out) :: resultlen
integer, optional, intent(out) :: ierror
integer :: c_ierror

call ompi_get_processor_name_f(name,resultlen,c_ierror,len(name))
call ompi_get_processor_name_f(name,resultlen,c_ierror,len(name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Get_processor_name_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/group_from_session_pset_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
subroutine MPI_Group_from_session_pset_f08(session, pset_name, newgroup, ierror)
use :: mpi_f08_types, only : MPI_Session, MPI_Group
use :: ompi_mpifh_bindings, only : ompi_group_from_session_pset_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Session), INTENT(IN) :: session
CHARACTER(LEN=*), INTENT(IN) :: pset_name
TYPE(MPI_Group), INTENT(OUT) :: newgroup
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

call ompi_group_from_session_pset_f(session%MPI_VAL, pset_name, newgroup%MPI_VAL, c_ierror, len(pset_name))
call ompi_group_from_session_pset_f(session%MPI_VAL, pset_name, newgroup%MPI_VAL, c_ierror, len(pset_name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Group_from_session_pset_f08
Expand Down
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/info_delete_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
subroutine MPI_Info_delete_f08(info,key,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: ompi_mpifh_bindings, only : ompi_info_delete_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Info), INTENT(IN) :: info
CHARACTER(LEN=*), INTENT(IN) :: key
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

call ompi_info_delete_f(info%MPI_VAL,key,c_ierror,len(key))
call ompi_info_delete_f(info%MPI_VAL,key,c_ierror,len(key,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Info_delete_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/info_get_nthkey_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
subroutine MPI_Info_get_nthkey_f08(info,n,key,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: ompi_mpifh_bindings, only : ompi_info_get_nthkey_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Info), INTENT(IN) :: info
INTEGER, INTENT(IN) :: n
CHARACTER(lEN=*), INTENT(OUT) :: key
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

call ompi_info_get_nthkey_f(info%MPI_VAL,n,key,c_ierror,len(key))
call ompi_info_get_nthkey_f(info%MPI_VAL,n,key,c_ierror,len(key,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Info_get_nthkey_f08
4 changes: 3 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/info_set_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
subroutine MPI_Info_set_f08(info,key,value,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: ompi_mpifh_bindings, only : ompi_info_set_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Info), INTENT(IN) :: info
CHARACTER(LEN=*), INTENT(IN) :: key, value
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

call ompi_info_set_f(info%MPI_VAL,key,value,c_ierror,len(key),len(value))
call ompi_info_set_f(info%MPI_VAL,key,value,c_ierror, &
len(key,KIND=C_INT),len(value,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Info_set_f08
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ subroutine MPI_Intercomm_create_from_groups_f08(local_group, local_leader, remot
newintercomm, ierror)
use :: mpi_f08_types, only : MPI_Comm, MPI_Group, MPI_Errhandler, MPI_Info
use :: ompi_mpifh_bindings, only : ompi_intercomm_create_from_groups_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Group), INTENT(IN) :: local_group, remote_group
INTEGER, INTENT(IN):: local_leader, remote_leader
Expand All @@ -30,7 +31,7 @@ subroutine MPI_Intercomm_create_from_groups_f08(local_group, local_leader, remot
remote_group%MPI_VAL, &
remote_leader, stringtag, info%MPI_VAL, &
errhandler%MPI_VAL, &
newintercomm%MPI_VAL, c_ierror, len(stringtag))
newintercomm%MPI_VAL, c_ierror, len(stringtag,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Intercomm_create_from_groups_f08
Expand Down
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/lookup_name_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
subroutine MPI_Lookup_name_f08(service_name,info,port_name,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: ompi_mpifh_bindings, only : ompi_lookup_name_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
CHARACTER(LEN=*), INTENT(IN) :: service_name
TYPE(MPI_Info), INTENT(IN) :: info
Expand All @@ -20,7 +21,7 @@ subroutine MPI_Lookup_name_f08(service_name,info,port_name,ierror)
integer :: c_ierror

call ompi_lookup_name_f(service_name,info%MPI_VAL,port_name,c_ierror, &
len(service_name),len(port_name))
len(service_name,KIND=C_INT),len(port_name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Lookup_name_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/open_port_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
subroutine MPI_Open_port_f08(info,port_name,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: ompi_mpifh_bindings, only : ompi_open_port_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Info), INTENT(IN) :: info
CHARACTER(LEN=*), INTENT(OUT) :: port_name
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

call ompi_open_port_f(info%MPI_VAL,port_name,c_ierror,len(port_name))
call ompi_open_port_f(info%MPI_VAL,port_name,c_ierror,len(port_name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Open_port_f08
3 changes: 2 additions & 1 deletion ompi/mpi/fortran/use-mpi-f08/publish_name_f08.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
subroutine MPI_Publish_name_f08(service_name,info,port_name,ierror)
use :: mpi_f08_types, only : MPI_Info
use :: ompi_mpifh_bindings, only : ompi_publish_name_f
use, intrinsic :: ISO_C_BINDING, only : C_INT
implicit none
TYPE(MPI_Info), INTENT(IN) :: info
CHARACTER(LEN=*), INTENT(IN) :: service_name, port_name
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

call ompi_publish_name_f(service_name,info%MPI_VAL,port_name,c_ierror, &
len(service_name), len(port_name))
len(service_name,KIND=C_INT), len(port_name,KIND=C_INT))
if (present(ierror)) ierror = c_ierror

end subroutine MPI_Publish_name_f08
Loading