pgfortran Compiler Issues

Hi guys, I have some code that compiles with gfortran fine. When I try to compile it with pgfortran to get my new acc directives working, I get errors around the following code:

! -- Field datatype
  type,public :: field
     real,allocatable :: p(:,:,:)     ! data array including ghosts
     real             :: bound_val=0. ! boundary value
     integer          :: n(3)=1       ! number of points in the array
     integer          :: ndims=3      ! number of spacial dimensions
     integer          :: location=0   ! location of data in FV cell
                                      !   0 => cell center (ie. scalar field)
                                      !   1,2,3 => x,y,z cell face (ie. component of vector field)
     procedure,private :: eqField,eqScalar
     procedure,public  :: init, fsize, point, applyBC, inner, filter, laplacian, filtergpu
     generic,public    :: assignment(=) => eqField,eqScalar
  end type field
  private; public :: field_test

The compiler gives me errors for eqscalar and eqfield for the contains statement with the procedures, saying that neithe r has been explicitly declared (even though I’m declaring them in those lines)

Any ideas on this? Are there compiler flags I need to add? I was just using -acc and -Minfo.

Thanks, Harry


I checked with one of our Fortran developers on this. Here is what he had to say:

The customer is using an F2008 feature for type bound procedures that we do not yet support. In F2008, you can have more than one routine on a type bound procedure line.

For example,

procedure,private :: eqField, eqScalar

We do not yet support this. The user needs to provide one name per procedure line (this is the F2003 convention). For example,

procedure,private :: eqField
procedure,private :: eqScalar

Hope this helps.

Best regards,


That makes sense, I have rewritten it and it now compiles as expected.

Thanks again,