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

Unrecognized intrinsic functions

Aaron_S_1
Beginner
5,518 Views

I've encountered strange issues in the past when trying to compile source that has an intrinsic function. I get "error#6410: This name has not been declared as an array or a function. [MIN]." when trying to compile the following:

subroutine find_min_range( min_range, km_to_m, pos_a, pos_b)

   real(8), intent(in out) :: min_range 
   real(8), intent(in    ) :: km_to_m
   real(8), intent(in    ) :: pos_a(3)
   real(8), intent(in    ) :: pos_b(3)

   real(8) :: a_to_b(3), range

   a_to_b    = pos_b - pos_a
   range     = norm2( a_to_b )
   range     = range * km_to_m
   min_range = min( range, min_range)

   return

end subroutine find_min_range

I've seen this same problem before with the functions size, and max. In those cases I had to pass in the size of the array and use an if statement to accomplish what "max()" does. Am I doing something wrong? I've checked through the entire solution to be sure I haven't redefined the min function, and min is not a variable. The source file compiled without any issue, I added a really simple if statement in the same file but another routine, went to recompile it, and now this source file will no longer compile. This routine also hasn't been changed in over 4 years. Unfortunately I cannot post any more code than this. Thanks for any advice in advance.

0 Kudos
22 Replies
Steven_L_Intel1
Employee
437 Views

Yes, but we've been talking about F77 style code. As you may be aware, I'm not in favor of INTERFACE blocks for Fortran routines - use modules instead. But the situation here is in rebuilding old F77 code that may have functions of the same names as new intrinsics.

0 Kudos
Steven_L_Intel1
Employee
437 Views

The "disable implicit interface" feature I mentioned was indeed approved for Fortran 2015. I was thinking of another proposal that would allow you to change the default kind of integer and real which did not pass.

The new syntax is IMPLICIT NONE(EXTERNAL). (You can also say IMPLICIT NONE(TYPE), which is the same as IMPLICIT NONE, or IMPLICIT NONE (EXTERNAL,TYPE) if you want to disable both.

0 Kudos
Reply