I have just updated my FORTRAN compiler and am getting the warning above when I call MKL subroutines. I am including the MKL library automatically using the project properties tab.
I searched online and am unable to find how I can fix this?
Many thanks for the help,
Do you mean just place:
in the code?
If so, it is taking **much longer** to compile now... Any idea / reason why these warnings are popping up now? The code runs fine even with these warnings (as it did before I updated the Fortran compiler).
Also, I found a few instances of getting errors once I did " include 'mkl.fi' " like this one:
error #8284: If 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
Again, to clarify, this code has been running fine, without any of these errors or warnings until today, when
Instead of adding include 'mkl.fi' to your source code, which causes compilation time to increase, you can build a module that provides the interfaces. Do the following steps once, for each target architecture.
c module mkl_m include 'mkl.fi' end module
Regarding the warnings regarding passing a scalar when an array is expected, which result from the recent releases of the compiler doing more checking, you may ignore the warning if the code is working correctly, or change the declaration of the offending argument to make it an array. This problem usually arises when passing a place-holder argument that we know will never be referenced in the called MKL routine. Instead of
real dummy ... call mkl_routine(...,dummy,...)
real dummy(1) ... call mkl_routine(...,dummy,...)
Have you looked at Intel MKL documentation, specifically the section on Interfaces and Libraries:
My guess is that you are compiling from the command line and using /warn (or -warn) with no keywords. There's a new feature of Fortran 2018 called IMPLICIT NONE (EXTERNAL), which, if you specify it, requires that any procedure you call have the EXTERNAL attribute, which you typically get from an explicit interface.
Similarly to how "/warn:declarations" implies IMPLICIT NONE for all compilations, the new "/warn:external" implies IMPLICIT NONE (EXTERNAL). If you want to disable this, change your /warn option either to specify just the options you want, or use "/warn:all,noexternal" or "-warn all,noexternal"