Unsupported feature for adding arrays.

Hi.

I have a piece of code that looks like this:

                   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:

                   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.

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

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.

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)

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

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:

% 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

Thanks Mat.

Rob.

Rob,

TPR 16873 - CUDA: ICE unsupported procedure 330

Has been corrected in the 11.0 release , currently available. Thanks
again for your report.

dave