Subroutine to write out run parameters
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout) | :: | pf | |||
integer, | intent(in), | optional | :: | un_opt | ||
logical, | intent(in), | optional | :: | show_mats_opt |
subroutine pf_print_options(pf, un_opt, show_mats_opt)
type(pf_pfasst_t), intent(inout) :: pf
integer, intent(in ), optional :: un_opt
logical, intent(in ), optional :: show_mats_opt
integer :: un = 6
logical :: show_mats = .FALSE.
integer :: l, i
character(8) :: date
character(10) :: time
if (pf%rank /= 0) return
if (present(un_opt)) un = un_opt
write(un,*) '=================================================='
write(un,*) 'PFASST Configuration'
write(un,*) '--------------------'
call date_and_time(date=date, time=time)
write(un,*) 'date: ', date
write(un,*) 'time: ', time
write(un,*) 'double precision: ', pfdp ,' bytes'
write(un,*) 'quad precision: ', pfqp ,' bytes'
write(un,*) 'nlevels: ', pf%nlevels, '! number of pfasst levels'
write(un,*) 'nprocs: ', pf%comm%nproc, '! number of pfasst "time" processors'
if (pf%comm%nproc == 1) then
write(un,*) ' ', ' ', ' ! since 1 time proc is being used, this is a serial sdc run'
else
write(un,*) ' ', ' ', ' ! since >1 time procs are being used, this is a parallel pfasst run'
end if
write(un,*) 'niters: ', pf%niters, '! maximum number of sdc/pfasst iterations'
select case(pf%qtype)
case (SDC_GAUSS_LEGENDRE)
write(un,*) 'qtype:',pf%qtype, '! Gauss Legendre nodes are used'
case (SDC_GAUSS_LOBATTO)
write(un,*) 'qtype:',pf%qtype,'! Gauss Lobatto nodes are used'
case (SDC_GAUSS_RADAU)
write(un,*) 'qtype:',pf%qtype,'! Gauss Radua nodes are used'
case (SDC_CLENSHAW_CURTIS)
write(un,*) 'qtype:',pf%qtype,'! Clenshaw Curtis nodes are used'
case (SDC_UNIFORM)
write(un,*) 'qtype:', pf%qtype,'! Uniform nodes are used'
case default
print *,'qtype = ',pf%qtype
stop "ERROR: Invalid qtype"
end select
write(un,*) 'nnodes: ', pf%levels(1:pf%nlevels)%nnodes, '! number of sdc nodes per level'
write(un,*) 'mpibuflen: ', pf%levels(1:pf%nlevels)%mpibuflen, '! size of data send between time steps'
write(un,*) 'nsweeps: ', pf%levels(1:pf%nlevels)%nsweeps, '! number of sdc sweeps performed per visit to each level'
write(un,*) 'nsweeps_pred: ', pf%levels(1:pf%nlevels)%nsweeps_pred, '! number of sdc sweeps in predictor'
write(un,*) 'taui0: ', pf%taui0, '! cutoff for tau correction'
write(un,*) 'abs_res_tol:', pf%abs_res_tol, '! absolute residual tolerance: '
write(un,*) 'rel_res_tol:', pf%rel_res_tol, '! relative residual tolerance: '
if (pf%use_Luq) then
write(un,*) 'Implicit matrix is LU '
else
write(un,*) 'Implicit matrix is backward Euler '
end if
if (pf%Vcycle) then
write(un,*) 'V-cycling is on'
else
write(un,*) 'V-cycling is off, fine level is pipelining'
end if
if (pf%rk_pred) then
write(un,*) 'Runge-Kutta used for predictor'
else
if (pf%pipeline_pred) then
write(un,*) 'Predictor pipelining is ON '
else
write(un,*) 'Predictor pipelining is OFF '
end if
if (pf%PFASST_pred) then
write(un,*) 'PFASST Predictor style '
else
write(un,*) 'Serial Predictor style '
end if
endif
if (pf%debug) write(un,*) 'Debug mode is on '
write(un,*) ''
if (present(show_mats_opt)) show_mats=show_mats_opt
if (show_mats) then
do l = 1, pf%nlevels
print *, "Level", l
print *, "-----------------"
print *, " nodes"
print *, pf%levels(l)%nodes
print *, " Q"
do i = 1, pf%levels(l)%nnodes-1
print *, pf%levels(l)%sdcmats%qmat(i,:)
end do
end do
end if
end subroutine pf_print_options