|
|
|
@ -38,13 +38,14 @@ contains
|
|
|
|
|
!
|
|
|
|
|
! Get iteration parameters from the command line
|
|
|
|
|
!
|
|
|
|
|
subroutine get_dparms(ictxt,mtrx_file,rhs_file,filefmt,kmethd,ptype,ipart,&
|
|
|
|
|
subroutine get_dparms(ictxt,mtrx_file,rhs_file,filefmt,kmethd,ptype,part,&
|
|
|
|
|
& afmt,istopc,itmax,itrace,irst,eps)
|
|
|
|
|
use psb_base_mod
|
|
|
|
|
integer(psb_ipk_) :: ictxt
|
|
|
|
|
character(len=2) :: filefmt
|
|
|
|
|
character(len=40) :: kmethd, mtrx_file, rhs_file, ptype
|
|
|
|
|
integer(psb_ipk_) :: iret, istopc,itmax,itrace,ipart,irst
|
|
|
|
|
character(len=20) :: part
|
|
|
|
|
integer(psb_ipk_) :: iret, istopc,itmax,itrace,irst
|
|
|
|
|
character(len=40) :: charbuf
|
|
|
|
|
real(psb_dpk_) :: eps
|
|
|
|
|
character :: afmt*5
|
|
|
|
@ -62,6 +63,7 @@ contains
|
|
|
|
|
read(psb_inp_unit,*) kmethd
|
|
|
|
|
read(psb_inp_unit,*) ptype
|
|
|
|
|
read(psb_inp_unit,*) afmt
|
|
|
|
|
read(psb_inp_unit,*) part
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_bcast(ictxt,mtrx_file)
|
|
|
|
@ -70,8 +72,8 @@ contains
|
|
|
|
|
call psb_bcast(ictxt,kmethd)
|
|
|
|
|
call psb_bcast(ictxt,ptype)
|
|
|
|
|
call psb_bcast(ictxt,afmt)
|
|
|
|
|
call psb_bcast(ictxt,part)
|
|
|
|
|
|
|
|
|
|
read(psb_inp_unit,*) ipart
|
|
|
|
|
if (ip >= 7) then
|
|
|
|
|
read(psb_inp_unit,*) istopc
|
|
|
|
|
else
|
|
|
|
@ -97,17 +99,16 @@ contains
|
|
|
|
|
else
|
|
|
|
|
eps=1.d-6
|
|
|
|
|
endif
|
|
|
|
|
inparms(1) = ipart
|
|
|
|
|
inparms(2) = istopc
|
|
|
|
|
inparms(3) = itmax
|
|
|
|
|
inparms(4) = itrace
|
|
|
|
|
inparms(5) = irst
|
|
|
|
|
call psb_bcast(ictxt,inparms(1:5))
|
|
|
|
|
inparms(1) = istopc
|
|
|
|
|
inparms(2) = itmax
|
|
|
|
|
inparms(3) = itrace
|
|
|
|
|
inparms(4) = irst
|
|
|
|
|
call psb_bcast(ictxt,inparms(1:4))
|
|
|
|
|
call psb_bcast(ictxt,eps)
|
|
|
|
|
|
|
|
|
|
write(psb_out_unit,'("Solving matrix : ",a)') mtrx_file
|
|
|
|
|
write(psb_out_unit,'("Number of processors : ",i3)') np
|
|
|
|
|
write(psb_out_unit,'("Data distribution : ",i2)') ipart
|
|
|
|
|
write(psb_out_unit,'("Data distribution : ",a)') part
|
|
|
|
|
write(psb_out_unit,'("Iterative method : ",a)') kmethd
|
|
|
|
|
write(psb_out_unit,'("Preconditioner : ",a)') ptype
|
|
|
|
|
write(psb_out_unit,'("Restart parameter : ",i2)') irst
|
|
|
|
@ -126,26 +127,27 @@ contains
|
|
|
|
|
call psb_bcast(ictxt,kmethd)
|
|
|
|
|
call psb_bcast(ictxt,ptype)
|
|
|
|
|
call psb_bcast(ictxt,afmt)
|
|
|
|
|
call psb_bcast(ictxt,part)
|
|
|
|
|
|
|
|
|
|
call psb_bcast(ictxt,inparms(1:5))
|
|
|
|
|
ipart = inparms(1)
|
|
|
|
|
istopc = inparms(2)
|
|
|
|
|
itmax = inparms(3)
|
|
|
|
|
itrace = inparms(4)
|
|
|
|
|
irst = inparms(5)
|
|
|
|
|
call psb_bcast(ictxt,inparms(1:4))
|
|
|
|
|
istopc = inparms(1)
|
|
|
|
|
itmax = inparms(2)
|
|
|
|
|
itrace = inparms(3)
|
|
|
|
|
irst = inparms(4)
|
|
|
|
|
call psb_bcast(ictxt,eps)
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end subroutine get_dparms
|
|
|
|
|
|
|
|
|
|
subroutine get_sparms(ictxt,mtrx_file,rhs_file,filefmt,kmethd,ptype,ipart,&
|
|
|
|
|
subroutine get_sparms(ictxt,mtrx_file,rhs_file,filefmt,kmethd,ptype,part,&
|
|
|
|
|
& afmt,istopc,itmax,itrace,irst,eps)
|
|
|
|
|
use psb_base_mod
|
|
|
|
|
integer(psb_ipk_) :: ictxt
|
|
|
|
|
character(len=2) :: filefmt
|
|
|
|
|
character(len=40) :: kmethd, mtrx_file, rhs_file, ptype
|
|
|
|
|
integer(psb_ipk_) :: iret, istopc,itmax,itrace,ipart,irst
|
|
|
|
|
character(len=20) :: part
|
|
|
|
|
integer(psb_ipk_) :: iret, istopc,itmax,itrace,irst
|
|
|
|
|
character(len=40) :: charbuf
|
|
|
|
|
real(psb_spk_) :: eps
|
|
|
|
|
character :: afmt*5
|
|
|
|
@ -163,6 +165,7 @@ contains
|
|
|
|
|
read(psb_inp_unit,*) kmethd
|
|
|
|
|
read(psb_inp_unit,*) ptype
|
|
|
|
|
read(psb_inp_unit,*) afmt
|
|
|
|
|
read(psb_inp_unit,*) ipart
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_bcast(ictxt,mtrx_file)
|
|
|
|
@ -171,8 +174,8 @@ contains
|
|
|
|
|
call psb_bcast(ictxt,kmethd)
|
|
|
|
|
call psb_bcast(ictxt,ptype)
|
|
|
|
|
call psb_bcast(ictxt,afmt)
|
|
|
|
|
call psb_bcast(ictxt,part)
|
|
|
|
|
|
|
|
|
|
read(psb_inp_unit,*) ipart
|
|
|
|
|
if (ip >= 7) then
|
|
|
|
|
read(psb_inp_unit,*) istopc
|
|
|
|
|
else
|
|
|
|
@ -198,17 +201,16 @@ contains
|
|
|
|
|
else
|
|
|
|
|
eps=1.d-6
|
|
|
|
|
endif
|
|
|
|
|
inparms(1) = ipart
|
|
|
|
|
inparms(2) = istopc
|
|
|
|
|
inparms(3) = itmax
|
|
|
|
|
inparms(4) = itrace
|
|
|
|
|
inparms(5) = irst
|
|
|
|
|
call psb_bcast(ictxt,inparms(1:5))
|
|
|
|
|
inparms(1) = istopc
|
|
|
|
|
inparms(2) = itmax
|
|
|
|
|
inparms(3) = itrace
|
|
|
|
|
inparms(4) = irst
|
|
|
|
|
call psb_bcast(ictxt,inparms(1:4))
|
|
|
|
|
call psb_bcast(ictxt,eps)
|
|
|
|
|
|
|
|
|
|
write(psb_out_unit,'("Solving matrix : ",a)') mtrx_file
|
|
|
|
|
write(psb_out_unit,'("Number of processors : ",i3)') np
|
|
|
|
|
write(psb_out_unit,'("Data distribution : ",i2)') ipart
|
|
|
|
|
write(psb_out_unit,'("Data distribution : ",a)') part
|
|
|
|
|
write(psb_out_unit,'("Iterative method : ",a)') kmethd
|
|
|
|
|
write(psb_out_unit,'("Preconditioner : ",a)') ptype
|
|
|
|
|
write(psb_out_unit,'("Restart parameter : ",i2)') irst
|
|
|
|
@ -227,13 +229,13 @@ contains
|
|
|
|
|
call psb_bcast(ictxt,kmethd)
|
|
|
|
|
call psb_bcast(ictxt,ptype)
|
|
|
|
|
call psb_bcast(ictxt,afmt)
|
|
|
|
|
call psb_bcast(ictxt,part)
|
|
|
|
|
|
|
|
|
|
call psb_bcast(ictxt,inparms(1:5))
|
|
|
|
|
ipart = inparms(1)
|
|
|
|
|
istopc = inparms(2)
|
|
|
|
|
itmax = inparms(3)
|
|
|
|
|
itrace = inparms(4)
|
|
|
|
|
irst = inparms(5)
|
|
|
|
|
call psb_bcast(ictxt,inparms(1:4))
|
|
|
|
|
istopc = inparms(1)
|
|
|
|
|
itmax = inparms(2)
|
|
|
|
|
itrace = inparms(3)
|
|
|
|
|
irst = inparms(4)
|
|
|
|
|
call psb_bcast(ictxt,eps)
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|