Skip to content

remove duplicate function 'get_c_datatype_from_fortran' #66

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 1 commit into from
Mar 31, 2025
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
4 changes: 2 additions & 2 deletions src/mpi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ subroutine MPI_Isend_3d(buf, count, datatype, dest, tag, comm, request, ierror)

subroutine MPI_Irecv_proc(buf, count, datatype, source, tag, comm, request, ierror)
use iso_c_binding, only: c_int, c_ptr
use mpi_c_bindings, only: c_mpi_irecv, c_mpi_comm_f2c, get_c_datatype_from_fortran, c_mpi_request_c2f
use mpi_c_bindings, only: c_mpi_irecv, c_mpi_comm_f2c, c_mpi_datatype_f2c, c_mpi_request_c2f
real(8), dimension(:,:) :: buf
integer, intent(in) :: count, source, tag
integer, intent(in) :: datatype
Expand All @@ -310,7 +310,7 @@ subroutine MPI_Irecv_proc(buf, count, datatype, source, tag, comm, request, ierr
type(c_ptr) :: c_request

c_comm = c_mpi_comm_f2c(comm)
c_datatype = get_c_datatype_from_fortran(datatype)
c_datatype = c_mpi_datatype_f2c(datatype)
local_ierr = c_mpi_irecv(buf, count, c_datatype, source, tag, c_comm, c_request)
request = c_mpi_request_c2f(c_request)

Expand Down
6 changes: 0 additions & 6 deletions src/mpi_c_bindings.f90
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ function c_mpi_comm_c2f(comm_c) bind(C, name="MPI_Comm_c2f")
integer(c_int) :: c_mpi_comm_c2f
end function

function get_c_datatype_from_fortran(datatype) bind(C, name="get_c_datatype_from_fortran")
use iso_c_binding, only: c_int, c_ptr
integer(c_int), value :: datatype
type(c_ptr) :: get_c_datatype_from_fortran
end function get_c_datatype_from_fortran

function c_mpi_request_c2f(request) bind(C, name="MPI_Request_c2f")
use iso_c_binding, only: c_int, c_ptr
type(c_ptr), value :: request
Expand Down