You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\subsection{Setup: Installing ALP and Preparing to Use the Solver}\label{sec:setup}
8
8
9
-
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.
9
+
This section explains how to install ALP on a Linux system and compile a simple example.
10
+
ALP (Algebraic Programming) provides a C++17 library implementing the GraphBLAS interface
11
+
for linear-algebra-based computations.
10
12
11
13
\subsubsection*{Installation on Linux}
12
14
@@ -17,45 +19,12 @@ \subsubsection*{Installation on Linux}
This script updates paths to make ALP's compiler wrapper and libraries available.
41
-
42
-
\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:
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).
47
-
48
-
\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:
(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.)
53
-
\end{enumerate}
54
-
55
-
You can also specify a backend with the -b flag. For instance, -b reference builds a sequential version, while -b reference\_omp enables ALP's shared-memory (OpenMP) parallel backend . If you built ALP with distributed-memory support, you might use -b hybrid or -b bsp1d for hybrid or MPI- nstyle backends. In those cases, you would run the program via grbrun (which handles launching multiple processes) – but for this tutorial, we will use a single-process, multi-threaded backend, so running the program normally is fine.
56
-
\\
57
-
58
-
\textbf{Direct linking option}: If you prefer to compile with your usual compiler, you need to include ALP's headers and link against the ALP libraries manually. For the CG solver transition path, that typically means linking against the sparse solver library (e.g. libspsolver\_shmem\_parallel for the parallel version) and any core ALP libraries it depends on. For example, if ALP is installed in /opt/alp , you might compile with:
22
+
\textbf{Direct linking option}: If you prefer to compile with your usual compiler,
23
+
you need to include ALP's headers and link against the ALP libraries manually.
24
+
For the CG solver transition path, that typically means linking against the
25
+
sparse solver library (e.g. libspsolver\_shmem\_parallel for the parallel version)
26
+
and any core ALP libraries it depends on. For example, if ALP is installed in /opt/alp,
@@ -64,7 +33,9 @@ \subsubsection*{Installation on Linux}
64
33
\end{lstlisting}
65
34
66
35
67
-
(ALP's documentation provides details on which libraries to link for each backend [3].) Using grbcxx is recommended for simplicity, but it's good to know what happens under the hood. Now that our environment is set up, let's look at the CG solver API.
36
+
(ALP's documentation provides details on which libraries to link for each backend [3].)
37
+
Using grbcxx is recommended for simplicity, but it's good to know what happens under the hood.
38
+
Now that our environment is set up, let's look at the CG solver API.
68
39
69
40
70
41
\subsection{Overview of ALP's Non-Blocking Sparse CG API}\label{sec:api}
@@ -194,25 +165,17 @@ \section*{Building and Running the Example}
194
165
To compile the above code with ALP, we will use the direct linking option as discussed.
0 commit comments