Incompatible or Old Module File

I’m trying to compile code received from an outside source using a Makefile. About 3/4 of the way through, I get the following messages:

PGF90-S-0004-Incompatible or Old Module File
PGF90-F-0004-Compile source file with same compiler

Does anyone know where I can find a reference that can clue me as to how to fix this? The FORTRAN reference .pdf and the FAQ don’t seem to refer to it.

Hi bjd_ba,

The internal struture of a Module file is different between compiler vendors and can change between releases of a compiler. Because of this, you need to re-compile your modules as well as your source.

Hopefully, this is as easy as performing a ‘make clean’ and re-compiling. Some makefiles , however, don’t always removed “.mod” files. In this case you’ll need to remove them manually. If the module files are from a library or other source, such as NetCDF, you’ll need to get the module’s source file and recompile.

  • Mat


Deleting the old .mod files and compiling worked fine. Thank you.