|
|
|
@ -281,19 +281,19 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
nt = nr
|
|
|
|
|
call psb_sum(ctxt,nt)
|
|
|
|
|
if (nt /= m) then
|
|
|
|
|
call psb_sum(ctxt,nt)
|
|
|
|
|
if (nt /= m) then
|
|
|
|
|
write(psb_err_unit,*) iam, 'Initialization error ',nr,nt,m
|
|
|
|
|
info = -1
|
|
|
|
|
call psb_barrier(ctxt)
|
|
|
|
|
call psb_abort(ctxt)
|
|
|
|
|
return
|
|
|
|
|
return
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! First example of use of CDALL: specify for each process a number of
|
|
|
|
|
! contiguous rows
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
call psb_cdall(ctxt,desc_a,info,nl=nr)
|
|
|
|
|
myidx = desc_a%get_global_indices()
|
|
|
|
|
nlr = size(myidx)
|
|
|
|
@ -307,20 +307,20 @@ contains
|
|
|
|
|
info = -1
|
|
|
|
|
call psb_barrier(ctxt)
|
|
|
|
|
call psb_abort(ctxt)
|
|
|
|
|
return
|
|
|
|
|
return
|
|
|
|
|
end if
|
|
|
|
|
else
|
|
|
|
|
write(psb_err_unit,*) iam, 'Initialization error: IV not present'
|
|
|
|
|
info = -1
|
|
|
|
|
call psb_barrier(ctxt)
|
|
|
|
|
call psb_abort(ctxt)
|
|
|
|
|
return
|
|
|
|
|
return
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! Second example of use of CDALL: specify for each row the
|
|
|
|
|
! process that owns it
|
|
|
|
|
!
|
|
|
|
|
! process that owns it
|
|
|
|
|
!
|
|
|
|
|
call psb_cdall(ctxt,desc_a,info,vg=iv)
|
|
|
|
|
myidx = desc_a%get_global_indices()
|
|
|
|
|
nlr = size(myidx)
|
|
|
|
@ -543,7 +543,7 @@ contains
|
|
|
|
|
end if
|
|
|
|
|
tasb = psb_wtime()-t1
|
|
|
|
|
call psb_barrier(ctxt)
|
|
|
|
|
ttot = psb_wtime() - t0
|
|
|
|
|
ttot = psb_wtime() - t0
|
|
|
|
|
|
|
|
|
|
call psb_amx(ctxt,talc)
|
|
|
|
|
call psb_amx(ctxt,tgen)
|
|
|
|
@ -648,7 +648,7 @@ program psb_d_pde3d
|
|
|
|
|
!
|
|
|
|
|
call psb_barrier(ctxt)
|
|
|
|
|
t1 = psb_wtime()
|
|
|
|
|
call psb_gen_pde3d(ctxt,idim,a,bv,xxv,desc_a,afmt,info,partition=ipart)
|
|
|
|
|
call psb_gen_pde3d(ctxt,idim,a,bv,xxv,desc_a,afmt,info,partition=ipart)
|
|
|
|
|
call psb_barrier(ctxt)
|
|
|
|
|
t2 = psb_wtime() - t1
|
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
@ -681,20 +681,20 @@ program psb_d_pde3d
|
|
|
|
|
call prec%set('inv_thresh', parms%inv_thresh, info)
|
|
|
|
|
call prec%set('inv_fillin', parms%inv_fill, info)
|
|
|
|
|
call prec%set('ilut_scale', parms%ilut_scale, info)
|
|
|
|
|
call prec%set('ainv_alg', parms%orth_alg, info)
|
|
|
|
|
case ("INVK")
|
|
|
|
|
call prec%set('sub_fillin', parms%fill, info)
|
|
|
|
|
call prec%set('inv_fillin', parms%inv_fill, info)
|
|
|
|
|
call prec%set('ilut_scale', parms%ilut_scale, info)
|
|
|
|
|
case ("INVT")
|
|
|
|
|
call prec%set('sub_fillin', parms%fill, info)
|
|
|
|
|
call prec%set('inv_fillin', parms%inv_fill, info)
|
|
|
|
|
call prec%set('sub_iluthrs', parms%thresh, info)
|
|
|
|
|
call prec%set('inv_thresh', parms%inv_thresh, info)
|
|
|
|
|
call prec%set('ilut_scale', parms%ilut_scale, info)
|
|
|
|
|
case default
|
|
|
|
|
! Do nothing, use default setting in the init routine
|
|
|
|
|
end select
|
|
|
|
|
select case (psb_toupper(parms%orth_alg))
|
|
|
|
|
|
|
|
|
|
end select
|
|
|
|
|
else
|
|
|
|
|
! nothing to set for NONE or DIAG preconditioner
|
|
|
|
|
end if
|
|
|
|
@ -721,7 +721,7 @@ program psb_d_pde3d
|
|
|
|
|
!
|
|
|
|
|
if(iam == psb_root_) write(psb_out_unit,'("Calling iterative method ",a)')kmethd
|
|
|
|
|
call psb_barrier(ctxt)
|
|
|
|
|
t1 = psb_wtime()
|
|
|
|
|
t1 = psb_wtime()
|
|
|
|
|
eps = 1.d-6
|
|
|
|
|
call psb_krylov(kmethd,a,prec,bv,xxv,eps,desc_a,info,&
|
|
|
|
|
& itmax=itmax,iter=iter,err=err,itrace=itrace,istop=istopc,irst=irst)
|
|
|
|
@ -884,27 +884,29 @@ contains
|
|
|
|
|
if( psb_toupper(ptype) == "BJAC" ) then
|
|
|
|
|
write(psb_out_unit,'("Block subsolver : ",a)') parms%alg
|
|
|
|
|
select case (psb_toupper(parms%alg))
|
|
|
|
|
case ('ILU')
|
|
|
|
|
write(psb_out_unit,'("Fill in : ",i0)') parms%fill
|
|
|
|
|
write(psb_out_unit,'("MILU : ",a)') parms%ilu_alg
|
|
|
|
|
case ('ILUT')
|
|
|
|
|
write(psb_out_unit,'("Fill in : ",i0)') parms%fill
|
|
|
|
|
write(psb_out_unit,'("Threshold : ",es12.5)') parms%thresh
|
|
|
|
|
write(psb_out_unit,'("Scaling : ",a)') parms%ilut_scale
|
|
|
|
|
case ('INVK')
|
|
|
|
|
write(psb_out_unit,'("Fill in : ",i0)') parms%fill
|
|
|
|
|
write(psb_out_unit,'("Invese Fill in : ",i0)') parms%inv_fill
|
|
|
|
|
case ('INVT')
|
|
|
|
|
write(psb_out_unit,'("Fill in : ",i0)') parms%fill
|
|
|
|
|
write(psb_out_unit,'("Threshold : ",es12.5)') parms%thresh
|
|
|
|
|
write(psb_out_unit,'("Invese Fill in : ",i0)') parms%inv_fill
|
|
|
|
|
write(psb_out_unit,'("Inverse Threshold : ",es12.5)') parms%inv_thresh
|
|
|
|
|
case ('AINV','AORTH')
|
|
|
|
|
write(psb_out_unit,'("Inverse Threshold : ",es12.5)') parms%inv_thresh
|
|
|
|
|
write(psb_out_unit,'("Invese Fill in : ",i0)') parms%inv_fill
|
|
|
|
|
write(psb_out_unit,'("Orthogonalization : ",a)') parms%orth_alg
|
|
|
|
|
write(psb_out_unit,'("Scaling : ",a)') parms%ilut_scale
|
|
|
|
|
case default
|
|
|
|
|
case ('ILU')
|
|
|
|
|
write(psb_out_unit,'("Fill in : ",i0)') parms%fill
|
|
|
|
|
write(psb_out_unit,'("MILU : ",a)') parms%ilu_alg
|
|
|
|
|
case ('ILUT')
|
|
|
|
|
write(psb_out_unit,'("Fill in : ",i0)') parms%fill
|
|
|
|
|
write(psb_out_unit,'("Threshold : ",es12.5)') parms%thresh
|
|
|
|
|
write(psb_out_unit,'("Scaling : ",a)') parms%ilut_scale
|
|
|
|
|
case ('INVK')
|
|
|
|
|
write(psb_out_unit,'("Fill in : ",i0)') parms%fill
|
|
|
|
|
write(psb_out_unit,'("Invese Fill in : ",i0)') parms%inv_fill
|
|
|
|
|
write(psb_out_unit,'("Scaling : ",a)') parms%ilut_scale
|
|
|
|
|
case ('INVT')
|
|
|
|
|
write(psb_out_unit,'("Fill in : ",i0)') parms%fill
|
|
|
|
|
write(psb_out_unit,'("Threshold : ",es12.5)') parms%thresh
|
|
|
|
|
write(psb_out_unit,'("Invese Fill in : ",i0)') parms%inv_fill
|
|
|
|
|
write(psb_out_unit,'("Inverse Threshold : ",es12.5)') parms%inv_thresh
|
|
|
|
|
write(psb_out_unit,'("Scaling : ",a)') parms%ilut_scale
|
|
|
|
|
case ('AINV','AORTH')
|
|
|
|
|
write(psb_out_unit,'("Inverse Threshold : ",es12.5)') parms%inv_thresh
|
|
|
|
|
write(psb_out_unit,'("Invese Fill in : ",i0)') parms%inv_fill
|
|
|
|
|
write(psb_out_unit,'("Orthogonalization : ",a)') parms%orth_alg
|
|
|
|
|
write(psb_out_unit,'("Scaling : ",a)') parms%ilut_scale
|
|
|
|
|
case default
|
|
|
|
|
write(psb_out_unit,'("Unknown diagonal solver")')
|
|
|
|
|
end select
|
|
|
|
|
end if
|
|
|
|
@ -912,7 +914,7 @@ contains
|
|
|
|
|
write(psb_out_unit,'(" ")')
|
|
|
|
|
else
|
|
|
|
|
! wrong number of parameter, print an error message and exit
|
|
|
|
|
call pr_usage(izero)
|
|
|
|
|
call pr_usage(izero)
|
|
|
|
|
call psb_abort(ctxt)
|
|
|
|
|
stop 1
|
|
|
|
|
endif
|
|
|
|
@ -937,6 +939,7 @@ contains
|
|
|
|
|
call psb_bcast(ctxt,parms%thresh)
|
|
|
|
|
call psb_bcast(ctxt,parms%inv_thresh)
|
|
|
|
|
call psb_bcast(ctxt,parms%orth_alg)
|
|
|
|
|
call psb_bcast(ctxt,parms%ilut_scale)
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|