submodules support to avoid compilation cascades

Today I’ve learned about the F2008 feature ‘submodules’. May I ask whether support for this is planned? I think it would improve recompilation times for large projects greatly if applied consistently.

Best regards,


Hi Michel,

We’re in the process of adding F2008 features incrementally over the next few years. For Submodules specifically, this will be in the longer term but I don’t have a specific time frame.

How important is this to you? Nice to have? or really need it?

  • Mat

Hey Mat! I think there are two aspects to it: For me personally it’s rather nice to have. Looking at the big picture though, i.e. working towards a future where Fortran code becomes portable to all current and common HPC hardware architectures (which obviously means different compilers), it would be nice to have all big compilers on board with these features sooner rather than later (and by sooner I mean some foreseeable timeframe). Because until we get that it basically means you can’t write Fortran using these features in any context if you want to make it portable (and portability to GPU is hopefully something more and more programmers are thinking about, or at least should think about).

That all being said I think this could be another point where a well supported preprocessor could make a dent - especially something like submodules I think I could implement pretty easily at preprocessor level. That means there wouldn’t be any benefit in terms of compilation times, but at least the syntax would become supported so if one comes with a codebase using this feature one could just put the PP in front of pgfortran and make it work. Maybe such a bridge could be interesting for you guys?

Hi Michel,

I’ve passed this on to engineering to see if it’s something they could collaborate on.

One question. Are you thinking of adding this to Hybrid-Fortran or are you thinking of creating a different tool?

  • Mat