PGF90-S0087

Hi,

not sure what’s going on when i try to compile.

PGF90-S-0087-Non-constant expression where constant expression required (fprime.f: 313)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (fprime.f: 313)
0 inform, 0 warnings, 2 severes, 0 fatal for sigma
PGF90-S-0087-Non-constant expression where constant expression required (fprime.f: 347)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (fprime.f: 347)
0 inform, 0 warnings, 2 severes, 0 fatal for gauss
PGF90-S-0087-Non-constant expression where constant expression required (fprime.f: 477)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (fprime.f: 477)
0 inform, 0 warnings, 2 severes, 0 fatal for aknint
general.f:
PGF90-S-0087-Non-constant expression where constant expression required (general.f: 993)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (general.f: 993)
0 inform, 0 warnings, 2 severes, 0 fatal for extract_v0bdcf
PGF90-S-0087-Non-constant expression where constant expression required (general.f: 1025)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (general.f: 1025)
0 inform, 0 warnings, 2 severes, 0 fatal for extract_epsii
PGF90-S-0087-Non-constant expression where constant expression required (general.f: 2856)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (general.f: 2856)
0 inform, 0 warnings, 2 severes, 0 fatal for vnorme
PGF90-S-0087-Non-constant expression where constant expression required (general.f: 5108)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (general.f: 5108)
0 inform, 0 warnings, 2 severes, 0 fatal for fpp_cal
PGF90-S-0087-Non-constant expression where constant expression required (general.f: 5865)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (general.f: 5865)
0 inform, 0 warnings, 2 severes, 0 fatal for detmat
PGF90-S-0087-Non-constant expression where constant expression required (general.f: 10730)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (general.f: 10730)
0 inform, 0 warnings, 2 severes, 0 fatal for f_integr
PGF90-S-0087-Non-constant expression where constant expression required (general.f: 10792)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (general.f: 10792)
0 inform, 0 warnings, 2 severes, 0 fatal for f_integr3
PGF90-S-0087-Non-constant expression where constant expression required (general.f: 10863)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (general.f: 10863)
0 inform, 0 warnings, 2 severes, 0 fatal for finterp2


that’s all in the first error …

real(kind=db) function sigma(iftype, x)


what’s the problem?

real(kind=db) function sigma(iftype, x)

I suppose my first question is how is db defined in your program?

Hi Jason,

You most likely don’t have db defined or it’s not defined as a constant. For example:

% cat test.F
        program testme
#ifdef GOOD
         integer, parameter :: db=4
#endif
         real(kind=db) function sigma(iftype, x)
        end program testme
% pgf90 -c test.F
PGF90-S-0087-Non-constant expression where constant expression required (test.F: 7)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type  (test.F: 7)
  0 inform,   0 warnings,   2 severes, 0 fatal for testme
% pgf90 -c test.F -DGOOD
%

Hope this helps,
Mat

I am also facing an issue with compilation of the code ‘that was successfully compiled with gfortran (F90)’

However, it failed to compile with ‘pgfortran’

The offending statement is below -

PARAMETER(MAXRetIter= 40,

  •      MAXTStates= MAXRetIter*MAXTotstates,
    
  •      MAXUStates= 2*MAXRetIter*MAXTotStates+MaxRetIter*MaxRetIter
    
  •                  +10*MaxRetIter+1)
    

There are a number of statements like the above in our age old (12 years) program and it is a demanding task if we have to do something quite complicated to resolve this.

Kindly provide your inputs on this issue.

Thank You
Jamshid

Hi Jamshid,

My best guess is that “MAXTotstates” isn’t a constant value. Compling your code as shown above then it gets an error with both PGI and GNU. However, compiles successfully if I add “MATTotstates” as a parameter.

% cat test.f
         PARAMETER(MAXRetIter= 40,
     +  MAXTStates= MAXRetIter*MAXTotstates,
     +  MAXUStates= 2*MAXRetIter*MAXTotStates+MaxRetIter*MaxRetIter
     +  +10*MaxRetIter+1)
        end
% pgfortran -c test.f
PGF90-S-0087-Non-constant expression where constant expression required (test.f: 2)
PGF90-S-0087-Non-constant expression where constant expression required (test.f: 2)
  0 inform,   0 warnings,   2 severes, 0 fatal for MAIN
% gfortran -c test.f
 In file test.f:3

     +  MAXTStates= MAXRetIter*MAXTotstates,
                                          1
Error: Parameter 'maxtotstates' at (1) has not been declared or is a variable, which does not reduce to a constant expression



% cat test.f
        PARAMETER(MAXTotstates=12)
        PARAMETER(MAXRetIter= 40,
     +  MAXTStates= MAXRetIter*MAXTotstates,
     +  MAXUStates= 2*MAXRetIter*MAXTotStates+MaxRetIter*MaxRetIter
     +  +10*MaxRetIter+1)
        end
% pgfortran -c test.f
% gfortran -c test.f