Analyzing Guided Auto Parallelism Reports

In this step, you will analyze the results to determine if you want to implement the report recommendations.

The report applies to the following loop in the source code file scalar_dep.f90:

do i = 1, n
   if (a(i) >= 0) then
       t = i
   end if
   if (a(i) > 0) then
       a(i) = t * (1 / (a(i) * a(i)))
   end if
end do

The report recommends the following:

You can add the -parallel option and then run another analysis to see the result.

Note

You will implement the second recommendation in the next step of this tutorial.

In the sample code directory, compile the source code with the following command:

ifort -c -parallel -guide scalar_dep.f90

Find the following in the compiler output.

scalar_dep.f90(66) remark #30523: (PAR) Assign a value to the variable(s)
"t" at the beginning of the body of the loop in line 66. This will allow 
the loop to be parallelized. [VERIFY] Make sure that, in the original 
program, the variable(s) "t" read in any iteration of the loop has been
defined earlier in the same iteration. [ALTERNATIVE] Another way is to 
use "!dir$ parallel private(t)" to parallelize the loop. [VERIFY] The 
same conditions described previously must hold.

scalar_dep.f90(66): remark #30525: (PAR) Insert a "!dir$ loop count 
min(64)" statement right before the loop at line 66 to parallelize the 
loop. [VERIFY] Make sure that the loop has a minimum of 64 iterations.

Note

Your remark and line numbers in the output may be different.

In the next step, you will implement the recommendations.

Previous: Running Guided Auto-parallelization Next: Implementing GAP Recommendations


Submit feedback on this help topic