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

Problem compiling with -warn interfaces on ifort 12.1.6

Thomas_M_6
Beginner
713 Views
I'm trying to compile a large software project with ifort 12.1.6 20120928 on RHEL6 using the -warn interfaces option (to detect possible argument mismatches in function calls). In many cases, I get the error #6457: This derived type name has not been declared. I could manually fix this by editing every single _genmod.f90 file adding the required USE module statement, but this is not a viable option. I saw here (https://software.intel.com/en-us/articles/intel-fortran-compiler-version-1400080-error-6457-the-derived-type-name-has-not-been-0) that that's a compiler bug which has been fixed in version 14 of the compiler. Now my question is: is this fix also available for ifort 12? If so, where/how can I get it?
0 Kudos
5 Replies
Steven_L_Intel1
Employee
713 Views

No, that fix is not available in ifort 12. However, it is not clear to me that it is describing your issue, even though the message is the same. In particular, editing the __genmod.f90 will accomplish nothing as these files are not read by the compiler; they are created only for your reference and may not completely represent the actual interface.

Can you show us a small but complete example that demonstrates the problem?

0 Kudos
Thomas_M_6
Beginner
713 Views
Unfortunately, I cannot compile an example showing the problem. I thought these _genmod were used by the compiler to check whether the calls to these functions do contain the correct number and types of arguments. So if I understand that correctly, I could actually delete these file and still be warned about a possible incorrect function call? It is probably the build system I'm using which just picks up these generated files and tries to compile them. Still, I don't understand why the files are generated incorrectly, i.e. without the required USE statement which would provide the derived type passed as an argument. Because, as I mentioned, if I do actually add the respective USE statements manually, compiling of the generated f90 files does proceed.
0 Kudos
Steven_L_Intel1
Employee
713 Views

The __genmod.f90 file is not used. The __genmod.mod file is used, but you can't edit it.  Can you try a newer compiler? A free 30-day evaluation is available.

0 Kudos
Thomas_M_6
Beginner
712 Views
The latest release we have available is 14.0.0 20130728. This version does not contain said fix, or does it? Which one would you recommend? I could ask our IT to upgrade to that version.
0 Kudos
Steven_L_Intel1
Employee
712 Views

According to the article, that fix is in version 14.0.1. The current version is 15.0.3 and this is what I would recommend.

0 Kudos
Reply