f90cache is a compiler cache. It acts as a caching pre-processor to
Fortran compilers, using the -E compiler switch and a hash to detect
when a compilation can be satisfied from cache. This often results in
a great speedup in common compilations.
The idea came from Andrew Tridgell who wrote the original ccache program.
See also this
for a personal version of ccache which support many different compilers.
However, see also the recent releases of ccache
The latest release is f90cache 0.99c (May 2019).
It works with the following Linux Fortran compilers:
According to its name, this tool is of course compatible with all features
of the Fortran 90 Standard. Moreover, it supports the Fortran 2008 submodule
facility (introduced from version 6 of GNU Fortran, and from version 16 of
- GNU gfortran, release 4.4 to 9
- INTEL ifort, version 9 to 16
Why bother with a compiler cache? If you ever run "make clean; make"
then you can probably benefit from f90cache. It is very common for
developers to do a clean build of a project for a whole host of
reasons, and this throws away all the information from your previous
By using f90cache you can get exactly the same effect as "make clean;
make" but much faster.
Is it safe?
Yes. The most important aspect of a compiler cache is to always
produce exactly the same output that the real compiler would
produce. The includes providing exactly the same object files and
exactly the same compiler warnings that would be produced if you use
the real compiler. The only way you should be able to tell that you
are using f90cache is the speed.
- keeps statistics on hits/misses
- automatic cache size management
- can cache compiles that generate warnings, as well as precompiled
See the manual page
How to use it
You can use f90cache in two ways. The first is just to prefix your
compile commands with "f90cache". For example, you could change the
"F90C=gfortran" line in your Makefile to be "F90C=f90cache gfortran".
Alternatively, you can create symbolic links from your compilers name
to f90cache. This allows you to use f90cache without any changes to your
You can download the latest release from this
Last page modification: 2019-05-12
Édouard Canot web page