PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Problem with complex constant in pgf90 v14.1

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



Joined: 02 Mar 2012
Posts: 10

PostPosted: Mon Mar 17, 2014 3:11 pm    Post subject: Problem with complex constant in pgf90 v14.1 Reply with quote

Hi,

I'm trying to compile the following code with pgf90 (v14.1):

module constant

complex, constant,public :: cmplx_0_d=(0.0,0.0)

end module constant


program test

use constant

implicit none

complex, device :: a
complex :: b

b = cmplx(1.0,1.0)
a = cmplx_0_d
b = a
write(*,*) b


end program test

I get the following error when compiling:

[adrianj@hydra]$ pgf90 -acc -Minfo=all -o test constant.CUF test.CUF
constant.CUF:
/home/h018/adrianj/temp/pgcudaforJjHbPlEc6IQb.gpu(6): error: expected a "}"

1 error detected in the compilation of "/home/h018/adrianj/temp/pgnvd-kHb9-D1qqHE.nv0".
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (constant.CUF: 1)
PGF90/x86-64 Linux 14.1-0: compilation aborted
test.CUF:


Is a fortran complex type not allowed to be setup in the constant memory or is this just a compiler bug?

thanks

adrianj
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Mar 18, 2014 9:32 am    Post subject: Reply with quote

Thanks adrianj. I've recreated the issue here and sent a report (TPR#20072) to our engineers for further investigation.

The work around would be to initialize the variable from executable host code.

Code:
module constant

 complex, constant,public :: cmplx_0_d

 end module constant


 program test

 use constant

 implicit none

 complex, device :: a
 complex :: b
 cmplx_0_d=(0.0,0.0)

 b = cmplx(1.0,1.0)
 a = cmplx_0_d
 b = a
 write(*,*) b


 end program test


Best regards,
Mat
Back to top
View user's profile
adrianj



Joined: 02 Mar 2012
Posts: 10

PostPosted: Tue Mar 18, 2014 3:05 pm    Post subject: Reply with quote

thanks Mat
Back to top
View user's profile
jtull



Joined: 30 Jun 2004
Posts: 395

PostPosted: Thu Jul 24, 2014 5:44 pm    Post subject: TPR 20072 is fixed Reply with quote

TPR 20072 - UF: Initializing a constant complex module varible give GPU syntax
has been fixed in the current 14.7 release.

thanks,
dave
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