Skip to content

Commit

Permalink
ice_dyn_vp: write solver diagnostics only for master_task
Browse files Browse the repository at this point in the history
Closes #13
  • Loading branch information
phil-blain committed Mar 3, 2020
1 parent 1b4034d commit bc5607f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cicecore/cicedynB/dynamics/ice_dyn_vp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ subroutine anderson_solver (icellt, icellu, &
enddo
!$OMP END PARALLEL DO
nlres_norm = sqrt(global_sum(sum(L2norm), distrb_info))
if (monitor_nonlin) then
if (my_task == master_task .and. monitor_nonlin) then
write(nu_diag, '(a,i4,a,d26.16)') "monitor_nonlin: iter_nonlin= ", it_nl, &
" nonlin_res_L2norm= ", nlres_norm
endif
Expand Down Expand Up @@ -913,7 +913,7 @@ subroutine anderson_solver (icellt, icellu, &
! Compute residual
res = fpfunc - sol
fpres_norm = global_sum(dnrm2(size(res), res, inc)**2, distrb_info)
if (monitor_nonlin) then
if (my_task == master_task .and. monitor_nonlin) then
! commented code is to compare fixed_point_res_L2norm BFB with progress_res_L2norm
! (should be BFB if Picard iteration is used)
! call vec_to_arrays (nx_block, ny_block, nblocks, &
Expand Down Expand Up @@ -1065,7 +1065,7 @@ subroutine anderson_solver (icellt, icellu, &
L2norm (iblk))
enddo
!$OMP END PARALLEL DO
if (monitor_nonlin) then
if (my_task == master_task .and. monitor_nonlin) then
write(nu_diag, '(a,i4,a,d26.16)') "monitor_nonlin: iter_nonlin= ", it_nl, &
" progress_res_L2norm= ", sqrt(global_sum(sum(L2norm), distrb_info))
endif
Expand Down

0 comments on commit bc5607f

Please sign in to comment.