- Sequential BFS
- Shared Memory BFS
- Distributed Memory BFS 1D
Each file in input/ should have the format:
n m r undirected
u_1 v_1 uv_1
...
u_m v_m uv_m
Here
n : Number of unique nodes in the graph
m : Number of edges in the graph
Each file in output/ has the format:
u d_u
makeThis will take all files in datasets/ and preprocess each of them. Preprocessed files are stored in input/
make preprocessTo manually preprocess a specific file:
./run.sh preprocess <input_file> <output_file> <undir>Here, undir = 1 for an undirected graph, 0 otherwise.
make test_seq
make test_omp T=<num_threads>
make test_mpi P=<num_procs>This will take all input files in input/ and run the three algorithms on them. By default, OpenMP is run with 8 threads and MPI is run with 4 processes. The output files are generated in output/
./run.sh seq <input_file> <output_file>
./run.sh omp <input_file> <output_file> <num_threads>
./run.sh mpi <input_file> <output_file> <num_procs>make cmp_omp
make cmp_mpiThese will check if the Parallel versions match with the sequential versions