Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Discussions

Could such a change reduce the elapsed time

dingjun_chencmgl_ca
628 Views

HI, Dear Sir or Madam,

In the report of guide of performance, the following remark often occurred:

Z:\imex\bin\opt64vector\levstr.f(359): remark #30525: (PAR) Insert a "!dir$ loop count min(512)" statement right before the loop at line 359 to parallelize the loop. [VERIFY] Make sure that the loop has a minimum of 512 iterations.

I want to know if such a change (I mean if insert a statemtn  "!dir$ loop count min(512)"  in my source codes) could lead to less elapsed time cost so that the performance of program could be further improved. The following is description fromthe user and refrerence guide of Intel Fortran V14.

I look forward to hearing from you. Thanks in advance.

/*************description from the user manual ***************/

If you determine it is safe to do so, you can add thedirectiveas follows:

subroutine foo (n)

integer, parameter :: N2 = 10000

 real (8) :: A(N2), B(N2) integer :: i

!dir$loopcountmin(128)

 do i =1, n A(i) = B(i) * B(i)

end do

 end subroutine foo

Make sure that theloophas a minimum of 128 iterations.

Verify Make sure that theloophas the minimum number of iterations, as specified in the diagnostic message.

0 Kudos
2 Replies
Steven_L_Intel1
Employee
628 Views

This directive can help the optimizer decide that it is worthwhile to vectorize or parallelize a loop. If you know that the loop will typically have at least 512 iterations, it is useful to add the directive.  But I would recommend running the program under VTune Amplifier XE (free trial available) to see where the program is spending its time, so that you can focus on the parts of the code that matter.

0 Kudos
dingjun_chencmgl_ca
628 Views

Could you share your experience in exploring the highly paralllelism with Intel Fortran compiler options/EnvSettings and OpenMP directives? Thanks.

0 Kudos
Reply