Skip to content

Commit 8cd2a53

Browse files
committed
Review and update tutorial to Section 3
1 parent 2c65160 commit 8cd2a53

File tree

3 files changed

+47
-19
lines changed

3 files changed

+47
-19
lines changed

ALP_Tutorial.tex

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,53 @@
1-
\section{Quick Start}\label{sec:quick_start}
21

3-
This section explains how to install ALP on a Linux system and compile a simple example. ALP (Algebraic Programming) provides a C++17 library implementing the GraphBLAS interface for linear-algebra-based computations. To get started quickly:
2+
\section{Installation on Linux}\label{sec:installation}
43

5-
\subsection{Installation on Linux}
4+
This section explains how to install ALP on a Linux system and compile a simple example. To get started:
65

76
\begin{enumerate}
8-
\item Install prerequisites: Ensure you have a C++11 compatible compiler (e.g. \texttt{g++} 4.8.2 or later) with OpenMP support, CMake (>= 3.13) and GNU Make, plus development headers for libNUMA and POSIX threads.
7+
\item \textbf{Install prerequisites}. Ensure you have a C++11 compatible compiler (e.g. \texttt{g++} 4.8.2 or later) with OpenMP support, CMake (>= 3.13) and GNU Make, plus development headers for libNUMA and POSIX threads.
98
For example, on Debian/Ubuntu:
109
\begin{verbatim}
11-
sudo apt-get install build-essential libnuma-dev libpthread-stubs0-dev cmake
10+
sudo apt-get install build-essential libnuma-dev libpthread-stubs0-dev cmake;
11+
\end{verbatim}
12+
or, on Red Hat systems (as root):
13+
\begin{verbatim}
14+
dnf group install "Development Tools"
15+
dnf install numactl-devel cmake
1216
\end{verbatim}
1317

14-
\item Obtain ALP: Download or clone the ALP repository (from the official GitHub). For instance:
18+
\item \textbf{Obtain ALP}. Download or clone the ALP repository, e.g. from its official GitHub location:
1519
\begin{verbatim}
1620
git clone https://github.com/Algebraic-Programming/ALP.git
1721
\end{verbatim}
18-
Then enter the repository directory.
1922

20-
\item Build ALP: Create a build directory and invoke the provided bootstrap script to configure the project with CMake, then compile and install:
23+
\item \textbf{Build ALP}. Create a build directory and invoke the provided bootstrap script to configure the project with CMake, then compile and install:
2124
\begin{lstlisting}[language=bash]
2225
$ cd ALP && mkdir build && cd build
2326
$ ../bootstrap.sh --prefix=../install # configure the build
2427
$ make -j # compile the ALP library
2528
$ make install # install to ../install
2629
\end{lstlisting}
27-
(You can choose a different installation prefix as needed.)
30+
(You may choose a different installation prefix as desired.)
2831

29-
\item Set up environment: After installation, activate the ALP environment by sourcing the script setenv in the install directory:
32+
\item \textbf{Set up environment}. After installation, activate the ALP environment by sourcing the script setenv in the install directory:
3033
\begin{lstlisting}[language=bash]
3134
$ source ../install/bin/setenv
3235
\end{lstlisting}
33-
This script updates paths to make ALP’s compiler wrapper and libraries available.
36+
This script updates the shell PATH to make the ALP compiler wrapper accessible, as well as adds the ALP libraries to the applicable standard library paths.
3437

35-
\item Compile an example: ALP provides a compiler wrapper \texttt{grbcxx} to compile programs that use the ALP/GraphBLAS API. This wrapper automatically adds the correct include paths and links against the ALP library and its dependencies. For example, to compile the provided sp.cpp sample:
38+
\item \textbf{Compile an example}. ALP provides a compiler wrapper \texttt{grbcxx} to compile programs that use the ALP/GraphBLAS API. This wrapper automatically adds the correct include paths and links against the ALP library and its dependencies. For example, to compile the provided sp.cpp sample:
3639
\begin{lstlisting}[language=bash]
3740
$ grbcxx ../examples/sp.cpp -o sp_example
3841
\end{lstlisting}
39-
By default this produces a sequential program; you can add the option \texttt{-b reference\_omp} to use the OpenMP parallel backend (shared-memory parallelism). The wrapper \texttt{grbcxx} accepts other backends as well (e.g.\ \texttt{-b hybrid} for distributed memory).
42+
By default this produces a sequential program; you can add the option \texttt{-b reference\_omp} to use the OpenMP parallel backend for shared-memory auto-parallelisation. The wrapper \texttt{grbcxx} accepts other backends as well (e.g.\ \texttt{-b nonblocking} for nonblocking execution on shared-memory parallel systems or \texttt{-b hybrid} for hybrid shared- and distributed-memory execution\footnote{The \texttt{hybrid} backend requires the Lightweight Parallel Foundations, LPF, is installed as an additional dependence; see \url{https://github.com/Algebraic-Programming/LPF/} and/or the main ALP \texttt{README.md}.}).
4043

41-
\item Run the program: Use the provided runner \texttt{grbrun} to execute the compiled binary. For a simple shared-memory program, running with \texttt{grbrun} is similar to using \texttt{./program} directly. For example:
44+
\item \textbf{Run the program}. Use the provided runner \texttt{grbrun} to execute the compiled binary. For a simple shared-memory program, running with \texttt{grbrun} is similar to using \texttt{./program} directly. For example:
4245
\begin{lstlisting}[language=bash]
4346
$ grbrun ./sp_example
4447
\end{lstlisting}
4548
(The \texttt{grbrun} tool is more relevant when using distributed backends or controlling the execution environment; for basic usage, the program can also be run directly.)
4649
\end{enumerate}
47-
After these steps, ALP is installed and you are ready to develop ALP-based programs. In the next sections we introduce core ALP concepts and walk through a simple example program.
50+
After these steps, you have installed ALP and have made sure its basic functionalities are functional. In the next sections we introduce core ALP/GraphBLAS concepts and walk through a simple example program.
4851

4952
\section{Introduction to ALP Concepts}\label{sec:alp_concepts}
5053

introduction.tex

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
\section{Introduction}\label{sec:introduction}
2+
3+
ALgebraic Programming, or ALP for short, encompasses software technologies that allow programming with explicit algebraic structures combined with their automated parallelisation and optimisation.
4+
This document is a tutorial to the C++ interface to ALP distributed at \url{https://github.com/Algebraic-Programming/ALP}.
5+
This framework supports various interfaces, including ALP/GraphBLAS, ALP/Dense, ALP/Pregel, and a so-called \emph{transition path} for sparse linear solvers.
6+
%The former, ALP/GraphBLAS, is its most mature interface and enables sparse linear algebra over general semirings using standard, sequential C++ code.
7+
ALP provides mechanisms by which auto-parallelisation of sequential, data-centric, and algebraic C++ programs proceeds, both for shared-memory and distributed-memory parallel systems,
8+
while automatically applies other optimisations for high performance as well.
9+
%and enables so-called \emph{nonblocking execution} that automatically and significantly optimises data reuse for shared-memory platforms,
10+
%resulting in performance that tends to exceeds that of carefully hand-optimised codes,
11+
%oft-times significantly.
12+
13+
%ALP/Dense concerns an interface for generalised dense linear algebra that aims to lead, in due time, to a unified sparse/dense generalised linear algebraic programming interface.
14+
%ALP/Pregel provides a vertex-centric programming interface that efficiently simulates the execution of "Think-like-a-vertex (TLAV)" algorithms on top of ALP/GraphBLAS.
15+
%Finally, the ALP transition paths allow for direct interaction with existing code bases by supporting interfaces that assume standard data structures such as Compressed Row Storage (CRS) for matrices\footnote{CRS is also known as Compressed Sparse Rows (CSR) and a myriad of other names, the oldest of which is the Yale sparse matrix format.}.
16+
17+
This tutorial begins with how to obtain and install ALP.
18+
It then goes into the ALP/GraphBLAS interface, illustrating the basic concepts and usage of this most mature interface to ALP.
19+
Next is a tutorial on the transition path for shared-memory parallel sparse linear solvers; ALP transition paths are a key ALP feature that allows for direct integration with pre-existing code-bases by supporting interfaces that assume standard data structures such as Compressed Row Storage (CRS) for sparse matrices\footnote{CRS is also known as Compressed Sparse Rows (CSR) and other names, the oldest of which is the \emph{Yale} sparse matrix format.}.
20+
Finally, the tutorial closes with how to call pre-defined ALP algorithms and where to find them.
21+
Beyond Section~\ref{sec:installation}, all sections are designed to be stand-alone, and so users interested in a particular functionality alone can skip forward to the related part of the tutorial.
22+
23+
\clearpage
24+

main.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,17 @@
7171
7272
\maketitle
7373
74-
\section{Welcome to GitHub Pages generated from LaTeX Document!}
75-
76-
This document was compiled from \LaTeX{} source code using GitHub Actions and deployed to GitHub Pages.
77-
7874
\tableofcontents
7975
76+
\input{introduction.tex}
77+
8078
\input{ALP_Tutorial.tex}
8179
8280
\input{ALP_Transition_Path_Tutorial.tex}
8381
82+
\section*{Acknowledgements}
83+
84+
This document was compiled from \LaTeX{} source code using GitHub Actions and deployed to GitHub Pages.
8485
8586
\vfill % Pushes content to the top
8687
\centering

0 commit comments

Comments
 (0)