Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

"-warn all" produces *__genmod.f90 and breaks make clean


Hello all,

i'm using ifort on CentOS 7.

when using "-warn all -check all", it produces files *__genmod.f90. These files break makefile, i don't understand why, as i don't use them.

[me@xcluster GRDv2]$ make cleaner
find: paths must precede expression: controleur__genmod.f90
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

gnu makefile is 3.82.

Without this flag, everything is fine.

Thanks in advance

0 Kudos
4 Replies
Valued Contributor I

Did you check this with a newer compiler? That files like this "break" the clean target of a makefile is rather trivial, and also trivial to fix. The question is why these files have been generated. Without a code example this is hard to say. The name of the files somehow might be suspicious that there might be submodules in your code?


0 Kudos
Honored Contributor III

>>The question is why these files have been generated.

-warn interfaces

Tells the compiler to check the interfaces of all SUBROUTINEs called and FUNCTIONs invoked in your compilation against a set of interface blocks stored separately from the source being compiled.

The compiler generates a compile-time message if the interface used to invoke a routine does not match the interface defined in a .mod file external to the source (that is, in a .mod generated by option gen-interfaces as opposed to a .mod file USEd in the source). The compiler looks for these .mods in the current directory or in the directory specified by the include (-I) or -module option. If interface mismatches occur, some will result in a compile-time error, others will only generate a warning.

By default, warn interfaces turns on option gen-interfaces. You can turn off that option by explicitly specifying option /gen-interfaces- (Windows*) or -no-gen-interfaces (Linux* and OS X*).

Jim Dempsey

0 Kudos
Honored Contributor III

Jim is correct. I still don't see why they should break a makefile. Perhaps the __ in the filename triggers something.

0 Kudos

You could also add the option "-gen_interfaces nosource"  to the command line.    This tells the compiler not to generate those intermediate foo__genmod.f90 files.


0 Kudos