bad predicate internal compiler error

When compiling Molpro with pgi 14.2 (and 14.1) there are many compilation failures. I’ve cut down an example:

      SubRoutine SOFSh1(nShBF,nSkal,nSym,nSD,iSD)
      Implicit Real*8 (A-H,O-Z)

      Integer, Parameter :: iTabMx=15
      integer, parameter :: mxatom=200
      integer, parameter :: maxbfn=4095
      Integer, Parameter :: MaxBfn_Aux=7*MaxBfn
      Integer, Parameter :: MxUnq=MaxBfn+MaxBfn_Aux
      Integer, Parameter :: MxShll=iTabMx*MxAtom
      
      Integer IrrCmp(MxUnq)
      Integer IndS(MxShll)
      Common /Info/ IrrCmp, IndS

      Integer nShBF(0:nSym-1,nSkal),iSD(0:nSD,nSkal)
      Do iSkal = 1, nSkal
         iShell      = iSD(11,iSkal)
         iCmp        = iSD( 2,iSkal)
         Do i=1, iCmp
            Do irp=0, nSym-1
               If (iAnd(IrrCmp(IndS(iShell)+i),2**irp).ne.0) Then
                  nShBF(irp,iSkal) = nShBF(irp,iSkal)+ iSD(3,iSkal)
               End If
            End Do
         End Do
      End Do
      Return
      End

which if compiled gives:

> pgf90 -c -i8 -fastsse test.f
PGF90-F-0000-Internal compiler error. make_cvect_cmp_vili(): bad predicate     312 (test.f: 20)

The bug only occurs when using both -i8 and -fastsse; remove either of those flags and the file will compile.

Can you take a look?

Thanks,

Andy

Thanks Andy. We appreciate you narrowing this down.

It looks like a problem with AVX conditional vectorization, specifically with IrrCmp being used with iAnd. I’ve added a problem report (TPR#19863) and forwarded it to engineering. Hopefully we can get it fixed shortly.

In the meantime, the work arounds are to not compile with -i8, disable vectorization (-Mvect=nosimd), or target a non-AVX platform (-tp=penryn-64)

  • Mat

TPR 19877 - “make_cvect_cmp_vili(): bad predicate” with -Mvect and -i8
has been fixed in the current 14.3 release.

thanks,
dave