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

IFORT compiler errors after oneAPI upgrade (2021.2 -> 2023.1)

John_L_10
New Contributor I
1,464 Views

My mixed-language code consists of 14 ifort projects and other C++ projects.  After the upgrade, one of my ifort projects reports the following types of errors (I am using windows 11).  Other ifort projects use modules, and they compile cleanly after the upgrade.  I am using the same .vfproj files in 2023.1 as in 2021.2.

For error 7002, I added the folder in which the compiled .mod files are generated during the same compilation.  Can someone help me make sense of what's going on?

Error codeMessage
5270Internal Compiler Error
5585A statement that might result in the deallocation of a polymorphic entity is not permitted in a pure procedure.
6158The structure-name is invalid or is missing.   
6223A specification expression is invalid.   
6279A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association.   
6284There is no matching specific function for this generic function reference.   
6325An integer data type is required in this context.   
6341A logical data type is required in this context.   
6361An array-valued argument is required in this context.   
6362The data types of the argument(s) are invalid.   
6402prPromoteSym 
6404This name does not have a type, and must have an explicit type.   
6406Conflicting attributes or multiple declaration of name.   
6410This name has not been declared as an array or a function.   
6457This derived type name has not been declared.   
6460This is not a component name that is defined in the encompassing structure.   
6514Substring or array slice notation requires CHARACTER type or array.   
6530The array spec for this component must be of explicit shape and each bound must be an initialization expression.   
6535This variable or component must be of a derived or structure type.   
6553A function reference is invoking a subroutine subprogram.   
6580Name in only-list does not exist or is not accessible.   
6632Keyword arguments are invalid without an explicit interface.   
6678When the target is an expression it must deliver a pointer result.   
6724An allocate/deallocate object must have the ALLOCATABLE or POINTER attribute.   
6784The number of actual arguments cannot be greater than the number of dummy arguments.   
6793The POINTER attribute is required.   
6795The target must be of the same type and kind type parameters as the pointer.   
6796The variable must have the TARGET attribute or be a subobject of an object with the TARGET attribute, or it must have the POINTER attribute.   
6802The argument to the PRESENT intrinsic function shall be the name of an optional dummy argument of the procedure in which the PRESENT function reference appears.   
6830The argument of the ALLOCATED intrinsic cannot be a constant or an expression.   
6837The leftmost part-ref in a data-ref can not be a function reference.   
6866Dotted string is neither a defined operator nor a structure component.   
7002Error in opening the compiled module file.  Check INCLUDE paths.   
7021Name is invalid in this context.   
8284If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   
8304In an intrinsic assignment statement, variable shall not be a non-allocatable polymorphic.   
8469This derived type component is not a procedure and cannot be called.   
9022The argument to C_LOC must be a variable with the POINTER or TARGET attribute.   
0 Kudos
5 Replies
Steve_Lionel
Honored Contributor III
1,449 Views

My guess is that nearly all of them are caused by the first one - Internal Compiler Error. This means that one of your sources simply failed to compile, and if it was a module source (likely), that triggered a cascade of other errors.

If you can attach the source to that one file, any files it requires, and the command line used, the problem can be investigated. But before that, update to 2024.2 and try again.

John_L_10
New Contributor I
1,340 Views

Thank you, Steve.  Updating to 2024.2 resolved error 5270 - Internal Compiler Error.  The other errors remain.

My code is proprietary, so I cannot share it here.

 

Something changed in ifort after 2021.2.  So far I have not figured out what setting will resolve this problem.

0 Kudos
andrew_4619
Honored Contributor III
1,319 Views

Well many of the other error messages are errors in your code where is does not conform to standard. You could set some compiler options to allow certain non-standard behaviour (old Intel extensions)  and you could disable some checks which might get you over the line but if the code has any value and future you should fix it.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,312 Views

Check your dependencies. In particular, the module creation (order) dependencies. Fix them first.

Delete all your .mod files (make sure you delete the .mod files in other paths that might be found and used)

Make a test project that contains a procedure that USE(s) a/the top level module, and set for its dependency, the project that builds the top level module (which should build all its dependency modules).

 

If a module isn't found, check your dependencies. Also check for circular references of modules, and fix.

Note, if an old/bad module is found, the compiler will .NOT report missing module, Instead, it will use it and you will see errors like you posted.

 

Once, the test project works, try your normal build.

 

Also, assure that your code has "implicit none"

 

Many of the errors are indicative of missing type declarations.

 

Jim Dempsey

Steve_Lionel
Honored Contributor III
1,274 Views

It is extremely unlikely that any setting will affect this. However, without even seeing the build log, much less the sources, that's as far as I can go.  It is possible, as Jim suggests, that an error in your code is now being detected and that is cascading into other errors. Focus on the first source that fails to compile and identify what that problem is - ignore the others for now.

0 Kudos
Reply