Switch the module communicator (and size/rank variables) between different scopes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | focus |
Which scope to use. Should be one of allprocs, multigs2procs, subprocs. Other values are equivalent to subprocs |
subroutine scope (focus)
!> Which scope to use. Should be one of [[allprocs]], [[multigs2procs]],
!> [[subprocs]]. Other values are equivalent to [[subprocs]]
integer, intent (in) :: focus
# ifdef MPI
!$OMP MASTER
call time_message(.false., time_mp_other, ' MPI Overheads')
!$OMP END MASTER
if (focus == allprocs) then
mp_comm => comm_all
nproc => ntot_proc
iproc => aproc
proc0 => aproc0
else if (focus == multigs2procs) then
mp_comm => comm_multigs2
nproc => mulntot_proc
iproc => mulproc
proc0 => mulproc0
else
mp_comm => comm_group
nproc => ngroup_proc
iproc => gproc
proc0 => gproc0
end if
!$OMP MASTER
call time_message(.false., time_mp_other, ' MPI Overheads')
!$OMP END MASTER
# else
UNUSED_DUMMY(focus)
# endif
end subroutine scope