Can't make sense of runtime warnings

Can't make sense of runtime warnings

Izaak Beekman's picture

I compiled a code with quite a few flags, among them the -warn all and -check all flags. Also with -prof-gen (to generate code coverage information) -g, -traceback, and a few others. At run time I see a lot of the following messages:

forrtl: warning (402): fort: (1): In call to I/O Read routine, an array temporary was created for argument #2
forrtl: warning (402): fort: (1): In call to I/O Write routine, an array temporary was created for argument #3

Do you think these warnings are generated because of the -warn and -check flags?

Is there a way to get line number information in the source file? It seems 402 is a warning number not a source line.

What is meant by argument #n? If I have a read statement: read(*,*) a, b, c is argument, say, #2 b? Is there a reason why it never shows argument #1 in the warnings?

Thanks,
-Z

-Zaak
12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Steve Lionel (Intel)'s picture

This is -check arg_temp_created. I have never seen this mention I/O routines before, but... If you add -traceback you should get line numbers.

Steve
Izaak Beekman's picture

I did pass -traceback when compiling and linking! Possible bug?

Thanks for looking at this.

-Zaak
Steve Lionel (Intel)'s picture

Can you provide a test case?

Steve
Steve Lionel (Intel)'s picture

I just tried an example and could get it to show argument #1 - at least for a WRITE. It corresponded to the variable in the I/O list. I did not get a traceback either - I will ask about that. Issue ID is DPD200158137 - this is a feature request.

Here was my test case:

integer, target :: array(100)
integer, pointer :: p(:)

array = 3
p => array(1:99:2)
write (1,*) p
end

Steve
Brett Benowitz's picture

Hi - I know this is an old thread but I just got the same warning, without an traceback either.   Has the issue been resolved at all?  Not sure how to look up that Issue ID#.

Thanks!

Steve Lionel (Intel)'s picture

You can't look up that issue ID. We haven't yet released a version that gives a traceback for that run-time warning.

Steve
jimdempseyatthecove's picture

Add option

-check:noarg_temp_created

to disable this warning message (which was added when you enabled all warnings).

Jim Dempsey

www.quickthreadprogramming.com
Mark B.'s picture

I just installed ifort version 13.1.1 on my Linux Cluster and get this on runtime no matter what compiler options I use (-nocheck, -check noarg_temp_created, -w, etc) for compiling the main program or module containing the function:

function crs8(a,b) result(c)
  real(8), intent(in) :: a(3),b(3)
  real(8) :: c(3)
  c(1)= a(2)*b(3)-a(3)*b(2)
  c(2)=-a(1)*b(3)+a(3)*b(1)
  c(3)= a(1)*b(2)-a(2)*b(1)
end function crs8

forrtl: warning (402): fort: (1): In call to VECTOR^CRS8, an array temporary was created for argument #1

forrtl: warning (402): fort: (1): In call to VECTOR^CRS8, an array temporary was created for argument #2

This is extremely annoying.  What do I need to be doing differently?

Annalee (Intel)'s picture

You get this warning when compiling with "-check noarg_temp_created" or -nocheck? If so this is likely a bug. Could you attach a program which reproduces the problem? This will help us investigate the issue.

IanH's picture

Separate to the warning being triggered when not requested - you may find that making the dummy arguments assumed shape (:) rather than explicit shape avoids the need for temporaries.

Steve Lionel (Intel)'s picture

Note that you have to disable (or not enable) this option when compiling the source that calls the function. It isn't looked at when you compile the called function itself.

Steve

Login to leave a comment.