PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Named forall constructs not recognized.

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
chylin



Joined: 19 May 2006
Posts: 4

PostPosted: Fri May 19, 2006 2:04 pm    Post subject: Named forall constructs not recognized. Reply with quote

Although there seems to be no functional reason for doing so, the Fortran 95 standard permits forall constructs to be named. However, the PGI f90/f95 compiler (Version 6.1) does not appear to recognize this.

For example, the following code:

Code:
    ! Grid vector:
    grid_v: forall (i=ib:ie, j=jb:je, k=kb:ke) ! Line 82
       gout(i,j,k,1) = z(i,j)*rref*out_len
       gout(i,j,k,2) = r(i,j)*rref*out_len
       gout(i,j,k,3) = dummy
    end forall grid_v                          ! Line 86

    ! Data vector:
    data_v: forall (i=ib:ie, j=jb:je, k=kb:ke) ! Line 89
       qout(i,j,k,1) = u(i,j)*uref*out_vel
       qout(i,j,k,2) = v(i,j)*uref*out_vel
       qout(i,j,k,3) = p(i,j)*pref*out_press
       qout(i,j,k,4) = t(i,j)*tref*out_temp
       qout(i,j,k,5) = cmach(i,j)
    end forall data_v                          ! Line 95


causes the following compiler errors:

PGF90-S-0034-Syntax error at or near FORALL (plot3d.f90: 82)
PGF90-S-0034-Syntax error at or near identifier grid_v (plot3d.f90: 86)
PGF90-S-0034-Syntax error at or near FORALL (plot3d.f90: 89)
PGF90-S-0034-Syntax error at or near identifier data_v (plot3d.f90: 95)
0 inform, 0 warnings, 4 severes, 0 fatal for plot3d

For consistency and readability, I like to name most loop structures in my code, so I'm a bit disappointed that the PGI compiler appears not to support the standard in this respect. I definitely dislike having to alter standards-compliant code in order to please a particular compiler.
Back to top
View user's profile
mkcolg



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

PostPosted: Fri May 19, 2006 2:50 pm    Post subject: Reply with quote

Hi chylin,

Thank you for your report. This is indeed a bug and I have filed a technical problem report, TPR #3838, for this issue.

- Mat
Back to top
View user's profile
chylin



Joined: 19 May 2006
Posts: 4

PostPosted: Fri May 19, 2006 4:36 pm    Post subject: Reply with quote

Thanks, Mat.

For the time being, I've removed the name-tags from the forall loops in question, and put equivalent comments at the end of those lines. With that work-around, the routine compiles okay.
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
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