This function splits mp_comm into two pieces, one with nprocs_new procs, and one with all the remainder. For the remainder, included is set to false. This means that the remainder will lie idle.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nprocs_new |
subroutine use_nproc(nprocs_new)
implicit none
integer, intent(in) :: nprocs_new
integer :: colour
included = (iproc < nprocs_new)
colour = 1
if (included) colour = 0
call split_all(colour)
end subroutine use_nproc