C/C++ and Fortran

 View Only

Optimize the performance of your code containing loops by using -qassert

By Archive User posted Tue February 25, 2014 02:41 AM


Originally posted by: ChristineLi

If your code contains a large number of loops, you can use option -qassert=minitercnt=n1 and -qassert=maxitercnt=n2 provided in XL Fortran V14.1 to specify the expected minimum and maximum iteration counts of the loops in the program. The minitercnt and maxitercnt values are not required to be accurate since the values only affect performance, never correctness. The values will be provided to the optimizer.


n1 and n2 must be positive integers. If you specify the two suboptions at the same time, the values must follow the rule minitercnt <= itercnt <= maxitercnt. Otherwise, messages are issued to indicate that the values are inconsistent and the inconsistent value is ignored.
You can also use the ASSERT directive which can overrides the -qassert compiler option for the DO loop on which the ASSERT directive is specified.


For detailed information, see -qassert.