PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

14.1 llvm problem with constant arrays in modules

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



Joined: 13 Apr 2013
Posts: 5

PostPosted: Sat Feb 15, 2014 1:46 pm    Post subject: 14.1 llvm problem with constant arrays in modules Reply with quote

The following will not compile with 14.1 and -Mcuda=llvm

Code:
module weights
  real*8, parameter :: w(0:1) = (/ 1d0, 1d0 /)
end module weights
implicit none
real*8, device, dimension(64) :: fdev
integer loop
fdev = 1d0
!$cuf kernel do(1) <<<  (*), (*) >>>
do loop=1,64
   fdev(loop)=fdev(loop)+1d0
enddo
end


The error messages are

Quote:
nvvmCompileProgram error: 9.
Error: /tmp/pgcudaforABmgowjCRc83.gpu (12, 61): parse error: constant expression type mismatch
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (PGI-14.1-module-constant-bug.f90: 1)
PGF90/x86-64 Linux 14.1-0: compilation aborted


The relevant part of the LLVM code (with line 12 in the middle) is

Code:
; Begin module variables

@_weights_10_0 = internal addrspace(4) global [64 x double]  [ double  1.00000000000000000E+0, double  1.00000000000000000E+0 ] , align 16

; End module variables


The compiler tries to include the array of constants in the LLVM code it generates, even though the main program doesn't use the module. In my full program I want to include a similar module in subroutines that don't contain GPU kernels.
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Feb 18, 2014 11:02 am    Post subject: Reply with quote

Hi Paul,

Thanks for the example. Looks like our engineers found and fixed this one in 14.2 which while be out in the next day or so.

Code:
% pgf90 -Mcuda=llvm llvm.cuf -V14.1
nvvmCompileProgram error: 9.
Error: /tmp/pgcudaforZluczj3OkC1q.gpu (12, 61): parse error: constant expression type mismatch
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (llvm.cuf: 1)
PGF90/x86-64 Linux 14.1-0: compilation aborted
% pgf90 -Mcuda=llvm llvm.cuf -V14.2
%


- 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
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