Main ideas:
- Use tiling, reordering to process COO data.
- Use Top-down, and Bottom-up processing pattern for frontier-kind algorithm (e.g. BFS).
- Use OpenMP for MIMD, and AVX-512 for SIMD.
- Run on Intel Knights Landing machine with MCDRAM.
For more details please refer to the paper
-
Clone the repository:
git clone https://github.com/johnpzh/bfs_simd_benchmarks.git
-
Dataset:
-
Download the dataset:
mkdir datafolder
wget http://konect.uni-koblenz.de/downloads/tsv/soc-pokec-relationships.tar.bz2
- Got the bz2 file
- Then decompress it:
tar jxvf soc-pokec-relationships.tar.bz2
- We only need the “out.xxx” file. Delete the first two lines of the file (those lines starting with %).
- Insert at the very beginning of the file the number of vertices and number of edges as the first line, like “1632803 30622564”. Save and exit.
-
CSR tiling:
cd BENCHMARK/tools/csr_tiling
- Compile for unweighted graph:
make
- Or compile for weighted graph:
make weighted=1
- Run:
./page_rank DATAFOLDER/out.xxx
(Then we got 64 files named out.xxx_untiled-xx)
-
COO tiling:
cd BENCHMARK/tools/coo_tiling
- Compile and link:
make
- Run:
./page_rank DATAFOLDER/out.xxx 1024 1024
(here it needs two 1024, then we got 64 files named out.xxx_coo-tiled-1024-xx; 1024 is the tile width, we may change it accordingly.)
-
Column-major modifying:
cd BENCHMARK/tools/column_major_tile
- Compile and link:
make
- Run:
./kcore DATAFOLDER/out.xxx 1024 16 16
(here it needs two 16, then we got 64 files named out.xxx_col-16-coo-tiled-1024-xx; 16 is the stripe length, we may change it accordingly.)
-
Reorder (according to BFS accessing order)
- Need those 64 xxx_untiled files as input.
cd BENCHMARK/tools/vertex_id_remap
- Compile for unweighted graph:
make clean && make
- Or compile for weighted graph:
make clean && make weighted=1
- Run:
./bfs DATAFOLDER/xxx
- The output is one file in
DATAFOLDER/xxx_reorder
-
Reorder (based on vertex degrees, then vertex 0 has the most degrees)
- Need those 64 xxx_untiled files as input.
cd BECHMARK/tools/vertex_id_reorder_to_degrees
- Compile for unweighted graph:
make clean && make
- Or compile for weighted graph:
make clean && make weighted=1
- Run:
./bfs DATAFOLDER/xxx
- The output is one file in
DATAFOLDER/xxx_degreeReordered
-
Weighted graph generation:
- Use the program provided by Galois to generate a weighted graph from edge-list graph file.
- Galois is hosted on GitHub now: https://github.com/IntelligentSoftwareSystems/Galois, installation is needed.
- The tools is in
<Galois_path>/tools/graph-convert
-
Then we can run the program.
cd BENCHMARK/test/bfs_serial
- Compile and link:
make
- Run:
./bfs DATAFOLDER/out.xxx 1024 16 [-w]
# bfs is the benchmark, it could be pagerank or any others.
# 1024 is tile width, 16 is stripe length, and they should consist with those which are generated in previous steps
-
If you want to run other versions, like “bfs_top-down_recur”, the steps are the same:
cd …
- Check the arguments for the program
make
./bfs <arguments <, ...>>