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

strange warning with WRITE statement

Brian_Murphy
New Contributor II
915 Views

I'm working on a console window application. The following statement writes three 4x4 matrices, one row at a time. DO JJ=1,4 WRITE(IOUT,'(3(4(G12.5,1X),4X))') & BEAR1%BR(I)%B(ISPD)%K(JJ,1:4), & BEAR1%BR(I)%B(ISPD)%C(JJ,1:4), & BEAR1%BR(I)%B(ISPD)%M(JJ,1:4) END DO This generates warnings in the console window as follows: forrtl: warning (402): fort: (1): In call to I/O Write routine, an array temporary was created for argument #1 The statement works as intended, but what is the warning for? What is argument #1? Pointers are used in the chain of derived types. Could that have something to with it? Brian in Austin, Texas

0 Kudos
5 Replies
Brian_Murphy
New Contributor II
915 Views
Grrr! How do I keep the forum web site from butchering the formatting of my postings?
0 Kudos
mecej4
Honored Contributor III
915 Views

You can ignore the warning(s). If you are curious, see http://software.intel.com/en-us/forums/topic/297425 .

0 Kudos
Brian_Murphy
New Contributor II
915 Views

Thanks.  That explains it.  I think what happened was I had just turned on ALL for run-time error checking.  The WRITE'ing of matrix rows with implied loops evidently leads to the creation of temporary arrays, and thus the warning.

Did the request for

/check:arg_temp_created_except_for_write_statements_that_you_know_are_ok

ever get done?  That was 4 years ago.

0 Kudos
Steven_L_Intel1
Employee
915 Views

Nothing has been changed in this area.

As for inserting code, you can put it between tags as explained in the fourth bullet below the post composition window.

0 Kudos
Brian_Murphy
New Contributor II
915 Views

About the formatting.  I had a post ready to go, and I clicked on the Preview button, and it all got run together in one paragraph.

0 Kudos
Reply