|
1 | | -\section{Quick Start}\label{sec:quick_start} |
2 | 1 |
|
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} |
4 | 3 |
|
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: |
6 | 5 |
|
7 | 6 | \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. |
9 | 8 | For example, on Debian/Ubuntu: |
10 | 9 | \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 |
12 | 16 | \end{verbatim} |
13 | 17 |
|
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: |
15 | 19 | \begin{verbatim} |
16 | 20 | git clone https://github.com/Algebraic-Programming/ALP.git |
17 | 21 | \end{verbatim} |
18 | | -Then enter the repository directory. |
19 | 22 |
|
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: |
21 | 24 | \begin{lstlisting}[language=bash] |
22 | 25 | $ cd ALP && mkdir build && cd build |
23 | 26 | $ ../bootstrap.sh --prefix=../install # configure the build |
24 | 27 | $ make -j # compile the ALP library |
25 | 28 | $ make install # install to ../install |
26 | 29 | \end{lstlisting} |
27 | | -(You can choose a different installation prefix as needed.) |
| 30 | +(You may choose a different installation prefix as desired.) |
28 | 31 |
|
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: |
30 | 33 | \begin{lstlisting}[language=bash] |
31 | 34 | $ source ../install/bin/setenv |
32 | 35 | \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. |
34 | 37 |
|
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: |
36 | 39 | \begin{lstlisting}[language=bash] |
37 | 40 | $ grbcxx ../examples/sp.cpp -o sp_example |
38 | 41 | \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}.}). |
40 | 43 |
|
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: |
42 | 45 | \begin{lstlisting}[language=bash] |
43 | 46 | $ grbrun ./sp_example |
44 | 47 | \end{lstlisting} |
45 | 48 | (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.) |
46 | 49 | \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. |
48 | 51 |
|
49 | 52 | \section{Introduction to ALP Concepts}\label{sec:alp_concepts} |
50 | 53 |
|
|
0 commit comments