Broadcast a scalar from MPI rank 'fromRank' to all MPI ranks.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | scalar_int | |||
| integer | :: | fromRank |
SUBROUTINE par_Bcast_scalar_int(scalar_int,fromRank) ! MODULES USE MODgvec_Globals, ONLY : wp IMPLICIT NONE !-------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES INTEGER, INTENT(INOUT) :: scalar_int INTEGER :: fromRank !-------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES # if MPI INTEGER :: ierr !================================================================================================================================ ! BODY CALL MPI_Bcast(scalar_int, 1, MPI_INTEGER, fromRank, worldComm, ierr) # endif END SUBROUTINE par_Bcast_scalar_int