Sequential and parallel implementation of depth-first search algorithm using OpenMP.
The implemented code finds the path in DFS given a source node and a destination node, for this it reads a graph from the graph folder, where there are 3 examples with different sizes.
-
Compile dfs.cpp
g++ -o dfs -fopenmp dfs.cpp
-
Run
./dfs [threads] [from] [to]
threads: is the number of threads that the parallel algorithm will use
from: is the root node or source node
to: is the destination node, the one sought