subroutine update_peak_walker_number() use FciMCData, only: AllTotParts implicit none integer :: run do run = 1, inum_runs TotPartsPeak(run) = max(AllTotParts(min_part_type(run)) + AllTotParts(max_part_type(run)) & , TotPartsPeak(run)) end do end subroutine update_peak_walker_number