A wrapper routine to do the decomposition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(pc_type), | intent(inout) | :: | self | |||
class(fieldmat_type), | intent(inout) | :: | fieldmat |
subroutine pc_make_decomp(self, fieldmat)
use mp, only: mp_abort
implicit none
class(pc_type), intent(inout) :: self
class(fieldmat_type), intent(in out) :: fieldmat
character (len=40) :: errmesg
write(errmesg,'("decomp_type ",I0," not yet implemented.")') self%decomp_type
!Select the appropriate routine to use
select case(self%decomp_type)
case(0)
!Entirely local and serial
call self%decomp_all_serial_local(fieldmat)
case(1)
!All supercells we can see a bit of are done
!serially/locally
call self%decomp_own_serial_local(fieldmat)
case(2)
!Just do the cells that we can see
call self%decomp_owncells_serial_local(fieldmat)
case(3)
!Simple mpi with no attempt at load balance
!or avoiding splitting small blocks
call self%decomp_owncells_simplempi(fieldmat)
case(4)
!Simple mpi with no attempt at load balance
!but we attempt to avoid splitting small blocks
call mp_abort(trim(errmesg))
case default
!Invalid decomp_type
write(errmesg,'("Invalid decomp_type : ",I0)') self%decomp_type
call mp_abort(trim(errmesg))
end select
end subroutine pc_make_decomp