Compiler Cache w/ PGF90

Has anyone a working setup of a compiler cache with PGI Fortran compilers? I tried f90cache, but it just prints “Fortran 90 compiler not supported: pgf90”. Not sure whether I should try ccache, but my guess is that it will be a lot of work to integrate with Fortran compilers. If you got something working I’d be curious on how you do it.

Hi Michel,

I’ve never used f90cache so don’t know for sure. Most likely the best route would be to contact the author and ask them to add support for PGI.

I did download f90cache and it appears to me that the compiler configuration is mostly about parsing the command line flags. I was able to add the following lines to f90cache.c (around line 1357) and get the program to recognize “pgfortran” (you could use pgf90 instead).

} else if (strncmp(compiler_path, “pgfortran”, 3) == 0) {
f90_compiler_type = INTEL_IFC;

I have no idea if this will work for all cases, but it seemed to work fine for me to compile a simple project.

  • Mat

Hey Mat. Thank you very much, it works! I feel a bit uneasy about all the compiler options magic going on in that file, but so far I haven’t encountered any problems and it seems to be a net plus for me (I need to do lots of cleans when developing my preprocessor and subsequent compilations of a whole weather simulation can take a lot of time).