Add GPU references and example to docs: first round.

This commit is contained in:
Salvatore Filippone
2021-04-06 14:37:34 +02:00
parent b4b96d9338
commit 53747b8534
38 changed files with 4332 additions and 4251 deletions
+39
View File
@@ -416,6 +416,45 @@ call P%build(A,desc_A,info)
\end{listing}
\subsection{GPU example\label{sec:gpu-example}}
The code reported in Figure~\ref{fig:gpu-ex1} shows how to set up a
program exploiting the combined GPU capabilities of PSBLAS and
AMG4PSBLAS.
\begin{listing}[h!]
\ifpdf
\begin{minted}[breaklines=true,bgcolor=bg,fontsize=\small]{fortran}
! build a one-level RAS with overlap 2 and ILU(0) on the local blocks.
call P%init('AS',info)
call P%set('SUB_OVR',2,info)
call P%build(A,desc_A,info)
... ...
! solve Ax=b with preconditioned BiCGSTAB
call psb_krylov('BICGSTAB',A,P,b,x,tol,desc_A,info)
\end{minted}
\else
\begin{center}
\begin{minipage}{.90\textwidth}
{\small
\begin{verbatim}
! build a one-level RAS with overlap 2 and ILU(0) on the local blocks.
call P%init('AS',info)
call P%set('SUB_OVR',2,info)
call P%build(A,desc_A,info)
... ...
! solve Ax=b with preconditioned BiCGSTAB
call psb_krylov('BICGSTAB',A,P,b,x,tol,desc_A,info)
\end{verbatim}
}
\end{minipage}
\end{center}
\fi
\caption{setup of a one-level Schwarz preconditioner.\label{fig:gpu-ex1}}
\end{listing}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "userguide"