PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Unsupported feature for adding arrays.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
alfvenwave



Joined: 08 Apr 2010
Posts: 79

PostPosted: Wed Apr 14, 2010 9:40 am    Post subject: Unsupported feature for adding arrays. Reply with quote

Hi.

I have a piece of code that looks like this:

Code:
                   pm(threadidx%x,m+1,1) = pm (threadidx%x,1,1) +             &
                                           d_t(threadidx%x,m)   *             &
                                           fm (threadidx%x,m,1)
                   pm(threadidx%x,m+1,2) = pm (threadidx%x,1,2) +             &
                                           d_t(threadidx%x,m)   *             &
                                           fm (threadidx%x,m,2)
                   pm(threadidx%x,m+1,3) = pm (threadidx%x,1,3) +             &
                                           d_t(threadidx%x,m)   *             &
                                           fm (threadidx%x,m,3)
                   pm(threadidx%x,m+1,4) = pm (threadidx%x,1,4) +             &
                                           d_t(threadidx%x,m)   *             &
                                           fm (threadidx%x,m,4)
                   pm(threadidx%x,m+1,5) = pm (threadidx%x,1,5) +             &
                                           d_t(threadidx%x,m)   *             &
                                           fm (threadidx%x,m,5)
                   pm(threadidx%x,m+1,6) = pm (threadidx%x,1,6) +             &
                                           d_t(threadidx%x,m)   *             &
                                           fm (threadidx%x,m,6)


I would like to collapse it down so it looks like this:

Code:
                   pm(threadidx%x,m+1,1:6) = pm (threadidx%x,1,1:6) +         &
                                           d_t(threadidx%x,m)   *             &
                                           fm (threadidx%x,m,1:6)


Unfortunately, this is an "unsupported feature". Is this available in 10.4, or will it be available in the future?

Thanks,

Rob.
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Apr 15, 2010 9:03 am    Post subject: Reply with quote

Hi Rob,

Can you post an example or sent one to PGI Customer Service (trs@pgroup.com)? This should work so I'll need it context to better understand what "unsupported feature" the compiler is complaining about.

Thanks,
Mat
Back to top
View user's profile
alfvenwave



Joined: 08 Apr 2010
Posts: 79

PostPosted: Fri Apr 16, 2010 10:28 am    Post subject: Reply with quote

Hi Mat. I'm away from the lab for the next week so unfortunately can't send you my code. I will do so as soon as I return....

Rob.
Back to top
View user's profile
alfvenwave



Joined: 08 Apr 2010
Posts: 79

PostPosted: Mon Apr 26, 2010 9:16 am    Post subject: Reply with quote

OK. Here is the code that won't compile. I get the following error:

pgfortran -c testmod.cuf
PGF90-F-0000-Internal compiler error. unsupported procedure 330 (testmod.cuf: 17)

Code:
attributes(global) subroutine testmod

implicit none

integer,   parameter :: threadsPerBlock = 8
real,      shared    :: fm ( threadsPerBlock, 6, 4 )
real,      shared    :: pm ( threadsPerBlock, 6, 4 )
real,      shared    :: d_t( threadsPerBlock, 3    )
integer              :: m

m = 1

pm(threadidx%x,1:6,m+1) = pm (threadidx%x,1:6,1) +         &
                          d_t(threadidx%x,  m) *           &
                          fm (threadidx%x,1:6,m)

end
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Apr 26, 2010 1:06 pm    Post subject: Reply with quote

Hi Rob,

Thanks for the sample code. I've sent this on to our engineers (TPR#16873) since I not sure what procedure the compiler is adding. Luckily the work around is to simply set "threadid%x" to a temp variable and use the temp variable in it's place. For example:
Code:
% cat test2.cuf

attributes(global) subroutine testmod

implicit none

integer,   parameter :: threadsPerBlock = 8
real,      shared    :: fm ( threadsPerBlock, 6, 4 )
real,      shared    :: pm ( threadsPerBlock, 6, 4 )
real,      shared    :: d_t( threadsPerBlock, 3    )
integer              :: m,idx

m = 1
idx = threadidx%x
pm(idx,1:6,m+1) = pm (idx,1:6,1) +         &
                  d_t(idx,  m) *           &
                  fm (idx,1:6,m)

end

% pgf90 -c test2.cuf
%                             

- Mat
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
Goto page 1, 2  Next
Page 1 of 2

 
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