# Visualizing Fortran Projects with fpm: Create Stunning Module Dependency Charts

**URL:** <https://fortran-lang.discourse.group/t/visualizing-fortran-projects-with-fpm-create-stunning-module-dependency-charts/9838>\
**Category:** Tutorials\
**Created:** [June 5, 2025, 10:14pm UTC](https://fortran-lang.discourse.group/t/visualizing-fortran-projects-with-fpm-create-stunning-module-dependency-charts/9838 "2025-06-05T22:14:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [June 5, 2025, 10:47pm UTC](https://fortran-lang.discourse.group/t/visualizing-fortran-projects-with-fpm-create-stunning-module-dependency-charts/9838/2 "2025-06-05T22:47:06Z")

</div>

Great project! There was also a request from @rouson to add this to fpm. See here: [Option to output module dependency tree · Issue #687 · fortran-lang/fpm · GitHub](https://github.com/fortran-lang/fpm/issues/687)

I have made a similar prototype in a private branch. I used it to plot the fpm module dependencies:

 ![image](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/b/bf3cec87b2a4ebb06e17b4797d42d16250f66bf2.jpeg)

I think I used the neato or fdp layout engine to draw this. One recognizes _leaf_ modules, which typically fulfill concrete tasks. And then you have this inner highly inter-connected part of all the abstract model stuff. There are probably a couple fake dependencies in there too. A hierarchical view can be found here: [Option to output module dependency tree · Issue #687 · fortran-lang/fpm · GitHub](https://github.com/fortran-lang/fpm/issues/687#issuecomment-2727698387)

I’ll surely take a closer look at fpm-modules to see if there is anything I could borrow for [fpm-deps](https://github.com/ivan-pi/fpm-deps) (discussed here previously - [Dependency graph for FORD](https://fortran-lang.discourse.group/t/dependency-graph-for-ford/9422)). Vice-versa, I think having a Graphviz option in fpm-modules would be nice. You can find an example here: [fpm-deps/app/fpm-deps/fpm-deps.f90 at 2fa1ee77ae78c4b0d4b67d92da4b9a62ad6557ab · ivan-pi/fpm-deps · GitHub](https://github.com/ivan-pi/fpm-deps/blob/2fa1ee77ae78c4b0d4b67d92da4b9a62ad6557ab/app/fpm-deps/fpm-deps.f90#L312) 🙂

(ps: if you install `fpm-modules` in a place on the PATH, it can be invoked as `fpm modules` due to the fpm wrapper machinery)

Edit: another very useful feature would be to allow drawing these graphs from a list of source files (for non fpm-based projects).

---

_[View the full topic](https://fortran-lang.discourse.group/t/visualizing-fortran-projects-with-fpm-create-stunning-module-dependency-charts/9838)._
