diff --git a/base/modules/psb_serial_mod.f90 b/base/modules/psb_serial_mod.f90 index 8f2987b6..281e9a59 100644 --- a/base/modules/psb_serial_mod.f90 +++ b/base/modules/psb_serial_mod.f90 @@ -495,6 +495,23 @@ module psb_serial_mod end interface + + interface psb_csrp + subroutine psb_dcsrp(trans,iperm,a, info) + use psb_spmat_type + type(psb_dspmat_type), intent(inout) :: a + integer, intent(inout) :: iperm(:), info + character, intent(in) :: trans + end subroutine psb_dcsrp + subroutine psb_zcsrp(trans,iperm,a, info) + use psb_spmat_type + type(psb_zspmat_type), intent(inout) :: a + integer, intent(inout) :: iperm(:), info + character, intent(in) :: trans + end subroutine psb_zcsrp + end interface + + interface psb_gelp ! 2-D version subroutine psb_dgelp(trans,iperm,x,info) diff --git a/base/modules/psb_tools_mod.f90 b/base/modules/psb_tools_mod.f90 index 904de70c..ef2846be 100644 --- a/base/modules/psb_tools_mod.f90 +++ b/base/modules/psb_tools_mod.f90 @@ -159,18 +159,6 @@ Module psb_tools_mod end interface - interface psb_csrp - subroutine psb_dcsrp(trans,iperm,a, desc_a, info) - use psb_descriptor_type - use psb_spmat_type - type(psb_dspmat_type), intent(inout) :: a - type(psb_desc_type), intent(in) :: desc_a - integer, intent(inout) :: iperm(:), info - character, intent(in) :: trans - end subroutine psb_dcsrp - end interface - - interface psb_cdprt subroutine psb_cdprt(iout,desc_p,glob,short) use psb_const_mod diff --git a/base/serial/Makefile b/base/serial/Makefile index 86ff101f..ace5b23c 100644 --- a/base/serial/Makefile +++ b/base/serial/Makefile @@ -13,7 +13,7 @@ FOBJS = psb_cest.o psb_dcoins.o psb_dcsmm.o psb_dcsmv.o \ psb_zcoins.o psb_zcsprt.o psb_zneigh.o psb_ztransp.o psb_ztransc.o\ psb_zrwextd.o psb_zsymbmm.o psb_znumbmm.o psb_zspscal.o psb_zspclip.o\ psb_getifield.o psb_setifield.o psb_update_mod.o psb_getrow_mod.o\ - psb_dgelp.o psb_zgelp.o + psb_dgelp.o psb_zgelp.o psb_dcsrp.o psb_zcsrp.o LIBDIR=.. MODDIR=../modules diff --git a/base/tools/psb_dcsrp.f90 b/base/serial/psb_dcsrp.f90 similarity index 84% rename from base/tools/psb_dcsrp.f90 rename to base/serial/psb_dcsrp.f90 index 292586f0..0abdc7ff 100644 --- a/base/tools/psb_dcsrp.f90 +++ b/base/serial/psb_dcsrp.f90 @@ -30,8 +30,6 @@ !!$ ! File: psb_dcsrp.f90 ! -! WARNING: This routine should be changed and moved to the serial part -! i.e. taking out the descriptor. ! ! Subroutine: psb_dcsrp ! Apply a right permutation to a sparse matrix, i.e. permute the column @@ -43,13 +41,10 @@ ! iperm - integer, dimension(:) A permutation vector; its size ! must be either N_ROW or N_COL ! a - type(). The communication descriptor. ! info - integer. Eventually returns an error code -subroutine psb_dcsrp(trans,iperm,a, desc_a, info) - use psb_descriptor_type - use psb_serial_mod +subroutine psb_dcsrp(trans,iperm,a, info) + use psb_serial_mod, psb_protect_name => psb_dcsrp use psb_const_mod - use psb_penv_mod ! implicit none interface dcsrp @@ -77,7 +72,6 @@ subroutine psb_dcsrp(trans,iperm,a, desc_a, info) !...parameters.... type(psb_dspmat_type), intent(inout) :: a - type(psb_desc_type), intent(in) :: desc_a integer, intent(inout) :: iperm(:), info character, intent(in) :: trans !....locals.... @@ -93,32 +87,14 @@ subroutine psb_dcsrp(trans,iperm,a, desc_a, info) time(1) = psb_wtime() - ictxt = psb_cd_get_context(desc_a) - dectype = psb_cd_get_dectype(desc_a) - n_row = psb_cd_get_local_rows(desc_a) - n_col = psb_cd_get_local_cols(desc_a) + n_row = psb_get_sp_nrows(a) + n_col = psb_get_sp_ncols(a) if(psb_get_errstatus() /= 0) return info=0 call psb_erractionsave(err_act) name = 'psd_csrp' - ! check on blacs grid - call psb_info(ictxt, me, np) - if (np == -1) then - info = 2010 - call psb_errpush(info,name) - goto 9999 - endif - - - if (.not.psb_is_asb_desc(desc_a)) then - info = 600 - int_err(1) = dectype - call psb_errpush(info,name,int_err) - goto 9999 - endif - ipsize = size(iperm) if (.not.((ipsize == n_col).or.(ipsize == n_row) )) then info = 35 @@ -162,7 +138,6 @@ subroutine psb_dcsrp(trans,iperm,a, desc_a, info) ! fix glob_to_loc/loc_to_glob mappings, then indices lists ! hmm, maybe we should just move all of this onto a different level, ! have a specialized subroutine, and do it in the solver context???? - if (debug) write(0,*) 'spasb: calling dcsrp',size(work_dcsdp) call dcsrp(trans,n_row,n_col,a%fida,a%descra,a%ia1,a%ia2,a%infoa,& & ipt,work_dcsdp,size(work_dcsdp),info) if(info /= psb_no_err_) then @@ -176,10 +151,6 @@ subroutine psb_dcsrp(trans,iperm,a, desc_a, info) time(4) = psb_wtime() time(4) = time(4) - time(3) - if (debug) then - call psb_amx(ictxt, time(4)) - write (*, *) ' comm structs assembly: ', time(4)*1.d-3 - end if call psb_erractionrestore(err_act) return diff --git a/base/tools/psb_zcsrp.f90 b/base/serial/psb_zcsrp.f90 similarity index 84% rename from base/tools/psb_zcsrp.f90 rename to base/serial/psb_zcsrp.f90 index f2c5d192..258ee096 100644 --- a/base/tools/psb_zcsrp.f90 +++ b/base/serial/psb_zcsrp.f90 @@ -30,8 +30,6 @@ !!$ ! File: psb_zcsrp.f90 ! -! WARNING: This routine should be changed and moved to the serial part -! i.e. taking out the descriptor. ! ! Subroutine: psb_zcsrp ! Apply a right permutation to a sparse matrix, i.e. permute the column @@ -43,13 +41,10 @@ ! iperm - integer, dimension(:) A permutation vector; its size ! must be either N_ROW or N_COL ! a - type(). The communication descriptor. ! info - integer. Eventually returns an error code -subroutine psb_zcsrp(trans,iperm,a, desc_a, info) - use psb_descriptor_type - use psb_serial_mod +subroutine psb_zcsrp(trans,iperm,a, info) + use psb_serial_mod, psb_protect_name => psb_zcsrp use psb_const_mod - use psb_penv_mod ! implicit none interface @@ -76,7 +71,6 @@ subroutine psb_zcsrp(trans,iperm,a, desc_a, info) !...parameters.... type(psb_zspmat_type), intent(inout) :: a - type(psb_desc_type), intent(in) :: desc_a integer, intent(inout) :: iperm(:), info character, intent(in) :: trans !....locals.... @@ -92,32 +86,14 @@ subroutine psb_zcsrp(trans,iperm,a, desc_a, info) time(1) = psb_wtime() - ictxt = psb_cd_get_context(desc_a) - dectype = psb_cd_get_dectype(desc_a) - n_row = psb_cd_get_local_rows(desc_a) - n_col = psb_cd_get_local_cols(desc_a) + n_row = psb_get_sp_nrows(a) + n_col = psb_get_sp_ncols(a) if(psb_get_errstatus() /= 0) return info=0 call psb_erractionsave(err_act) name = 'psd_csrp' - ! check on blacs grid - call psb_info(ictxt, me, np) - if (np == -1) then - info = 2010 - call psb_errpush(info,name) - goto 9999 - endif - - - if (.not.psb_is_asb_desc(desc_a)) then - info = 600 - int_err(1) = dectype - call psb_errpush(info,name,int_err) - goto 9999 - endif - ipsize = size(iperm) if (.not.((ipsize == n_col).or.(ipsize == n_row) )) then info = 35 @@ -161,7 +137,6 @@ subroutine psb_zcsrp(trans,iperm,a, desc_a, info) ! fix glob_to_loc/loc_to_glob mappings, then indices lists ! hmm, maybe we should just move all of this onto a different level, ! have a specialized subroutine, and do it in the solver context???? - if (debug) write(0,*) 'spasb: calling dcsrp',size(work_dcsdp) call zcsrp(trans,n_row,n_col,a%fida,a%descra,a%ia1,a%ia2,a%infoa,& & ipt,work_dcsdp,size(work_dcsdp),info) if(info /= psb_no_err_) then @@ -175,11 +150,6 @@ subroutine psb_zcsrp(trans,iperm,a, desc_a, info) time(4) = psb_wtime() time(4) = time(4) - time(3) - if (debug) then - call psb_amx(ictxt, time(4)) - - write (*, *) ' comm structs assembly: ', time(4)*1.d-3 - end if call psb_erractionrestore(err_act) return diff --git a/base/tools/Makefile b/base/tools/Makefile index 799d7595..9fa47a18 100644 --- a/base/tools/Makefile +++ b/base/tools/Makefile @@ -1,6 +1,6 @@ include ../../Make.inc -FOBJS = psb_dallc.o psb_dasb.o psb_dcsrp.o psb_cdprt.o \ +FOBJS = psb_dallc.o psb_dasb.o psb_cdprt.o \ psb_dfree.o psb_dins.o \ psb_cdals.o psb_cdalv.o psb_cd_inloc.o psb_cdcpy.o \ psb_cdfree.o psb_cdins.o \ diff --git a/docs/pdf/commrout.tex b/docs/pdf/commrout.tex index 0fcd36aa..799f92d6 100644 --- a/docs/pdf/commrout.tex +++ b/docs/pdf/commrout.tex @@ -37,6 +37,7 @@ Long Precision Complex & psb\_halo \\ \syntax*{call psb\_halo}{x, desc\_a, info, alpha, work, data} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] global dense matrix $x$.\\ Scope: {\bf local} \\ @@ -185,6 +186,7 @@ Long Precision Complex & psb\_ovrl \\ \syntax*{call psb\_ovrl}{x, desc\_a, info, update=update\_type, work=work} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] global dense matrix $x$.\\ Scope: {\bf local} \\ @@ -369,6 +371,7 @@ Long Precision Complex & psb\_gather \\ \syntax{call psb\_gather}{glob\_x, loc\_x, desc\_a, info, root} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[loc\_x] the local portion of global dense matrix $glob\_x$. \\ @@ -463,6 +466,7 @@ Long Precision Complex & psb\_scatter \\ \syntax{call psb\_scatter}{glob\_x, loc\_x, desc\_a, info, root} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[glob\_x] The array that must be scattered into local pieces.\\ Scope: {\bf global} \\ diff --git a/docs/pdf/datastruct.tex b/docs/pdf/datastruct.tex index e63e6153..742fd913 100644 --- a/docs/pdf/datastruct.tex +++ b/docs/pdf/datastruct.tex @@ -367,6 +367,7 @@ research. \syntax{nr = psb\_cd\_get\_local\_rows}{desc} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[desc] the communication descriptor.\\ Scope: {\bf local}.\\ @@ -390,6 +391,7 @@ Specified as: a structured data of type \descdata. \begin{description} \item[\bf On Entry] +\item[Type:] Asynchronous. \item[desc] the communication descriptor.\\ Scope: {\bf local}.\\ Type: {\bf required}.\\ @@ -413,6 +415,7 @@ Specified as: a structured data of type \descdata. \begin{description} \item[\bf On Entry] +\item[Type:] Asynchronous. \item[desc] the communication descriptor.\\ Scope: {\bf local}.\\ Type: {\bf required}.\\ @@ -430,6 +433,7 @@ Specified as: a structured data of type \descdata. \syntax{nr = psb\_cd\_get\_global\_cols}{desc} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[desc] the communication descriptor.\\ Scope: {\bf local}.\\ @@ -448,6 +452,7 @@ Specified as: a structured data of type \descdata. \syntax{ictxt = psb\_cd\_get\_context}{desc} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[desc] the communication descriptor.\\ Scope: {\bf local}.\\ @@ -467,6 +472,7 @@ Specified as: a structured data of type \descdata. \syntax{ith = psb\_cd\_get\_large\_threshold}{} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Return] \item[Function value] The current value for the size threshold. @@ -479,6 +485,7 @@ Specified as: a structured data of type \descdata. \syntax{call psb\_cd\_set\_large\_threshold}{ith} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[ith] the new threshold for communication descriptors.\\ Scope: {\bf global}.\\ @@ -486,13 +493,16 @@ Type: {\bf required}.\\ Intent: {\bf in}.\\ Specified as: an integer value greater than zero. \end{description} - +Note: the threshold value is only queried by the library at the time a +call to \verb|psb_cdall| is executed, therefore changing the threshold +has no effect on communication descriptors that have already been initialized. \subsubroutine{psb\_sp\_get\_nrows}{Get number of rows in a sparse matrix} \syntax{nr = psb\_sp\_get\_nrows}{a} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[a] the sparse matrix\\ Scope: {\bf local}\\ @@ -512,6 +522,7 @@ Specified as: a structured data of type \spdata. \syntax{nr = psb\_sp\_get\_ncols}{a} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[a] the sparse matrix\\ Scope: {\bf local}\\ @@ -531,6 +542,7 @@ Specified as: a structured data of type \spdata. \syntax{nr = psb\_sp\_get\_nnzeros}{a} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[a] the sparse matrix\\ Scope: {\bf local}\\ diff --git a/docs/pdf/error.tex b/docs/pdf/error.tex index 675f4d3c..1d009199 100644 --- a/docs/pdf/error.tex +++ b/docs/pdf/error.tex @@ -121,6 +121,7 @@ Aborting... \syntax{call psb\_errpush}{err\_c, r\_name, i\_err, a\_err} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[err\_c] the error code\\ Scope: {\bf local} \\ @@ -147,6 +148,7 @@ Specified as: a string.\\ \syntax{call psb\_error}{icontxt} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[icontxt] the communication context.\\ Scope: {\bf global} \\ @@ -162,6 +164,7 @@ Specified as: an integer. \syntax{call psb\_set\_errverbosity}{v} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[v] the verbosity level\\ Scope: {\bf global}\\ @@ -176,6 +179,7 @@ Specified as: an integer. \syntax{call psb\_set\_erraction}{err\_act} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[err\_act] the type of action.\\ Scope: {\bf global} \\ @@ -186,23 +190,23 @@ Specified as: an integer. -\subroutine{psb\_errcomm}{Error communication routine} +%% \subroutine{psb\_errcomm}{Error communication routine} -\syntax{call psb\_errcomm}{icontxt, err} +%% \syntax{call psb\_errcomm}{icontxt, err} -\begin{description} -\item[\bf On Entry] -\item[icontxt] the communication context.\\ -Scope: {\bf global} \\ -Type: {\bf required}\\ -Intent: {\bf in}.\\ -Specified as: an integer. -\item[err] the error code to be communicated\\ -Scope: {\bf global} \\ -Type: {\bf required}\\ -Intent: {\bf inout}.\\ -Specified as: an integer.\\ -\end{description} +%% \begin{description} +%% \item[\bf On Entry] +%% \item[icontxt] the communication context.\\ +%% Scope: {\bf global} \\ +%% Type: {\bf required}\\ +%% Intent: {\bf in}.\\ +%% Specified as: an integer. +%% \item[err] the error code to be communicated\\ +%% Scope: {\bf global} \\ +%% Type: {\bf required}\\ +%% Intent: {\bf inout}.\\ +%% Specified as: an integer.\\ +%% \end{description} %%% Local Variables: %%% mode: latex diff --git a/docs/pdf/intro.tex b/docs/pdf/intro.tex index d6dfae72..0d2487bd 100644 --- a/docs/pdf/intro.tex +++ b/docs/pdf/intro.tex @@ -389,18 +389,31 @@ The PSBLAS librarary is based on the Single Program Multiple Data computation performs the same actions on a chunk of data. Parallelism is thus data-driven. -Because of this structure, practically all subroutines \emph{must} be +Because of this structure, many subroutines coordinate their action +across the various processes, thus providing an implicit +synchronization point, and therefore \emph{must} be called simultaneously by all processes participating in the -computation, i.e each subroutine call acts implicitly as a -synchronization point. The exceptions to this rule are: -\begin{itemize} -\item The insertion routines \verb|psb_cdins|, \verb|psb_spins| and - \verb|psb_geins|; -\item The error handling routines. -\end{itemize} -In particular, as per the discussion in the previous section, the -insertion routines may be called a different number of times on each -process, depending on the data distribution chosen by the user. +computation. This is certainly true for the data allocation and +assembly routines, for all the computational routines and for some of +the tools routines. + +However there are many cases where no synchronization, and indeed no +communication among processes, is implied; for instance, all the routines in +sec.~\ref{sec:dataquery} are only acting on the local data structures, +and thus may be called independently. The most important case is that +of the coefficient insertion routines: since the number of +coefficients in the sparse and dense matrices varies among the +processors, and since the user is free to choose an arbitrary order in +builiding the matrix entries, these routines cannot imply a +synchronization. + +Throughout this user's guide each subroutine will be clearly indicated +as: +\begin{description} +\item[Synchronous:] must be called simultaneously by all the + processes in the relevant communication context; +\item[Asynchronous:] may be called in a totally independent manner. +\end{description} %%% Local Variables: %%% mode: latex diff --git a/docs/pdf/methods.tex b/docs/pdf/methods.tex index 0fcf238c..438ec201 100644 --- a/docs/pdf/methods.tex +++ b/docs/pdf/methods.tex @@ -29,6 +29,7 @@ $r_i=b-Ax_i$ the corresponding residual at the $i$-th iteration. \syntax{call psb\_krylov}{method,a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,irst,istop} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[method] a string that defines the iterative method to be used. Supported values are: diff --git a/docs/pdf/penv.tex b/docs/pdf/penv.tex index 0635f968..f9b5f48e 100644 --- a/docs/pdf/penv.tex +++ b/docs/pdf/penv.tex @@ -9,6 +9,7 @@ This subroutine initializes the PSBLAS parallel environment, defining a virtual parallel machine. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry ] \item[np] Number of processes in the PSBLAS virtual parallel machine.\\ Scope: {\bf global}.\\ @@ -46,6 +47,7 @@ Specified as: an integer variable. This subroutine returns information about the PSBLAS parallel environment, defining a virtual parallel machine. \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -89,6 +91,7 @@ Specified as: an integer variable. \ This subroutine exits from the PSBLAS parallel virtual machine. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -110,7 +113,7 @@ Specified as: a logical variable, default value: true. \verb|psb_info| has returned with $iam=-1$; indeed, it it is the only routine that may be called with argument \verb|icontxt| in this situation. -\item If the user wants to use multiple communication contexts in the +\item If the user whishes to use multiple communication contexts in the same program, this routine may be called multiple times to selectively close the contexts with \verb|close=.false.|, while on the last call it should be called with \verb|close=.true.| to @@ -124,6 +127,7 @@ Specified as: a logical variable, default value: true. This subroutine returns the MPI communicator associated with a PSBLAS context \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -148,6 +152,7 @@ Intent: {\bf out}.\\ This subroutine returns the MPI rank of the PSBLAS process $id$ \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -180,6 +185,7 @@ Intent: {\bf out}.\\ This function returns a wall clock timer. The resolution of the timer is dependent on the underlying parallel environment implementation. \begin{description} +\item[Type:] Asynchronous. \item[\bf On Exit ] \item[Function value] the elapsed time in seconds.\\ Returned as: a \verb|real(kind(1.d0))| integer variable. @@ -190,10 +196,10 @@ Returned as: a \verb|real(kind(1.d0))| integer variable. \syntax{call psb\_barrier}{icontxt} -This subroutine acts as a synchronization point for the PSBLAS -parallel virtual machine. As such, it must be called by all -participating processes. +This subroutine acts as an explicit synchronization point for the PSBLAS +parallel virtual machine. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -210,6 +216,7 @@ Specified as: an integer variable. This subroutine aborts computation on the parallel virtual machine. \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -230,6 +237,7 @@ Specified as: an integer variable. This subroutine implements a broadcast operation based on the underlying communication library. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -271,6 +279,7 @@ Type, rank and size must agree on all processes. This subroutine implements a sum reduction operation based on the underlying communication library. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -321,6 +330,7 @@ Type, rank and size must agree on all processes. This subroutine implements a maximum valuereduction operation based on the underlying communication library. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -370,6 +380,7 @@ Type, rank and size must agree on all processes. This subroutine implements a minimum value reduction operation based on the underlying communication library. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -419,6 +430,7 @@ Type, rank and size must agree on all processes. This subroutine implements a maximum absolute value reduction operation based on the underlying communication library. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -468,6 +480,7 @@ Type, rank and size must agree on all processes. This subroutine implements a minimum absolute value reduction operation based on the underlying communication library. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -517,6 +530,7 @@ Type, rank and size must agree on all processes. This subroutine sends a packet of data to a destination. \begin{description} +\item[Type:] Synchronous: see usage notes. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -552,12 +566,20 @@ same value on sending and receiving processes. \item[\bf On Return] \end{description} +\section*{Notes} +\begin{enumerate} +\item This subroutine implies a synchronization, but only between the + calling process and the destination process $dst$. +\end{enumerate} + + \subroutine{psb\_rcv}{Receive data} \syntax{call psb\_rcv}{icontxt, dat, src, m} This subroutine receives a packet of data to a destination. \begin{description} +\item[Type:] Synchronous: see usage notes. \item[\bf On Entry ] \item[icontxt] the communication context identifying the virtual parallel machine.\\ @@ -593,3 +615,8 @@ Type and rank must agree on sender and receiver process; if $m$ is not specified, size must agree as well. \end{description} +\section*{Notes} +\begin{enumerate} +\item This subroutine implies a synchronization, but only between the + calling process and the source process $src$. +\end{enumerate} diff --git a/docs/pdf/precs.tex b/docs/pdf/precs.tex index 3dbbc2c8..575ded05 100644 --- a/docs/pdf/precs.tex +++ b/docs/pdf/precs.tex @@ -29,6 +29,7 @@ module \verb|psb_prec_mod|. \syntax{call psb\_precinit}{prec, ptype, info} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[ptype] the type of preconditioner. Scope: {\bf global} \\ @@ -152,6 +153,7 @@ $ptype$ string as follows\footnote{The string is case-insensitive}: \syntax{call psb\_precbld}{a, desc\_a, prec, info, upd} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[a] the system sparse matrix. Scope: {\bf local} \\ @@ -197,6 +199,7 @@ An integer value; 0 means no error has been detected. \syntax*{call psb\_precaply}{prec,x,desc\_a,info,trans} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[prec] the preconditioner. Scope: {\bf local} \\ @@ -246,6 +249,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_prec\_descr}{prec} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[prec] the preconditioner. Scope: {\bf local} \\ diff --git a/docs/pdf/psbrout.tex b/docs/pdf/psbrout.tex index 409f060f..4d77b135 100644 --- a/docs/pdf/psbrout.tex +++ b/docs/pdf/psbrout.tex @@ -35,6 +35,7 @@ Long Precision Complex & psb\_geaxpby \\ \end{table} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[alpha] the scalar $\alpha$.\\ Scope: {\bf global} \\ @@ -140,6 +141,7 @@ Long Precision Complex & psb\_gedot \\ \end{table} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] the local portion of global dense matrix $x$.\\ @@ -220,6 +222,7 @@ Long Precision Complex & psb\_gedots \\ \end{table} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] the local portion of global dense matrix $x$. \\ @@ -295,6 +298,7 @@ Long Precision Real&Long Precision Complex & psb\_geamax \\ \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] the local portion of global dense matrix $x$. %% This function computes the location of the first element of @@ -356,6 +360,7 @@ Long Precision Real &Long Precision Complex & psb\_geamaxs\\ \end{table} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] the local portion of global dense matrix $x$. \\ @@ -416,6 +421,7 @@ Long Precision Real&Long Precision Complex & psb\_geasum \\ \end{table} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] the local portion of global dense matrix $x$. %% This function computes the location of the first element of @@ -475,6 +481,7 @@ Long Precision Real&Long Precision Complex & psb\_geasums \\ \end{table} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] the local portion of global dense matrix $x$. %% This function computes the location of the first element of @@ -542,6 +549,7 @@ Long Precision Real&Long Precision Complex & psb\_genrm2 \\ \syntax{psb\_genrm2}{x, desc\_a, info} %% \syntax*{psb\_genrm2}{x, desc\_a, info, jx} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] the local portion of global dense matrix $x$.%% This function computes the location of the first element of @@ -610,6 +618,7 @@ Long Precision Real&Long Precision Complex & psb\_genrm2s \\ \end{table} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] the local portion of global dense matrix $x$. %% This function computes the location of the first element of @@ -675,6 +684,7 @@ Long Precision Complex & psb\_spnrmi \\ \syntax{psb\_spnrmi}{A, desc\_a, info} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[a] the local portion of the global sparse matrix $A$. \\ @@ -750,6 +760,7 @@ Long Precision Complex & psb\_spmm \\ trans, work} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[alpha] the scalar $\alpha$.\\ Scope: {\bf global} \\ @@ -900,6 +911,7 @@ Long Precision Complex & psb\_spsm \\ \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[alpha] the scalar $\alpha$.\\ Scope: {\bf global} \\ diff --git a/docs/pdf/toolsrout.tex b/docs/pdf/toolsrout.tex index 5bff6c56..323219f3 100644 --- a/docs/pdf/toolsrout.tex +++ b/docs/pdf/toolsrout.tex @@ -19,6 +19,7 @@ must be specified, thereby choosing the specific initialization strategy: \begin{description} \item[\bf On Entry ] +\item[Type:] Synchronous. \item[icontxt] the communication context.\\ Scope:{\bf global}.\\ Type:{\bf required}.\\ @@ -139,6 +140,7 @@ linear system coefficient matrix), storing them as necessary into the communication descriptor. \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[nz] the number of points being inserted.\\ Scope: {\bf local}.\\ @@ -197,6 +199,7 @@ nor the end vertex belong to the current process. \syntax{call psb\_cdasb}{desc\_a, info} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[desc\_a] the communication descriptor.\\ Scope:{\bf local}.\\ @@ -235,6 +238,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_cdcpy}{desc\_in, desc\_out, info} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[desc\_in] the communication descriptor.\\ Scope:{\bf local}.\\ @@ -267,6 +271,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_cdfree}{desc\_a, info} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[desc\_a] the communication descriptor to be freed.\\ Scope:{\bf local}.\\ @@ -297,6 +302,7 @@ This subroutine builds an extended communication descriptor, based on the input descriptor \verb|desc_a| and on the stencil specified through the input sparse matrix \verb|a|. \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[a] A sparse matrix Scope:{\bf local}.\\ @@ -360,6 +366,7 @@ An integer value; 0 means no error has been detected. %% \begin{description} %% \item[\bf On Entry] +%% \item[Type:] Asynchronous. %% \item[trans] A character that specifies whether to permute $A$ or $A^T$.\\ %% Scope: {\bf local} \\ %% Type: {\bf required}\\ @@ -393,6 +400,7 @@ An integer value; 0 means no error has been detected. %% \syntax{call psb\_cdprt}{iout, desc\_a, glob, short} %% \begin{description} +%% \item[Type:] Asynchronous. %% \item[\bf On Entry] %% \item[iout] An integer that defines the output unit. %% Scope: {\bf local} \\ @@ -421,6 +429,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_spall}{a, desc\_a, info, nnz} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[desc\_a] the communication descriptor.\\ Scope:{\bf local}.\\ @@ -469,6 +478,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_spins}{nz, ia, ja, val, a, desc\_a, info} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[nz] the number of elements to be inserted.\\ Scope:{\bf local}.\\ @@ -536,6 +546,8 @@ An integer value; 0 means no error has been detected. pattern; each sparse matrix entry implicitly defines a graph edge, that is passed to the descriptor routine for the appropriate processing. +\item Any coefficients from matrix rows not assigned to the calling + process are silently ignored; \item If the descriptor is in the assembled state, then any entries in the sparse matrix that would generate additional communication requirements will be ignored; @@ -551,6 +563,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_spasb}{a, desc\_a, info, afmt, upd, dupl} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[desc\_a] the communication descriptor.\\ Scope:{\bf local}.\\ @@ -648,6 +661,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_spfree}{a, desc\_a, info} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[a] the matrix to be freed.\\ Scope:{\bf local}\\ @@ -681,6 +695,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_sprn}{a, decsc\_a, info, clear} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[a] the matrix to be reinitialized.\\ Scope:{\bf local}\\ @@ -731,7 +746,7 @@ An integer value; 0 means no error has been detected. %% % %% \subroutine{psb\_csrp}{Applies a right permutation to a sparse matrix} -%% \syntax{call psb\_csrp}{trans, iperm, a, desc\_a, info} +%% \syntax{call psb\_csrp}{trans, iperm, a, info} %% \begin{description} %% \item[\bf On Entry] @@ -747,12 +762,6 @@ An integer value; 0 means no error has been detected. %% Scope: {\bf local} \\ %% Type: {\bf required}\\ %% Specified as: a \spdata variable.\\ -%% \item[desc\_a] The communication descriptor of type \descdata.\\ -%% Scope: {\bf local} \\ -%% Type: {\bf required}\\ -%% Specified as: a variable of type \descdata.\\ -%% \end{description} - %% \begin{description} %% \item[\bf On Return] %% \item[info] Error code.\\ @@ -770,6 +779,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_geall}{x, desc\_a, info, n} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[desc\_a] The communication descriptor.\\ Scope: {\bf local} \\ @@ -808,6 +818,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_geins}{m, irw, val, x, desc\_a, info,dupl} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[m] Number of rows in $val$ to be inserted.\\ Scope:{\bf local}.\\ @@ -871,6 +882,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_geasb}{x, desc\_a, info} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[desc\_a] The communication descriptor.\\ Scope: {\bf local} \\ @@ -901,6 +913,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_gefree}{x, desc\_a, info} \begin{description} +\item[Type:] Synchronous. \item[\bf On Entry] \item[x] The dense matrix to be freed.\\ @@ -932,9 +945,10 @@ An integer value; 0 means no error has been detected. % \subroutine{psb\_gelp}{Applies a left permutation to a dense matrix} -\syntax{call psb\_gelp}{trans, iperm, x, desc\_a, info} +\syntax{call psb\_gelp}{trans, iperm, x, info} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[trans] A character that specifies whether to permute $A$ or $A^T$.\\ Scope: {\bf local} \\ @@ -951,11 +965,6 @@ Scope: {\bf local} \\ Type: {\bf required}\\ Intent: {\bf inout}.\\ Specified as: a one or two dimensional array.\\ -\item[desc\_a] The communication descriptor.\\ -Scope: {\bf local} \\ -Type: {\bf required}\\ -Intent: {\bf in}.\\ -Specified as: a variable of type \descdata.\\ \end{description} \begin{description} @@ -977,6 +986,7 @@ An integer value; 0 means no error has been detected. \syntax*{call psb\_glob\_to\_loc}{x, desc\_a, info, iact,owned} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[x] An integer vector of indices to be converted.\\ Scope: {\bf local} \\ @@ -1043,6 +1053,7 @@ An integer value; 0 means no error has been detected. \syntax*{call psb\_loc\_to\_glob}{x, desc\_a, info, iact} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[x] An integer vector of indices to be converted.\\ Scope: {\bf local} \\ @@ -1095,6 +1106,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_get\_boundary}{bndel, desc, info} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[desc] the communication descriptor.\\ Scope:{\bf local}.\\ @@ -1133,6 +1145,7 @@ An integer value; 0 means no error has been detected. \syntax{call psb\_get\_overlap}{ovrel, desc, info} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[desc] the communication descriptor.\\ Scope:{\bf local}.\\ @@ -1173,6 +1186,7 @@ An integer value; 0 means no error has been detected. nzin, lrw} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[row] The (first) row to be extracted.\\ Scope:{\bf local}\\ @@ -1267,6 +1281,7 @@ This function computes the memory occupation of a PSBLAS object. \syntax*{psb\_sizeof}{prec} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry] \item[a] A sparse matrix $A$. \\ diff --git a/docs/pdf/util.tex b/docs/pdf/util.tex index 18e0d426..3359071d 100644 --- a/docs/pdf/util.tex +++ b/docs/pdf/util.tex @@ -85,6 +85,7 @@ module \verb|psb_util_mod|. \syntax{call hb\_read}{a, iret, iunit, filename, b, mtitle} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry ] \item[filename] The name of the file to be read.\\ Type:{\bf optional}.\\ @@ -124,6 +125,7 @@ An integer value; 0 means no error has been detected. \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry ] \item[a] the sparse matrix to be written.\\ Type:{\bf required}.\\ @@ -169,6 +171,7 @@ An integer value; 0 means no error has been detected. \syntax{call mm\_mat\_read}{a, iret, iunit, filename} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry ] \item[filename] The name of the file to be read.\\ Type:{\bf optional}.\\ @@ -195,6 +198,7 @@ An integer value; 0 means no error has been detected. \subroutine{mm\_mat\_write}{Write a sparse matrix to a file in the MatrixMarket format} \syntax{call mm\_mat\_write}{a, mtitle, iret, iunit, filename} \begin{description} +\item[Type:] Asynchronous. \item[\bf On Entry ] \item[a] the sparse matrix to be written.\\ Type:{\bf required}.\\