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.94 (Sep. 2012).
It works with the following Fortran compilers:
- FSF g95, version 0.91 (stable) to 0.93 (beta) [LINUX]
- GNU gfortran, release greater than 4.3 (4.4 to 4.8 are ok) [LINUX]
- INTEL ifort, version 9 to 12 [LINUX]
- IBM xlf, version 12 or 13 [AIX]
- OPEN64 openf95, version 4.2 [LINUX]
- SOLARIS Studio 12.2, sunf95, version 8.5 [LINUX]
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 module
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: 2012-09-03
Édouard Canot web page
mail Édouard Canot