Writes out sweetspot core counts for a layout sym: character string label for each dimension sdim: size of each dimension nfac: #factors of each sdim facs(i,j): ith factor of jth dimension
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=3), | intent(in), | dimension(:) | :: | sym | ||
integer, | intent(in), | dimension(:) | :: | sdim | ||
integer, | intent(in), | dimension(:) | :: | nfac | ||
integer, | intent(in), | dimension(:,:) | :: | facs | ||
integer, | intent(in) | :: | npmax | |||
integer, | intent(in), | optional | :: | LUN |
subroutine wsweetspots(sym,sdim,nfac,facs,npmax,LUN)
use optionals, only: get_option_with_default
implicit none
character(3), dimension(:), intent(in):: sym
integer, dimension(:), intent(in):: sdim, nfac
integer, dimension(:,:), intent(in):: facs
integer, intent(in):: npmax
integer, intent(in), optional:: LUN
integer :: lout, npe, i, j, lcores, nfacs
lout = get_option_with_default(LUN, 6)
nfacs=size(nfac)
lcores=1
write (lout, fmt="(' npe = ',i8,' (',a,')')") 1,trim(sym(1))
do i=1,nfacs
do j=2,nfac(i)
npe=facs(j,i)*lcores
if (npe .gt. npmax) exit
write (lout, fmt="(' npe = ',i8,' (',a,')')") npe,trim(sym(i))
enddo
lcores=lcores*sdim(i)
enddo
end subroutine wsweetspots