subroutine write_nonlinear_sweet_spot(dim, report_unit, nfacs_dim, facs_dim, &
previous_dim_block, npmax)
implicit none
character, intent(in) :: dim
integer, intent(in) :: report_unit, nfacs_dim, previous_dim_block, npmax
integer, dimension(:), intent(in) :: facs_dim
integer :: i, npe
! We start at 2 to avoid the duplicate factor coming from the previous dimension
do i = 2, nfacs_dim
npe = facs_dim(i) * previous_dim_block
if (npe > npmax) exit
call report_idle_procs(npe, dim, report_unit)
end do
end subroutine write_nonlinear_sweet_spot