\documentclass[10pt,a4paper,twoside]{article}
\usepackage{pstricks}
\usepackage{fancybox}
\usepackage{amsfonts}
% \usepackage{minitoc}
% \setcounter{minitocdepth}{2}
\usepackage[bookmarks=true, 
            bookmarksnumbered=true, 
            bookmarksopen=false, 
            plainpages=false,
            pdfpagelabels,
            colorlinks, 
            citecolor=red,
            linkcolor=blue]{hyperref}
\usepackage{ifthen}
\usepackage{graphicx}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}
\usepackage{listings}
\usepackage{rotating}
\usepackage{microtype}
\usepackage{algorithm2e}
\usepackage{minted}
\usemintedstyle{friendly}
\definecolor{bg}{rgb}{0.95,0.95,0.95}
\usepackage{breakurl}
\usepackage{mathpazo}
\usepackage[english]{babel}
\ifpdf
\newmintinline[fortinline]{fortran}{}
\else%
\def\fortinline{\lstinline[basicstyle=\ttfamily,language=fortran]}
\fi

%\newboolean{mtc}
%\setboolean{mtc}{true}

\pdfoutput=1
\relax
\pdfcompresslevel=0             %-- 0 = none, 9 = best
\pdfinfo{                       %-- Info dictionary of PDF output  /Author (Alfredo Buttari)
  /Title (Parallel Sparse BLAS V. 3.9.0)
  /Subject (Parallel Sparse Basic Linear Algebra Subroutines)
  /Keywords (Computer Science Linear Algebra Fluid Dynamics Parallel Linux MPI PSBLAS Iterative Solvers Preconditioners)
  /Creator (pdfLaTeX)
  /Producer ($Id$)
}
\pdfcatalog{          %-- Catalog dictionary of PDF output.
  /URI (http://ce.uniroma2.it/psblas)
} 

\newcounter{subroutine}[subsection]
\newcounter{example}[subroutine]
\makeatletter
\def\subroutine{\@ifstar{\@subroutine}{\clearpage\@subroutine}}%
\def\@subroutine#1#2{%
\stepcounter{subroutine}%
      \section*{\flushleft #1---#2 \endflushleft}%
      \addcontentsline{toc}{subsection}{#1}%
      \markright{#1}}%
\newcommand{\subsubroutine}[2]{%
\stepcounter{subroutine}%
      \subsubsection*{\flushleft #1---#2 \endflushleft}%
      \addcontentsline{toc}{subsubsection}{#1}%
      \markright{#1}}%

\newcommand{\subsubsubroutine}[2]{%
\stepcounter{subroutine}%
      \subsubsection*{\flushleft #1---#2 \endflushleft}%
      \addcontentsline{toc}{paragraph}{#1}%
      \markright{#1}}%

\newcommand{\examplename}{Example}
\newcommand{\syntaxname}{Syntax}
\def\syntax{\@ifstar{\@ssyntax}{\@syntax}}%
\def\@syntax{\nobreak\section*{\syntaxname}%
     \@ssyntax}%
\def\@ssyntax#1#2{%
  \nobreak
   \setbox\@tempboxa\hbox{#1\ {\em $($#2$)$}}%
   \ifdim \wd\@tempboxa >\hsize
        \setbox\@tempboxa\hbox{\em $($#2$)$}
	\ifdim\wd\@tempboxa >\hsize
          \flushright#1\ \em$($#2$)$\endflushright%
	\else
         \hbox to\hsize{#1\hfil}%
         \hbox to\hsize{\hfil\box\@tempboxa}%
        \fi
     \else
       \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
   \fi\par\vskip\baselineskip}
\makeatother
\newcommand{\example}{\stepcounter{example}%
\section*{\examplename~\theexample}}

\newcommand{\precdata}{\hyperlink{precdata}{{\tt psb\_Tprec\_type}}}
\newcommand{\descdata}{\hyperlink{descdata}{{\tt psb\_desc\_type}}}
\newcommand{\spdata}{\hyperlink{spdata}{{\tt psb\_Tspmat\_type}}}
\newcommand{\vdata}{\hyperlink{vdata}{{\tt psb\_T\_vect\_type}}}
\newcommand{\spbasedata}{\hypertarget{spbasedata}{{\tt psb\_T\_base\_sparse\_mat}}}
\newcommand{\vbasedata}{\hypertarget{vbasedata}{{\tt psb\_T\_base\_vect\_type}}}
\def\bsideways{\begin{sidewaystable}}
\def\esideways{\end{sidewaystable}}

\begin{document}
{
\pdfbookmark{PSBLAS-v3.9.0 User's Guide}{title}
\lstset{language=Fortran}
\newlength{\centeroffset}
\setlength{\centeroffset}{-0.5\oddsidemargin}
\addtolength{\centeroffset}{0.5\evensidemargin}
%\addtolength{\textwidth}{-\centeroffset}
\thispagestyle{empty}
\vspace*{\stretch{1}}
\noindent\hspace*{\centeroffset}\makebox[0pt][l]{\begin{minipage}{\textwidth}
\flushright
{\Huge\bfseries PSBLAS 3.9.0 User's guide
}
\noindent\rule[-1ex]{\textwidth}{5pt}\\[2.5ex]
\hfill\emph{\Large A reference guide for the Parallel Sparse BLAS library}
\end{minipage}}

\vspace{\stretch{1}}
\flushleft
\begin{figure*}[htb]
	\begin{center}
		\includegraphics[width=0.6\textwidth]{psblaslibrary.png}
	\end{center}
\end{figure*}


\vspace{\stretch{1}}
\noindent\hspace*{\centeroffset}\makebox[0pt][l]{\begin{minipage}{\textwidth}
\flushright
{\bfseries 
by Salvatore Filippone\\
Alfredo Buttari \\
Fabio Durastante}\\ 
December 23rd, 2025
\end{minipage}}
}
%\addtolength{\textwidth}{\centeroffset}
\vspace{\stretch{2}}
\setcounter{tocdepth}{4}

\cleardoublepage
\begingroup
  \renewcommand*{\thepage}{toc}
  \pagenumbering{roman}   % Roman numbering
  \setcounter{page}{1}    % Abstract start on page ii
  \tableofcontents
\endgroup  

\cleardoublepage

\pagenumbering{arabic}  % Arabic numbering
\setcounter{page}{1}    % Chapters start on page 1
\include{intro}
\include{datastruct}
\include{psbrout}
\include{commrout}
\include{toolsrout}
\include{penv}
\include{error}
\include{util}
\include{precs}
\include{methods}
\include{ext-intro}
\include{cuda}
\cleardoublepage
\input{biblio}

\end{document}
%%% Local Variables: 
%%% mode: latex
%%% TeX-master: 'userguide'
%%% End: 
