mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-16 19:02:09 +00:00
Hidden PSB_CDREP inside PSB_CDALL with one more optional arg, REPL.
This commit is contained in:
@@ -291,15 +291,6 @@ Module psb_tools_mod
|
||||
module procedure psb_cdall
|
||||
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
|
||||
module procedure psb_cdasb
|
||||
end interface
|
||||
@@ -547,7 +538,7 @@ contains
|
||||
|
||||
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_serial_mod
|
||||
use psb_const_mod
|
||||
@@ -557,10 +548,11 @@ contains
|
||||
include 'parts.fh'
|
||||
Integer, intent(in) :: mg,ng,ictxt, vg(:), vl(:),nl
|
||||
integer, intent(in) :: flag
|
||||
logical, intent(in) :: repl
|
||||
integer, intent(out) :: info
|
||||
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
|
||||
subroutine psb_cdals(m, n, parts, ictxt, desc_a, info)
|
||||
@@ -584,6 +576,12 @@ contains
|
||||
integer, intent(out) :: info
|
||||
type(psb_desc_type), intent(out) :: desc_a
|
||||
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
|
||||
character(len=20) :: name, char_err
|
||||
integer :: err_act, n_, flag_, i, me, np, nlp
|
||||
@@ -598,9 +596,10 @@ contains
|
||||
|
||||
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
|
||||
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
|
||||
endif
|
||||
|
||||
@@ -617,6 +616,19 @@ contains
|
||||
endif
|
||||
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
|
||||
if (present(flag)) then
|
||||
flag_=flag
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
\ifx\pdfoutput\undefined % We're not running pdftex
|
||||
\else
|
||||
\pdfbookmark{PSBLAS-v2.1 User's Guide}{title}
|
||||
\pdfbookmark{PSBLAS-v2.2 User's Guide}{title}
|
||||
\fi
|
||||
\newlength{\centeroffset}
|
||||
\setlength{\centeroffset}{-0.5\oddsidemargin}
|
||||
|
||||
+12
-2
@@ -11,6 +11,7 @@
|
||||
\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,nl=nl}
|
||||
\syntax*{call psb\_cdall}{icontxt, desc\_a, info,mg=mg,repl=.true.}
|
||||
|
||||
This subroutine initializes the communication descriptor associated
|
||||
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}.\\
|
||||
Type:{\bf optional}.\\
|
||||
Intent: {\bf in}.\\
|
||||
Specified as: an integer value. It is required if \verb|parts| is
|
||||
specified.
|
||||
Specified as: an integer value. It is required if \verb|parts| or
|
||||
\verb|repl| is specified.
|
||||
\item[parts] the subroutine that defines the partitioning scheme.\\
|
||||
Scope:{\bf global}.\\
|
||||
Type:{\bf required}.\\
|
||||
@@ -59,6 +60,12 @@ Scope:{\bf local}.\\
|
||||
Type:{\bf optional}.\\
|
||||
Intent: {\bf in}.\\
|
||||
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}
|
||||
|
||||
\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
|
||||
distribution in which each process $I$ gets assigned a consecutive
|
||||
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}
|
||||
\item On exit from this routine the descriptor is in the build state
|
||||
\end{enumerate}
|
||||
|
||||
+1067
-1017
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user