CNCALL
Purpose
When the CNCALL directive is placed before a DO loop, you are explicitly declaring to the compiler that no loop-carried dependencies exist within any procedure called from the DO loop.
This directive only takes effect if you specify the -qsmp or -qhot compiler option.
Rules
The first noncomment line (not including
other directives) that is following the CNCALL directive
must be a DO loop. This line cannot be an
infinite DO,
DO
CONCURRENT
, or DO WHILE loop.
The CNCALL directive applies only to the DO loop
that is immediately following the directive and not to any nested DO loops.
When specifying the CNCALL directive, you are explicitly declaring to the compiler that no procedures invoked within the DO loop have any loop-carried dependencies. If the DO loop invokes a procedure, separate iterations of the loop must be able to concurrently call that procedure. The CNCALL directive does not assert that other operations in the loop do not have dependencies, it is only an assertion about procedure references.
A loop-carried dependency occurs when two iterations within a DO loop interfere with one another. See the ASSERT directive for the definition of interference.
Examples
! An example of CNCALL where the procedure invoked has
! no loop-carried dependency but the code within the
! DO loop itself has a loop-carried dependency.
PROGRAM EX3
INTEGER A(100)
!IBM* CNCALL
DO I = 1, N
A(I) = A(I) * FNC3(I)
A(I) = A(I) + A(I-1) ! This has loop-carried dependency
END DO
END PROGRAM EX3
FUNCTION FNC3 (I)
FNC3 = I * I
END FUNCTION FNC3
Related information
- INDEPENDENT
- -qdirective in the XL Fortran Compiler Reference
- -qhot in the XL Fortran Compiler Reference
- -qsmp compiler option in the XL Fortran Compiler Reference
- DO
- Loop parallelization



