weird (incorrect) compiler output - very minor issue

I have a subroutine with the following code in it. The DO WHILE is at line 134.

DO WHILE ( loop_on )
!
! BEGIN LOOP
! SOLVE THE EQUATIONS
!
DO j = 1, nelem
w(j) = ZERO
wtemp(j) = ZERO
sig_j(j) = ZERO
DO i = 1, nfmaxp2
IF ( CN(i,j)>0 ) wtemp(j) = wtemp(j) + A(i,j)*p(CN(i,j))
ENDDO
w(j) = (wtemp(j)+B(j)p(j))/B(j)
sig_j(j) = q(j)w(j)
ENDDO
!
sig = ZERO
! OVERRELAXED JACOBI CGS
DO j = 1, nelem
sig = sig + sig_j(j)
ENDDO
!
IF ( sig==ZERO ) sig = tol
alpha = rho/sig
DO j = 1, nelem
h(j) = u(j) - alpha
w(j)
u(j) = (u(j)+h(j))alpha
Tn(j) = Tn(j) + u(j)
ENDDO
!
DO j = 1, nelem
w(j) = ZERO
rho_j(j) = ZERO
DO i = 1, nfmaxp2
IF ( CN(i,j)>0 ) w(j) = w(j) + A(i,j)u(CN(i,j))
ENDDO
w(j) = (w(j)+B(j)u(j))/B(j)
r(j) = r(j) - w(j)
rho_j(j) = q(j)r(j)
ENDDO
!
rsum = ZERO
nindex = 0
rho1 = rho
IF ( rho1==ZERO ) rho1 = tol
rho = ZERO
DO j = 1, nelem
sumold = rsum
rsum = MAX(rsum,ABS(u(j)/Tn(j)))
IF ( rsum/=sumold ) nindex = j
rho = rho + rho_j(j)
ENDDO
!
beta = rho/rho1
DO j = 1, nelem
u(j) = r(j) + beta
h(j)
p(j) = u(j) + beta
(beta
p(j)+h(j))
ENDDO
!
IF ( rsum<tol ) loop_on = .FALSE.
!
iter = iter + 1
IF ( iter>1000 ) THEN
WRITE (6,
) ’ Too Many Iterations in CGS’
WRITE (6,
) ’ ABORTING…’
STOP
ENDIF
!
IF ( itero==1 ) first_cycle2 = .FALSE.
ENDDO


Output from 13.3 compiler for this outer loop is
" 134, Loop not vectorized/parallelized: contains call".

Now I actually didn’t expect the compiler to vectorized or parallelize this loop but the reason given (“contains call”) is wrong .


-ralph

Hi Ralph,

It’s probably the WRITE and/or STOP statement, which are calls. MAX and ABS are calls as well, but usually get inlined at higher optimization levels so shouldn’t cause this message.

What happens if you comment out:

IF ( iter>1000 ) THEN
WRITE (6,*) ' Too Many Iterations in CGS'
WRITE (6,*) ' ABORTING...'
STOP
ENDIF
  • Mat

A little clarification in the compiler output could help, e.g.
" 134, Loop not vectorized/parallelized: contains call, e.gl write, stop, subrountine, etc."

Plus I’m using the highest level of optimization you have. I’ll test commenting out the write statement.