PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

pgfortran Compiler Issues

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
haz13



Joined: 17 Mar 2014
Posts: 13

PostPosted: Sun Mar 23, 2014 11:02 am    Post subject: pgfortran Compiler Issues Reply with quote

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:

Code:
! -- Field datatype
  type,public :: field
     private
     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)
     contains
     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
Back to top
View user's profile
cparrott



Joined: 02 May 2011
Posts: 149

PostPosted: Mon Mar 24, 2014 2:13 pm    Post subject: Reply with quote

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,

+chris
Back to top
View user's profile
haz13



Joined: 17 Mar 2014
Posts: 13

PostPosted: Mon Mar 24, 2014 5:49 pm    Post subject: Ah thank you! Reply with quote

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

Thanks again,

Harry
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
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