Get Processor Id and total number of processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(controltype), | intent(inout) | :: | control | Control parameters |
subroutine get_process_data(control)
!<Get Processor Id and total number of processors
implicit none
type(controltype), intent(inout) :: control
!< Control parameters
! Finds and sets process data
integer :: ierr
call MPI_COMM_RANK(MPI_COMM_WORLD,control%process_id,ierr)
call MPI_COMM_SIZE(MPI_COMM_WORLD,control%total_process,ierr)
process_id = control%process_id
end subroutine get_process_data