DAGLIB is a modern Fortran module for creating and manipulating directed acyclic graphs (DAGs). It includes a toposort feature, and also the ability to generate files in the GraphViz dot notation.

WWW: https://github.com/jacobwilliams/daglib
