Hidden PSB_CDREP inside PSB_CDALL with one more optional arg, REPL.

psblas3-type-indexed
Salvatore Filippone 17 years ago
parent ad74d3c06a
commit b9155bc4b8

@ -291,15 +291,6 @@ Module psb_tools_mod
module procedure psb_cdall module procedure psb_cdall
end interface end interface
interface psb_cdrep
subroutine psb_cdrep(m, ictxt, desc_a,info)
use psb_descriptor_type
Integer, intent(in) :: m,ictxt
Type(psb_desc_type), intent(out) :: desc_a
integer, intent(out) :: info
end subroutine psb_cdrep
end interface
interface psb_cdasb interface psb_cdasb
module procedure psb_cdasb module procedure psb_cdasb
end interface end interface
@ -547,7 +538,7 @@ contains
end subroutine psb_get_boundary end subroutine psb_get_boundary
subroutine psb_cdall(ictxt, desc_a, info,mg,ng,parts,vg,vl,flag,nl) subroutine psb_cdall(ictxt, desc_a, info,mg,ng,parts,vg,vl,flag,nl,repl)
use psb_descriptor_type use psb_descriptor_type
use psb_serial_mod use psb_serial_mod
use psb_const_mod use psb_const_mod
@ -557,10 +548,11 @@ contains
include 'parts.fh' include 'parts.fh'
Integer, intent(in) :: mg,ng,ictxt, vg(:), vl(:),nl Integer, intent(in) :: mg,ng,ictxt, vg(:), vl(:),nl
integer, intent(in) :: flag integer, intent(in) :: flag
logical, intent(in) :: repl
integer, intent(out) :: info integer, intent(out) :: info
type(psb_desc_type), intent(out) :: desc_a type(psb_desc_type), intent(out) :: desc_a
optional :: mg,ng,parts,vg,vl,flag,nl optional :: mg,ng,parts,vg,vl,flag,nl,repl
interface interface
subroutine psb_cdals(m, n, parts, ictxt, desc_a, info) subroutine psb_cdals(m, n, parts, ictxt, desc_a, info)
@ -584,6 +576,12 @@ contains
integer, intent(out) :: info integer, intent(out) :: info
type(psb_desc_type), intent(out) :: desc_a type(psb_desc_type), intent(out) :: desc_a
end subroutine psb_cd_inloc end subroutine psb_cd_inloc
subroutine psb_cdrep(m, ictxt, desc_a,info)
use psb_descriptor_type
Integer, intent(in) :: m,ictxt
Type(psb_desc_type), intent(out) :: desc_a
integer, intent(out) :: info
end subroutine psb_cdrep
end interface end interface
character(len=20) :: name, char_err character(len=20) :: name, char_err
integer :: err_act, n_, flag_, i, me, np, nlp integer :: err_act, n_, flag_, i, me, np, nlp
@ -598,9 +596,10 @@ contains
call psb_info(ictxt, me, np) call psb_info(ictxt, me, np)
if (count((/ present(vg),present(vl),present(parts),present(nl) /)) /= 1) then if (count((/ present(vg),present(vl),&
& present(parts),present(nl), present(repl) /)) /= 1) then
info=581 info=581
call psb_errpush(info,name,a_err=" vg, vl, parts, nl") call psb_errpush(info,name,a_err=" vg, vl, parts, nl, repl")
goto 999 goto 999
endif endif
@ -617,6 +616,19 @@ contains
endif endif
call psb_cdals(mg, n_, parts, ictxt, desc_a, info) call psb_cdals(mg, n_, parts, ictxt, desc_a, info)
else if (present(repl)) then
if (.not.present(mg)) then
info=581
call psb_errpush(info,name)
goto 999
end if
if (.not.repl) then
info=581
call psb_errpush(info,name)
goto 999
end if
call psb_cdrep(mg, ictxt, desc_a, info)
else if (present(vg)) then else if (present(vg)) then
if (present(flag)) then if (present(flag)) then
flag_=flag flag_=flag

@ -5,7 +5,7 @@
\ifx\pdfoutput\undefined % We're not running pdftex \ifx\pdfoutput\undefined % We're not running pdftex
\else \else
\pdfbookmark{PSBLAS-v2.1 User's Guide}{title} \pdfbookmark{PSBLAS-v2.2 User's Guide}{title}
\fi \fi
\newlength{\centeroffset} \newlength{\centeroffset}
\setlength{\centeroffset}{-0.5\oddsidemargin} \setlength{\centeroffset}{-0.5\oddsidemargin}

@ -11,6 +11,7 @@
\syntax*{call psb\_cdall}{icontxt, desc\_a, info,vg=vg,flag=flag} \syntax*{call psb\_cdall}{icontxt, desc\_a, info,vg=vg,flag=flag}
\syntax*{call psb\_cdall}{icontxt, desc\_a, info,vl=vl} \syntax*{call psb\_cdall}{icontxt, desc\_a, info,vl=vl}
\syntax*{call psb\_cdall}{icontxt, desc\_a, info,nl=nl} \syntax*{call psb\_cdall}{icontxt, desc\_a, info,nl=nl}
\syntax*{call psb\_cdall}{icontxt, desc\_a, info,mg=mg,repl=.true.}
This subroutine initializes the communication descriptor associated This subroutine initializes the communication descriptor associated
with an index space. Exactly one of the optional arguments with an index space. Exactly one of the optional arguments
@ -41,8 +42,8 @@ Specified as: an integer value $0,1$, default $0$.
Scope:{\bf global}.\\ Scope:{\bf global}.\\
Type:{\bf optional}.\\ Type:{\bf optional}.\\
Intent: {\bf in}.\\ Intent: {\bf in}.\\
Specified as: an integer value. It is required if \verb|parts| is Specified as: an integer value. It is required if \verb|parts| or
specified. \verb|repl| is specified.
\item[parts] the subroutine that defines the partitioning scheme.\\ \item[parts] the subroutine that defines the partitioning scheme.\\
Scope:{\bf global}.\\ Scope:{\bf global}.\\
Type:{\bf required}.\\ Type:{\bf required}.\\
@ -59,6 +60,12 @@ Scope:{\bf local}.\\
Type:{\bf optional}.\\ Type:{\bf optional}.\\
Intent: {\bf in}.\\ Intent: {\bf in}.\\
Specified as: an integer value. Specified as: an integer value.
\item[repl] Data allocation: build a replicated index space (i.e. all
processes own all indices).
Scope:{\bf global}.\\
Type:{\bf optional}.\\
Intent: {\bf in}.\\
Specified as: the logical value \verb|.true.|
\end{description} \end{description}
\begin{description} \begin{description}
@ -122,6 +129,9 @@ An integer value; 0 means no error has been detected.
\item[nl] In this case we are implying a generalized row-block \item[nl] In this case we are implying a generalized row-block
distribution in which each process $I$ gets assigned a consecutive distribution in which each process $I$ gets assigned a consecutive
chunk of $N_I=nl$ global indices. chunk of $N_I=nl$ global indices.
\item[repl] In this case we are asking to replicate all indices on
all processes. This is a special purpose data allocation that is
useful in the construction of some multilevel preconditioners.
\end{description} \end{description}
\item On exit from this routine the descriptor is in the build state \item On exit from this routine the descriptor is in the build state
\end{enumerate} \end{enumerate}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save