Analyze the output generated by GAP analysis and determine whether or not the specific suggestions are appropriate for the specified source code. For this sample tutorial, GAP generates output for the loop in 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
In this example, the GAP Report generates a recommendation (remark #30761) to add the -parallel option to improve auto-parallelization. Remark #30515 indicates if variable t can be unconditionally assigned, the compiler will be able to vectorize the loop.
GAP REPORT LOG OPENED remark #30761: Add -parallel option if you want the compiler to generate recommendations for improving auto-parallelization. scalar_dep.f90(44): remark #30515: (VECT) Loop at line 44 cannot be vectorized due to conditional assignment(s) into the following variable(s): t. This loop will be vectorized if the variable(s) become unconditionally initialized at the top of every iteration. [VERIFY] Make sure that the value(s) of the variable(s) read in any iteration of the loop must have been written earlier in the same iteration. Number of advice-messages emitted for this compilation session: 1. END OF GAP REPORT LOG
Copyright © 2011, Intel Corporation. All rights reserved.