dijkstra_openmp, a Fortran90 code which uses OpenMP to parallelize Dijkstra's minimum graph distance algorithm.
The code is an interesting example, because it does not involve parallelization of a loop. Instead, a parallel region is defined, and the nodes of the graph are divided up among the threads. The resulting parallel algorithm naturally requires some of the more advanced OpenMP directives, including critical, single and barrier, in order to work correctly.
The actual graph that is analyzed is very small (6 nodes), but of course the same algorithm would work for larger graphs. The point is rather to see how the OpenMP directives can be put together correctly.
The information on this web page is distributed under the MIT license.
dijkstra_openmp is available in a C version and a C++ version and a Fortran90 version.
dijkstra, a Fortran90 code which runs a simple example of Dijkstra's minimum distance algorithm for graphs.
openmp_test, a Fortran90 code which uses the OpenMP application code interface for carrying out parallel computations in a shared memory environment.