Skip to content

Name the MPI_Bcast subroutines as per the input args they can take #71

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
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
12 changes: 6 additions & 6 deletions src/mpi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ module mpi
end interface MPI_Comm_size

interface MPI_Bcast
module procedure MPI_Bcast_int
module procedure MPI_Bcast_real
module procedure MPI_Bcast_int_scalar
module procedure MPI_Bcast_real_2D
end interface MPI_Bcast

interface MPI_Allgather
Expand Down Expand Up @@ -199,7 +199,7 @@ subroutine MPI_Comm_size_proc(comm, size, ierror)
end if
end subroutine

subroutine MPI_Bcast_int(buffer, count, datatype, root, comm, ierror)
subroutine MPI_Bcast_int_scalar(buffer, count, datatype, root, comm, ierror)
use mpi_c_bindings, only: c_mpi_bcast, c_mpi_comm_f2c, c_mpi_datatype_f2c
use iso_c_binding, only: c_int, c_ptr, c_loc
integer, target :: buffer
Expand All @@ -223,9 +223,9 @@ subroutine MPI_Bcast_int(buffer, count, datatype, root, comm, ierror)
print *, "MPI_Bcast_int failed with error code: ", local_ierr
end if
end if
end subroutine MPI_Bcast_int
end subroutine MPI_Bcast_int_scalar

subroutine MPI_Bcast_real(buffer, count, datatype, root, comm, ierror)
subroutine MPI_Bcast_real_2D(buffer, count, datatype, root, comm, ierror)
use mpi_c_bindings, only: c_mpi_bcast, c_mpi_comm_f2c, c_mpi_datatype_f2c
use iso_c_binding, only: c_int, c_ptr, c_loc
real(8), dimension(:, :), target :: buffer
Expand All @@ -249,7 +249,7 @@ subroutine MPI_Bcast_real(buffer, count, datatype, root, comm, ierror)
print *, "MPI_Bcast_real failed with error code: ", local_ierr
end if
end if
end subroutine MPI_Bcast_real
end subroutine MPI_Bcast_real_2D

subroutine MPI_Allgather_int(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror)
use mpi_c_bindings, only: c_mpi_allgather_int
Expand Down