You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
psblas3/docs/pdf/penv.tex

627 lines
19 KiB
TeX

\section{Parallel environment routines}
\label{sec:parenv}
\subroutine{psb\_init}{Initializes PSBLAS parallel environment}
\syntax{call psb\_init}{icontxt, np}
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}.\\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Specified as: an integer value. \
Default: use all available processes provided by the underlying
parallel environment.
\end{description}
\begin{description}
\item[\bf On Return]
\item[icontxt] the communication context identifying the virtual
parallel machine.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf out}.\\
Specified as: an integer variable.
\end{description}
\section*{Notes}
\begin{enumerate}
\item A call to this routine must precede any other PSBLAS call.
\item It is an error to specify a value for $np$ greater than the
number of processes available in the underlying parallel execution
environment.
\end{enumerate}
\subroutine{psb\_info}{Return information about PSBLAS parallel environment}
\syntax{call psb\_info}{icontxt, iam, np}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\end{description}
\begin{description}
\item[\bf On Return]
\item[iam] Identifier of current process in the PSBLAS virtual parallel machine.\\
Scope: {\bf local}.\\
Type: {\bf required}.\\
Intent: {\bf out}.\\
Specified as: an integer value. $-1 \le iam \le np-1$\
\item[np] Number of processes in the PSBLAS virtual parallel machine.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf out}.\\
Specified as: an integer variable. \
\end{description}
\section*{Notes}
\begin{enumerate}
\item For processes in the virtual parallel machine the identifier
will satisfy $0 \le iam \le np-1$;
\item If the user has requested on \verb|psb_init| a number of
processes less than the total available in the parallel execution
environment, the remaining processes will have on return $iam=-1$;
the only call involving \verb|icontxt| that any such process may
execute is to \verb|psb_exit|.
\end{enumerate}
\subroutine{psb\_exit}{Exit from PSBLAS parallel environment}
\syntax{call psb\_exit}{icontxt}
\syntax*{call psb\_exit}{icontxt,close}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[close] Whether to close all data structures related to the
virtual parallel machine, besides those associated with icontxt.\\
Scope: {\bf global}.\\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Specified as: a logical variable, default value: true.
\end{description}
\section*{Notes}
\begin{enumerate}
\item This routine may be called even if a previous call to
\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 A call to this routine with \verb|close=.true.| implies a call
to \verb|MPI_Finalize|, after which no parallel routine may be called.
\item If the user whishes to use multiple communication contexts in the
same program, or to enter and exit multiple times into the parallel
environment, this routine may be called to
selectively close the contexts with \verb|close=.false.|, while on
the last call it should be called with \verb|close=.true.| to
shutdown in a clean way the entire parallel environment.
\end{enumerate}
\subroutine{psb\_get\_mpicomm}{Get the MPI communicator}
\syntax{call psb\_get\_mpicomm}{icontxt, icomm}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\end{description}
\begin{description}
\item[\bf On Return]
\item[icomm] The MPI communicator associated with the PSBLAS virtual parallel machine.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf out}.\\
\end{description}
\subroutine{psb\_get\_rank}{Get the MPI rank}
\syntax{call psb\_get\_rank}{rank, icontxt, id}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[id] Identifier of a process in the PSBLAS virtual parallel machine.\\
Scope: {\bf local}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer value. $0 \le id \le np-1$\
\end{description}
\begin{description}
\item[\bf On Return]
\item[rank] The MPI rank associated with the PSBLAS process $id$.\\
Scope: {\bf local}.\\
Type: {\bf required}.\\
Intent: {\bf out}.\\
\end{description}
\subroutine{psb\_wtime}{Wall clock timing}
\syntax{time = psb\_wtime}{}
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.\\
psblas-dev: README base/comm/psb_dgather.f90 base/comm/psb_dhalo.f90 base/comm/psb_dovrl.f90 base/comm/psb_dscatter.F90 base/comm/psb_ihalo.f90 base/comm/psb_zgather.f90 base/comm/psb_zhalo.f90 base/comm/psb_zovrl.f90 base/comm/psb_zscatter.F90 base/internals/psi_dswapdata.F90 base/internals/psi_dswaptran.F90 base/internals/psi_iswapdata.F90 base/internals/psi_iswaptran.F90 base/internals/psi_zswapdata.F90 base/internals/psi_zswaptran.F90 base/modules/Makefile base/modules/cutil.c base/modules/fakempi.c base/modules/psb_comm_mod.f90 base/modules/psb_const_mod.f90 base/modules/psb_desc_type.f90 base/modules/psb_error_mod.F90 base/modules/psb_inter_desc_type.f90 base/modules/psb_penv_mod.F90 base/modules/psb_psblas_mod.f90 base/modules/psb_realloc_mod.F90 base/modules/psb_serial_mod.f90 base/modules/psb_sort_mod.f90 base/modules/psb_spmat_type.f90 base/modules/psb_spsb_mod.f90 base/modules/psb_tools_mod.f90 base/modules/psi_mod.f90 base/modules/psi_serial_mod.f90 base/psblas/psb_damax.f90 base/psblas/psb_dasum.f90 base/psblas/psb_daxpby.f90 base/psblas/psb_ddot.f90 base/psblas/psb_dnrm2.f90 base/psblas/psb_dnrmi.f90 base/psblas/psb_dspmm.f90 base/psblas/psb_dspsm.f90 base/psblas/psb_zamax.f90 base/psblas/psb_zasum.f90 base/psblas/psb_zaxpby.f90 base/psblas/psb_zdot.f90 base/psblas/psb_znrm2.f90 base/psblas/psb_znrmi.f90 base/psblas/psb_zspmm.f90 base/psblas/psb_zspsm.f90 base/serial/aux/dasr.f90 base/serial/aux/dasrx.f90 base/serial/aux/dmsort_dw.f90 base/serial/aux/dmsort_up.f90 base/serial/aux/dmsr.f90 base/serial/aux/dmsrx.f90 base/serial/aux/dsr.f90 base/serial/aux/dsrx.f90 base/serial/aux/zacmp_mod.f90 base/serial/aux/zalcmp_mod.f90 base/serial/aux/zalsr.f90 base/serial/aux/zalsrx.f90 base/serial/aux/zamsort_dw.f90 base/serial/aux/zamsort_up.f90 base/serial/aux/zamsr.f90 base/serial/aux/zamsrx.f90 base/serial/aux/zasr.f90 base/serial/aux/zasrx.f90 base/serial/aux/zlcmp_mod.f90 base/serial/aux/zlsr.f90 base/serial/aux/zlsrx.f90 base/serial/coo/dcoomm.f base/serial/coo/dcoomv.f base/serial/coo/dcoonrmi.f base/serial/coo/dcoorws.f base/serial/coo/dcoosm.f base/serial/coo/dcoosv.f base/serial/coo/zcoomm.f base/serial/coo/zcoomv.f base/serial/coo/zcoonrmi.f base/serial/coo/zcoorws.f base/serial/coo/zcoosm.f base/serial/coo/zcoosv.f base/serial/csr/dcrnrmi.f base/serial/csr/dcsrck.f base/serial/csr/dcsrmm.f base/serial/csr/dcsrmv.f base/serial/csr/dcsrmv2.f base/serial/csr/dcsrmv3.f base/serial/csr/dcsrmv4.f base/serial/csr/dcsrrws.f base/serial/csr/dcsrsm.f base/serial/csr/dcsrsv.f base/serial/csr/zcrnrmi.f base/serial/csr/zcsrck.f base/serial/csr/zcsrmm.f base/serial/csr/zcsrrws.f base/serial/csr/zcsrsm.f base/serial/csr/zsrmv.f base/serial/csr/zsrsv.f base/serial/dp/dcoco.f base/serial/dp/dcocr.f base/serial/dp/dcrco.f base/serial/dp/dcrcr.f base/serial/dp/dcrjd.f base/serial/dp/dcsrp1.f base/serial/dp/dcsrrp.f base/serial/dp/dgind_tri.f base/serial/dp/dgindex.f base/serial/dp/djadrp.f base/serial/dp/djadrp1.f base/serial/dp/djdco.f base/serial/dp/djdcox.f base/serial/dp/dvtfg.f base/serial/dp/reordvn.f base/serial/dp/zcoco.f base/serial/dp/zcocr.f base/serial/dp/zcrco.f base/serial/dp/zcrcr.f base/serial/dp/zcrjd.f base/serial/dp/zgind_tri.f base/serial/dp/zgindex.f base/serial/f77/daxpby.f base/serial/f77/dcsmm.f base/serial/f77/dcsnmi.f base/serial/f77/dcsrp.f base/serial/f77/dcsrws.f base/serial/f77/dcssm.f base/serial/f77/dgelp.f base/serial/f77/dlpupd.f base/serial/f77/dswmm.f base/serial/f77/dswsm.f base/serial/f77/smmp.f base/serial/f77/zaxpby.f base/serial/f77/zcsmm.f base/serial/f77/zcsnmi.f base/serial/f77/zcsrws.f base/serial/f77/zcssm.f base/serial/f77/zgelp.f base/serial/f77/zlpupd.f base/serial/f77/zswmm.f base/serial/f77/zswsm.f base/serial/jad/djadmm.f base/serial/jad/djadmv.f base/serial/jad/djadmv2.f base/serial/jad/djadmv3.f base/serial/jad/djadmv4.f base/serial/jad/djadnr.f base/serial/jad/djadrws.f base/serial/jad/djadsm.f base/serial/jad/djadsv.f base/serial/jad/djdnrmi.f base/serial/jad/djdrws.f base/serial/psb_dcoins.f90 base/serial/psb_dcsmm.f90 base/serial/psb_dcsmv.f90 base/serial/psb_dcsnmi.f90 base/serial/psb_dcsrp.f90 base/serial/psb_dcsrws.f90 base/serial/psb_dcssm.f90 base/serial/psb_dcssv.f90 base/serial/psb_dgelp.f90 base/serial/psb_dneigh.f90 base/serial/psb_dnumbmm.f90 base/serial/psb_dspcnv.f90 base/serial/psb_dspgetrow.f90 base/serial/psb_dspgtdiag.f90 base/serial/psb_dspscal.f90 base/serial/psb_dsymbmm.f90 base/serial/psb_getrow_mod.f90 base/serial/psb_regen_mod.f90 base/serial/psb_update_mod.f90 base/serial/psb_zcoins.f90 base/serial/psb_zcsmm.f90 base/serial/psb_zcsmv.f90 base/serial/psb_zcsnmi.f90 base/serial/psb_zcsrp.f90 base/serial/psb_zcsrws.f90 base/serial/psb_zcssm.f90 base/serial/psb_zcssv.f90 base/serial/psb_zgelp.f90 base/serial/psb_zneigh.f90 base/serial/psb_znumbmm.f90 base/serial/psb_zspcnv.f90 base/serial/psb_zspgetrow.f90 base/serial/psb_zspgtdiag.f90 base/serial/psb_zspscal.f90 base/serial/psb_zsymbmm.f90 base/tools/psb_dallc.f90 base/tools/psb_dasb.f90 base/tools/psb_dfree.f90 base/tools/psb_dins.f90 base/tools/psb_dsphalo.F90 base/tools/psb_dspins.f90 base/tools/psb_zallc.f90 base/tools/psb_zasb.f90 base/tools/psb_zfree.f90 base/tools/psb_zins.f90 base/tools/psb_zsphalo.F90 base/tools/psb_zspins.f90 docs/pdf/datastruct.tex docs/pdf/penv.tex docs/userguide.pdf krylov/psb_dbicg.f90 krylov/psb_dcg.f90 krylov/psb_dcgs.f90 krylov/psb_dcgstab.F90 krylov/psb_dcgstabl.f90 krylov/psb_drgmres.f90 krylov/psb_krylov_mod.f90 krylov/psb_zbicg.f90 krylov/psb_zcg.f90 krylov/psb_zcgs.f90 krylov/psb_zcgstab.f90 krylov/psb_zcgstabl.f90 krylov/psb_zrgmres.f90 prec/psb_dbjac_aply.f90 prec/psb_dbjac_bld.f90 prec/psb_dgprec_aply.f90 prec/psb_dilu_fct.f90 prec/psb_dprc_aply.f90 prec/psb_dprecset.f90 prec/psb_prec_mod.f90 prec/psb_prec_type.f90 prec/psb_zbjac_aply.f90 prec/psb_zbjac_bld.f90 prec/psb_zgprec_aply.f90 prec/psb_zilu_fct.f90 prec/psb_zprc_aply.f90 prec/psb_zprecset.f90 test/fileread/df_sample.f90 test/fileread/getp.f90 test/fileread/zf_sample.f90 test/pargen/ppde.f90 test/util/Makefile util/psb_hbio_mod.f90 util/psb_mat_dist_mod.f90 util/psb_metispart_mod.F90 util/psb_mmio_mod.f90 util/psb_read_mat_mod.f90 Merged kind type names changes from r:2905:2906 in branches/psblas-2.2-maint.
17 years ago
Returned as: a \verb|real(psb_dpk_)| variable.
\end{description}
\subroutine{psb\_barrier}{Sinchronization point parallel environment}
\syntax{call psb\_barrier}{icontxt}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\end{description}
\subroutine{psb\_abort}{Abort a computation}
\syntax{call psb\_abort}{icontxt}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\end{description}
\subroutine{psb\_bcast}{Broadcast data}
\syntax{call psb\_bcast}{icontxt, dat, root}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[dat] On the root process, the data to be broadcast.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array, or a character or logical variable,
which may be a scalar or rank 1 array. \
Type, rank and size must agree on all processes.
\item[root] Root process holding data to be broadcast.\\
Scope: {\bf global}.\\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Specified as: an integer value $0<= root <= np-1$, default 0 \
\end{description}
\begin{description}
\item[\bf On Return]
\item[dat] On processes other than root, the data to be broadcast.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array, or a character or logical scalar. \
Type, rank and size must agree on all processes.
\end{description}
\subroutine{psb\_sum}{Global sum}
\syntax{call psb\_sum}{icontxt, dat, root}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[dat] The local contribution to the global sum.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array. \
Type, rank and size must agree on all processes.
\item[root] Process to hold the final sum, or $-1$ to make it available
on all processes.\\
Scope: {\bf global}.\\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Specified as: an integer value $-1<= root <= np-1$, default -1. \
\end{description}
\begin{description}
\item[\bf On Return]
\item[dat] On destination process(es), the result of the sum operation.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array. \\
Type, rank and size must agree on all processes.
\end{description}
\section*{Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
result destination.
\end{enumerate}
\subroutine{psb\_max}{Global maximum}
\syntax{call psb\_max}{icontxt, dat, root}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[dat] The local contribution to the global maximum.\\
Scope: {\bf local}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer or real variable, which may be a
scalar, or a rank 1 or 2 array. \
Type, rank and size must agree on all processes.
\item[root] Process to hold the final maximum, or $-1$ to make it available
on all processes.\\
Scope: {\bf global}.\\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Specified as: an integer value $-1<= root <= np-1$, default -1. \\
\end{description}
\begin{description}
\item[\bf On Return]
\item[dat] On destination process(es), the result of the maximum operation.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer or real variable, which may be a
scalar, or a rank 1 or 2 array. \
Type, rank and size must agree on all processes.
\end{description}
\section*{Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
result destination.
\end{enumerate}
\subroutine{psb\_min}{Global minimum}
\syntax{call psb\_min}{icontxt, dat, root}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[dat] The local contribution to the global minimum.\\
Scope: {\bf local}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer or real variable, which may be a
scalar, or a rank 1 or 2 array. \
Type, rank and size must agree on all processes.
\item[root] Process to hold the final value, or $-1$ to make it available
on all processes.\\
Scope: {\bf global}.\\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Specified as: an integer value $-1<= root <= np-1$, default -1. \\
\end{description}
\begin{description}
\item[\bf On Return]
\item[dat] On destination process(es), the result of the minimum operation.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer or real variable, which may be a
scalar, or a rank 1 or 2 array. \\
Type, rank and size must agree on all processes.
\end{description}
\section*{Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
result destination.
\end{enumerate}
\subroutine{psb\_amx}{Global maximum absolute value}
\syntax{call psb\_amx}{icontxt, dat, root}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[dat] The local contribution to the global maximum.\\
Scope: {\bf local}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array. \
Type, rank and size must agree on all processes.
\item[root] Process to hold the final value, or $-1$ to make it available
on all processes.\\
Scope: {\bf global}.\\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Specified as: an integer value $-1<= root <= np-1$, default -1. \\
\end{description}
\begin{description}
\item[\bf On Return]
\item[dat] On destination process(es), the result of the maximum operation.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array. \
Type, rank and size must agree on all processes.
\end{description}
\section*{Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
result destination.
\end{enumerate}
\subroutine{psb\_amn}{Global minimum absolute value}
\syntax{call psb\_amn}{icontxt, dat, root}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[dat] The local contribution to the global minimum.\\
Scope: {\bf local}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array. \
Type, rank and size must agree on all processes.
\item[root] Process to hold the final value, or $-1$ to make it available
on all processes.\\
Scope: {\bf global}.\\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Specified as: an integer value $-1<= root <= np-1$, default -1. \\
\end{description}
\begin{description}
\item[\bf On Return]
\item[dat] On destination process(es), the result of the minimum operation.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array. \\
Type, rank and size must agree on all processes.
\end{description}
\section*{Notes}
\begin{enumerate}
\item The \verb|dat| argument is both input and output, and its
value may be changed even on processes different from the final
result destination.
\end{enumerate}
\subroutine{psb\_snd}{Send data}
\syntax{call psb\_snd}{icontxt, dat, dst, m}
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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[dat] The data to be sent.\\
Scope: {\bf local}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array, or a character or logical scalar. \
Type and rank must agree on sender and receiver process; if $m$ is
not specified, size must agree as well.
\item[dst] Destination process.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer value $0<= dst <= np-1$. \\
\item[m] Number of rows.\\
Scope: {\bf global}.\\
Type: {\bf Optional}.\\
Intent: {\bf in}.\\
Specified as: an integer value $0<= m <= size(dat,1)$. \\
When $dat$ is a rank 2 array, specifies the number of rows to be sent
independently of the leading dimension $size(dat,1)$; must have the
same value on sending and receiving processes.
\end{description}
\begin{description}
\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.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer variable.
\item[src] Source process.\\
Scope: {\bf global}.\\
Type: {\bf required}.\\
Intent: {\bf in}.\\
Specified as: an integer value $0<= src <= np-1$. \\
\item[m] Number of rows.\\
Scope: {\bf global}.\\
Type: {\bf Optional}.\\
Intent: {\bf in}.\\
Specified as: an integer value $0<= m <= size(dat,1)$. \\
When $dat$ is a rank 2 array, specifies the number of rows to be sent
independently of the leading dimension $size(dat,1)$; must have the
same value on sending and receiving processes.
\end{description}
\begin{description}
\item[\bf On Return]
\item[dat] The data to be received.\\
Scope: {\bf local}.\\
Type: {\bf required}.\\
Intent: {\bf inout}.\\
Specified as: an integer, real or complex variable, which may be a
scalar, or a rank 1 or 2 array, or a character or logical scalar. \
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}