PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Internal compiler error with namelist
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Senya



Joined: 20 Jun 2011
Posts: 58

PostPosted: Thu Jun 06, 2013 6:53 am    Post subject: Internal compiler error with namelist Reply with quote

I'm using PGI Visual Fortran 12.5 on windows and i've faced with following problem. Compiling single source file with pgf95 produces internal compiler error.
Source:
Code:

module SYS
  save
  allocatable :: MINS(:,:),MBND(:,:)
  Integer :: IBND1L,IBND1R,IBND2L,IBND2U
  Integer :: IGEOME
  Real :: DX1,X1MIN,X1MAX,DX2,X2MIN,X2MAX
  Integer :: KK1,KK2,NREG,KKS,KKD,NMK,NSAZ,KX1,KX2&
            ,KS1,KS2,KV1,KV2,NN1,NN2,NX1,NX2,NS1,NS2,MM1,MM2&
            ,MX1,MX2,MS1,MS2,LL1,LL2,NIN,NSG,NPY,NSA,&
        NBEXT,NEEXT,NCEXT,NCEXP,NWV,LNFFT,NBACK     
  Integer :: KKB1,KKB2,NNB1,NNB2,MMB1,MMB2,NN1M1,NN1M2 &
           ,NN2M1,NN2M2,MM1M1,MM1M2,MM2M1,MM2M2,KK1M1,KK1M2 &
           ,KK1S,KK1SO2,KK1D,KK1D02,KK2M1,KK2M2,KK12,KK1B &
           ,KK2B,KK1E,KK2E,KK1C,KK2C,LL1M1,LL1M2,LL2M1,LL2M2
  Real :: PI,PIO2,PITW
  Real :: VLIGHT
  Real :: TT,DT
  Integer :: IT,ITBMD2
  Real :: FBACK0,FBACK1,FBACK2,FBACK3
  Logical :: LNBACK, LCSUM
  Integer :: IUNIT,KUNIT,IUTTY
  logical :: LRESTR,LDUMPS,LVLTST,LFLTST,LFLVLS
  Integer :: IRESTR,IDUMPS,IVLTST,IFLTST,IFLVLS,NDUMPS
  Logical :: TRIAD0,TRIAD1,TRIAD2 &
                ,LCURT1,LCURT2,LCURT3,LSMTH(4)
  Logical :: LPRIOR
  Real :: PRIORI
  Logical :: LLOGDP,LOGADP
  Integer :: ILOGSZ,JLOGDP
  logical :: LABLNW

  logical :: MFLDIN,MFLDAN,MFLDPR,MFLDSM,MFLDDI,MFLDEN,&
            MFLDPY,MFLDJE,MVLSIN,MVLSNE,MVLSOR,MVLSDI,&
            MVLSEN,MVLSIP,MVLSEQ
  integer :: IVBIG,NSUB,IORMAX

  integer ::MINNER,MIDDLE,MOUTER,ITMAX

  logical :: LMASK0,LMASK1,LMASK2,LSIGM0,LSIGM1,LSIGM2,LSIGME,LINSUL
     
   NAMELIST/NLMAIN/TT,DT,IT &
            ,DX1,X1MIN,DX2,X2MIN &
            ,IGEOME,VLIGHT &
            ,LFLTST,LVLTST,LFLVLS &
            ,TRIAD0,TRIAD1,TRIAD2 &
            ,IBND1L,IBND1R,IBND2L,IBND2U &
            ,LCURT1,LCURT2,LCURT3,LSMTH &
            ,LRESTR,LDUMPS,IRESTR,IDUMPS &
            ,NDUMPS &
            ,LLOGDP,LOGADP,ILOGSZ,JLOGDP &
            ,LPRIOR,PRIORI,LABLNW &
            ,LNBACK,FBACK0,FBACK1,FBACK2,FBACK3
     NAMELIST/NFLVLS/MFLDIN,MFLDAN,MFLDPR,MFLDSM,MFLDDI,MFLDEN,&
                     MFLDPY,MFLDJE,MVLSIN,MVLSNE,MVLSOR,MVLSDI,&
                    MVLSEN,MINNER,MIDDLE,MOUTER,MVLSIP,MVLSEQ,&
                     IVBIG,ITMAX,NSUB,IORMAX
   
   NAMELIST/NFLMSK/LMASK0,LMASK1,LMASK2,LINSUL,LMSK,MBND,MASKS&
                                               ,LINS,MINS,MINSM
end module


That is compiler output.
Quote:

PGF90-S-0000-Internal compiler error. size_of: bad dtype 0 (system.f95: 60)
PGF90-S-0000-Internal compiler error. size_of: bad dtype 0 (system.f95: 60)
PGF90-S-0000-Internal compiler error. size_of: bad dtype 0 (system.f95: 60)
PGF90-S-0000-Internal compiler error. size_of: bad dtype 0 (system.f95: 60)
PGF90-S-0000-Internal compiler error. size_of: bad dtype 0 (system.f95: 60)
PGF90-S-0000-Internal compiler error. size_of: bad dtype 0 (system.f95: 60)
PGF90-S-0000-Internal compiler error. size_of: bad dtype 0 (system.f95: 60)
PGF90-S-0000-Internal compiler error. size_of: bad dtype 0 (system.f95: 60)
0 inform, 0 warnings, 8 severes, 0 fatal for sys


Can you tell me, is this error presents on the last versions of pgf95? Or i've found something new?


Last edited by Senya on Tue Jun 11, 2013 9:34 am; edited 1 time in total
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6215
Location: The Portland Group Inc.

PostPosted: Thu Jun 06, 2013 12:03 pm    Post subject: Reply with quote

Hi Senya,

Quote:
Can you tell me, is this error presents on the last versions of pgf95? Or i've found something new?
There's an error in your code. It's illegal to use allocatables (or other types where the size is not known at compile time) in a NAMELIST statement so you can't have "MINS" or "MBND" as part of the list.

However, the compiler should be catching this error and not giving an ICE. I filed TPR#19396 requesting that we do a better job of catching this error,

- Mat
Back to top
View user's profile
Senya



Joined: 20 Jun 2011
Posts: 58

PostPosted: Thu Jun 06, 2013 11:43 pm    Post subject: Reply with quote

I've used it before, but there was allocate in a one module,and namelist in another. It was working correctly.
Is that was because at the time of calling namelist containing subroutine array was allocated already?
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6215
Location: The Portland Group Inc.

PostPosted: Fri Jun 07, 2013 10:12 am    Post subject: Reply with quote

Quote:
Is that was because at the time of calling namelist containing subroutine array was allocated already?
I'm not sure, but possible. More likely, we accepted the syntax when we shouldn't have and that it happened to work. It's interesting that my Metcalf book explicitly say that allocatables in the variable list of a namelist is disallowed, but I can't find case and verse in the F2003 standard. Let me talk with our language lawyers here and get a ruling.

- Mat
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6215
Location: The Portland Group Inc.

PostPosted: Fri Jun 07, 2013 10:31 am    Post subject: Reply with quote

Ok, it appears that this restriction was from F95, but was loosened in F2003. Not sure why the Metcalf book still lists is as illegal.

Engineering has already fixed the problem and should be available in the 13.7 release. It appears to only be a problem when the namelist is defined in a module. If the namelist is in a subroutine, then it would have worked.

Thanks,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group