<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Notes: RA scaled back due to excessive number of temporaries in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298186#M156783</link>
    <description>&lt;P&gt;Thanks for your suggestions!&lt;/P&gt;
&lt;P&gt;I tried to compile with ipo disabled (/Qipo-), but the problem still remains.&lt;/P&gt;
&lt;P&gt;Also adding: /Qopt-zmm-usage:high did not help.&lt;/P&gt;
&lt;P&gt;The "note" appears in the cg section (Report from: Code generation optimizations [cg]) and not in the ipo section of the report, so I am not sure if it has something to do with ipo.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jul 2021 15:28:36 GMT</pubDate>
    <dc:creator>kinni</dc:creator>
    <dc:date>2021-07-13T15:28:36Z</dc:date>
    <item>
      <title>Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298143#M156775</link>
      <description>&lt;P&gt;I have the following problem:&lt;/P&gt;
&lt;P&gt;Platform: Linux / Windows&lt;/P&gt;
&lt;P&gt;Compiler version: Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.3.311 Build 20201010_000000&lt;/P&gt;
&lt;P&gt;as well as earlier versions.&lt;/P&gt;
&lt;P&gt;I compile it as follows (one of these, problem remains the same):&lt;/P&gt;
&lt;P&gt;ifort /Qip /O3 /Qprec-div /Qprec /QaxCORE-AVX512 /Qopenmp /Qopt-report tmp.for&lt;/P&gt;
&lt;P&gt;ifort /O3 /Qip /Qprec-div /Qprec /QxHost /Qopenmp /Qopt-report tmp.for&lt;/P&gt;
&lt;P&gt;ifort -ipo -O3 -no-prec-div -fp-model fast=2 -xHost -qopenmp -qopenmp-link=static tmp.for&lt;/P&gt;
&lt;P&gt;ifort -ipo -O3 -prec-div -mp1 -xHost -qopenmp -qopenmp-link=static tmp.for&lt;/P&gt;
&lt;P&gt;ifort -ipo -O3 -prec-div -mp1 -axCORE-AVX512 -qopenmp -qopenmp-link=static -qopt-report tmp.for&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As the program grows up, after some time I get the following additional note at the end of *.optrpt file and the program slows down for about 40%.&lt;/P&gt;
&lt;P&gt;The program is pretty large and has got many OMP Loops inside of it.&lt;/P&gt;
&lt;P&gt;(Program contains 66 INCLUDE commands, including diverse routines.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;C:\tmp2\tmp.for(16,7):remark #34051: REGISTER ALLOCATION : [MAIN__.A] C:\tmp2\tmp.for:16&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;Hardware registers&lt;BR /&gt;Reserved : 2[ rsp rip]&lt;BR /&gt;Available : 39[ rax rdx rcx rbx rbp rsi rdi r8-r15 mm0-mm7 zmm0-zmm15]&lt;BR /&gt;Callee-save : 18[ rbx rbp rsi rdi r12-r15 xmm6-xmm15]&lt;BR /&gt;Assigned : 31[ rax rdx rcx rbx rbp rsi rdi r8-r15 zmm0-zmm15]&lt;BR /&gt;&lt;BR /&gt;Routine temporaries&lt;BR /&gt;Total : 30410&lt;BR /&gt;Global : 7699&lt;BR /&gt;Local : 22711&lt;BR /&gt;Regenerable : 7213&lt;BR /&gt;Spilled : 5865&lt;BR /&gt;&lt;BR /&gt;Routine stack&lt;BR /&gt;Variables : 10081 bytes*&lt;BR /&gt;Reads : 807 [8.57e-03 ~ 0.0%]&lt;BR /&gt;Writes : 1903 [6.77e-01 ~ 0.7%]&lt;BR /&gt;Spills : 52928 bytes*&lt;BR /&gt;Reads : 10808 [2.89e+01 ~ 28.9%]&lt;BR /&gt;Writes : 7700 [1.32e+01 ~ 13.2%]&lt;BR /&gt;&lt;BR /&gt;Notes&lt;BR /&gt;RA scaled back due to excessive number of temporaries&lt;/P&gt;
&lt;P&gt;*Non-overlapping variables and spills may share stack space,&lt;BR /&gt;so the total stack size might be less than this.&lt;BR /&gt;-------------&lt;BR /&gt;My comments:&lt;BR /&gt;I think this note causes the problem and makes the code slows down:&lt;/P&gt;
&lt;P&gt;"Notes&lt;BR /&gt;RA scaled back due to excessive number of temporaries"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tmp.for&lt;BR /&gt;...&lt;BR /&gt;(16) USE omp_lib&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anybody know what does it mean and how to overcome this problem?&lt;/P&gt;
&lt;P&gt;Thanks for helping.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 12:39:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298143#M156775</guid>
      <dc:creator>kinni</dc:creator>
      <dc:date>2021-07-13T12:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298153#M156778</link>
      <description>&lt;P&gt;For your AVX512 builds, you might try adding: /Qopt-zmm-usage:high&lt;/P&gt;
&lt;P&gt;Also, register pressure can (may) be reduced by NOT inlining everything (either explicitly or implicitly via IPO).&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 13:34:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298153#M156778</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-07-13T13:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298186#M156783</link>
      <description>&lt;P&gt;Thanks for your suggestions!&lt;/P&gt;
&lt;P&gt;I tried to compile with ipo disabled (/Qipo-), but the problem still remains.&lt;/P&gt;
&lt;P&gt;Also adding: /Qopt-zmm-usage:high did not help.&lt;/P&gt;
&lt;P&gt;The "note" appears in the cg section (Report from: Code generation optimizations [cg]) and not in the ipo section of the report, so I am not sure if it has something to do with ipo.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 15:28:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298186#M156783</guid>
      <dc:creator>kinni</dc:creator>
      <dc:date>2021-07-13T15:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298281#M156789</link>
      <description>&lt;P&gt;If your procedure is very long, and if it contains loops in different sections you can localize the "temporary" variables through the use of BLOCK/ END BLOCK encapsulating the loop(s) and declare the "temporaries" within the BLOCK.&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;subroutine foo(...)
... ! data
... ! code
BLOCK
    REAL :: SomeTemporary ! known only inside this block
    SomeTemporary = 0.0
    DO i=1,n
        ...
        SomeTemporary = SomeTemporary + Expression
        ...
    END DO
    NonBlockVariable = SomeTemporary
END BLOCK
    ... ! more code with additional blocks
end subroutine&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would help if you can share the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 20:55:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298281#M156789</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-07-13T20:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298471#M156803</link>
      <description>&lt;P&gt;Thanks for your help!&lt;/P&gt;
&lt;P&gt;I'll try that.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 09:48:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298471#M156803</guid>
      <dc:creator>kinni</dc:creator>
      <dc:date>2021-07-14T09:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298496#M156805</link>
      <description>&lt;P&gt;Please report back if this helps (or doesn't help) as this will aid others with similar concerns.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 11:54:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298496#M156805</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-07-14T11:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298826#M156813</link>
      <description>&lt;P&gt;Now I have tried different compiler options (/O2, /O3, /fast,..., /QxHost, ... ) but nothing helps.&lt;/P&gt;
&lt;P&gt;I do not have any subroutines nor Blocks, everything is placed in one big code (using include).&lt;/P&gt;
&lt;P&gt;I do not have temporary arrays.&lt;/P&gt;
&lt;P&gt;If I exclude OpenMP, than I get the following message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Notes&lt;BR /&gt;RA scaled back due to excessive number of interferences"&lt;/P&gt;
&lt;P&gt;(Compiled with: ifort /O1 /QaxCORE-AVX2 /Qoverride-limits /Qopt-zmm-usage:high /Qopt-report tmp.for)&lt;/P&gt;
&lt;P&gt;So I thing the problem also does not have to deal only with temporaries?!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 13:39:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298826#M156813</guid>
      <dc:creator>kinni</dc:creator>
      <dc:date>2021-07-15T13:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298827#M156814</link>
      <description>&lt;P&gt;By the way, what does it mean:&lt;/P&gt;
&lt;P&gt;"RA scaled back due to ..."&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 13:43:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298827#M156814</guid>
      <dc:creator>kinni</dc:creator>
      <dc:date>2021-07-15T13:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298837#M156816</link>
      <description>&lt;P&gt;zmm usage is only available when using AVX512. AVX512 has double the registers of AVX2 (and earlier).&lt;/P&gt;
&lt;P&gt;I suspect that when using OpenMP that each parallel region constructs what amounts to a separate procedure whereby the PRIVATE variables are localize to the procedure... , .AND. where the compiler optimization focus is constrained to the parallel region. IOW register usage does not span into, nor out of, the parallel region.&lt;/P&gt;
&lt;P&gt;For your non-OpenMP configuration, you might see a similar effect (benefit) by placing the loop(s) that can be parallelized (but now run serial) into CONTAINS subroutines. You also may want to place/duplicate the variables that may benefit from being registerized in the contained procedures (loop control variables, temporarries, etc...).&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 14:07:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1298837#M156816</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-07-15T14:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1299108#M156832</link>
      <description>&lt;P&gt;Thanks for your comments, but I really did not get it, what do you mean and what should I do to overcome the problem?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 07:49:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1299108#M156832</guid>
      <dc:creator>kinni</dc:creator>
      <dc:date>2021-07-16T07:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1299182#M156839</link>
      <description>&lt;P&gt;RA could be considered to mean Register Assignment (or Register Allocation), though the author of the annotation may have something other in mind. There is a limited number of general purpose registers (8/16/32/64-bit) used for integers or addresses and SIMD registers (8/16/32 depending on architecture) used for floating point scalars and/or SIMD vectors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you (or some auto code generator) writes your code as a very large number of statements, the working variables are declared (possibly implicitly) once at procedure entry point. The compiler optimization code then needs to determine if possible which variables, if any, will produce better performing code if that/those variables are registerized (GP and SIMD). The problem with very long and complicated code sections is you have too many "good" candidates to choose from as to which gets selected to be registerized. By using BLOCKs, contained procedures, external procedures (and/or parallel regions), you reduce the scope and lifetime of the local variables, this in turn reduces the number of potential candidates for use in registers (at the expense of some overhead for the call or equivilent of call in the case of OpenMP).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, if you show the code, there may be something entirely different from (lack of) register optimization that is at the root of your performance issue.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 13:19:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1299182#M156839</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-07-16T13:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1299780#M156886</link>
      <description>&lt;P&gt;Unfortunately I can not share the code accross internet, so I'll try to describe how it works as close as possible.&lt;BR /&gt;The code is also pretty large (approx. 10000 lines).&lt;/P&gt;
&lt;P&gt;The code is sequential, but&lt;BR /&gt;only DO Loops are parallelized with "!$OMP PARALLEL DO " (see ROUTINEs below)&lt;BR /&gt;There are no arrays inside the private statement!&lt;/P&gt;
&lt;P&gt;The note "RA scaled back ..." appears no matter what change do I take. For example&lt;BR /&gt;if I put some additional code lines inside a do loop, or just changing input &lt;BR /&gt;of some data at the beginning (Input*.for) or some output data at the end (Output.for).&lt;/P&gt;
&lt;P&gt;For me it seems the problem could be really with registers as you described. &lt;BR /&gt;But how to organize code in Blocks as you suggested?&lt;BR /&gt;---------------------------------------------&lt;/P&gt;
&lt;P&gt;Here are some details of the code, how it looks like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;USE omp_lib&lt;/P&gt;
&lt;P&gt;INCLUDE 'Parameters.for' &amp;nbsp; &amp;nbsp;&amp;nbsp; !Set some parameters and define arrays as allocatable&lt;BR /&gt;INCLUDE 'Input1.for' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !Read in some input parameters needed to allocate memory&lt;/P&gt;
&lt;P&gt;INCLUDE 'Allocate_mem.for' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! Allocate memory&lt;/P&gt;
&lt;P&gt;INCLUDE 'Input2.for' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; ! Read in input parameters &amp;amp; variables&lt;BR /&gt;&lt;BR /&gt;INCLUDE 'Setup.for' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! Set up variables &amp;amp; arrays &amp;amp; Initialise data&lt;/P&gt;
&lt;P&gt;!$OMP PARALLEL&lt;BR /&gt;nthreads = OMP_GET_NUM_THREADS()&lt;BR /&gt;!$OMP END PARALLEL&lt;/P&gt;
&lt;P&gt;INCLUDE 'Continue_run.for' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; ! Reads in data from previous run if necces.&lt;BR /&gt;&lt;BR /&gt;c*************************************************************&lt;/P&gt;
&lt;P&gt;c BEGINN CYCLEs&lt;/P&gt;
&lt;P&gt;call cpu_time(t1)&lt;BR /&gt;call system_clock(count_rate=iclock_rate) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; !Find the time rate&lt;BR /&gt;call system_clock(count=iclock_start)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !Start Timer&lt;/P&gt;
&lt;P&gt;cycle = 0 &lt;BR /&gt;100 cycle = cycle + 1 &lt;BR /&gt;&lt;BR /&gt;INCLUDE 'Routine1.for' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! Routine1&lt;BR /&gt;INCLUDE 'Routine2.for' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ! Routine2&lt;BR /&gt;...&lt;/P&gt;
&lt;P&gt;INCLUDE 'Routine20.for' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! Routine20&lt;/P&gt;
&lt;P&gt;if ( cycle .lt. cycle_max ) goto 100&lt;/P&gt;
&lt;P&gt;c END CYCLEs&lt;BR /&gt;c*************************************************************&lt;BR /&gt;&lt;BR /&gt;call cpu_time(t2)&lt;BR /&gt;print *, "CPU time(seconds): ", t2 - t1&lt;/P&gt;
&lt;P&gt;call system_clock(count=iclock_stop) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; !End Timer&lt;BR /&gt;s_time = real( iclock_stop - iclock_start ) / real(iclock_rate)&lt;BR /&gt;print *, "system_clock time: ", s_time&lt;/P&gt;
&lt;P&gt;INCLUDE 'Output.for' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; ! Output data&lt;BR /&gt;c-------------------------------------------------------&lt;/P&gt;
&lt;P&gt;END&lt;BR /&gt;c===================================&lt;/P&gt;
&lt;P&gt;General structure of the ROUTINEs:&lt;/P&gt;
&lt;P&gt;is = 1&lt;BR /&gt;ie = ijmax1&lt;BR /&gt;&lt;BR /&gt;data_1 = 9.81&lt;/P&gt;
&lt;P&gt;!$OMP PARALLEL DO &lt;BR /&gt;!$OMP+ DEFAULT (SHARED) &lt;/P&gt;
&lt;P&gt;!$OMP+ PRIVATE(ll,I,IP,IJ,IPJ,...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! there are no arrays inside private&lt;BR /&gt;!$OMP+ ,DY, DX, FLX, coef, ...&lt;BR /&gt;!$OMP+ ,...&lt;BR /&gt;!$OMP+ ,...&lt;BR /&gt;!$OMP+ ,p1, p2, p3 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do ll = is, ie&lt;BR /&gt;ij = Nodes(ll)&lt;BR /&gt;Q(ij) = 0.&lt;BR /&gt;coef = data_1 * array1(ij)&lt;BR /&gt;fi_1(ij) = coef * array2(ij)&lt;BR /&gt;fi_2(ij) = coef * array3(ij)&lt;BR /&gt;enddo&lt;/P&gt;
&lt;P&gt;!$OMP END PARALLEL DO&lt;BR /&gt;c----------&lt;BR /&gt;is = 1&lt;BR /&gt;ie = ijmax2&lt;BR /&gt;&lt;BR /&gt;p1 = 20.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;!$OMP PARALLEL DO &lt;BR /&gt;!$OMP+ DEFAULT (SHARED) &lt;BR /&gt;!$OMP+ PRIVATE(ll,I,IP,IJ,IPJ,... ! there are no arrays inside private&lt;BR /&gt;!$OMP+ ,DY, DX, FLX, coef, ...&lt;BR /&gt;!$OMP+ ,...&lt;BR /&gt;!$OMP+ ,...&lt;BR /&gt;!$OMP+ ,p1, p2, p3 )&lt;/P&gt;
&lt;P&gt;DO ll = is, ie&lt;BR /&gt;&lt;BR /&gt;ij = Pointer(ll) &lt;BR /&gt;&lt;BR /&gt;I = array(1,ij)&lt;BR /&gt;IP = array(2,ij)&lt;/P&gt;
&lt;P&gt;DX = x(ip) - x(i)&lt;BR /&gt;DY = y(ip) - y(i)&lt;BR /&gt;&lt;BR /&gt;coef = sqrt ( dx**2 + dy**2 )&lt;BR /&gt;&lt;BR /&gt;----&lt;BR /&gt;&lt;BR /&gt;FLX = ...&lt;/P&gt;
&lt;P&gt;Q(i) = Q(i) - FLX * coef * p1&lt;BR /&gt;Q(ip) = Q(ip) + FLX * coef * p1&lt;/P&gt;
&lt;P&gt;enddo&lt;BR /&gt;&lt;BR /&gt;!$OMP END PARALLEL DO&lt;/P&gt;
&lt;P&gt;---------------------------------------&lt;/P&gt;
&lt;P&gt;I hope this will help.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 18:08:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1299780#M156886</guid>
      <dc:creator>kinni</dc:creator>
      <dc:date>2021-07-19T18:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1299981#M156897</link>
      <description>&lt;P&gt;Since this seems to be a concern of your, I will assume you will be willing to do a little bit of cleanup work...&lt;/P&gt;
&lt;P&gt;1) place your parameters and common variables by your INCLUDE 'xxx.for' source files into a source file as a module, preferably .f90, and replace the INCLUDE 'Parameters.for' (and INCLUDE 'CommonVariables.for') with USE YourNameOfChoice&lt;/P&gt;
&lt;P&gt;2) Replace the inline code introduced using INCLUDE 'whatever.for' with a CALL whatever(). Note, these will be enclosed with SUBROUTINE whatever/END SUBROUTIN and contain USE YourNameOfChoice to obtain the common parameters and variables. "whatever" could be Routine1, Routine2, ... as the case may be.&lt;/P&gt;
&lt;P&gt;Note, by doing this you have partitioned one large 10000-ish line single program containing 26-some INCLUDE-ed sources into a relatively small PROGRAM plus 26-some relatively small subroutines. And this in turn will aid the compiler in optimization (of register usage).&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 12:26:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1299981#M156897</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-07-20T12:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Notes: RA scaled back due to excessive number of temporaries</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1302096#M156957</link>
      <description>&lt;P&gt;OK, thanks! I'll splitt up the program into several subroutines and report if this helped.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 06:04:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Notes-RA-scaled-back-due-to-excessive-number-of-temporaries/m-p/1302096#M156957</guid>
      <dc:creator>kinni</dc:creator>
      <dc:date>2021-07-29T06:04:31Z</dc:date>
    </item>
  </channel>
</rss>

