PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Functions/Procedure not supported
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
Karthee



Joined: 08 Jul 2010
Posts: 4

PostPosted: Fri Jul 09, 2010 1:40 pm    Post subject: Functions/Procedure not supported Reply with quote

Hi,
This is the code section that I am trying to accelerate.

!$acc region copyin (k,yxv,f,route) copyout(vtx) local(phase3,ctemp)
!$acc do parallel
DO p = 1,npoints
DO i = 1,nterms
phase3 = CMPLX(0,0.5d0) * SUM( k(:,1:order+1,p)*yxv(:,1:order+1,i) )
ctemp = f(i) * EXP(phase3)
vtx(0,0,0,p) = vtx(0,0,0,p) + ctemp
END DO
END DO
!$acc end region

I get the following message

main:
64, Accelerator region ignored
67, Accelerator restriction: function/procedure calls are not supported
68, sum reduction inlined
69, Accelerator restriction: function/procedure calls are not supported

It seems CMPLX, SUM and EXP functions are not supported? Is there any work around?
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jul 12, 2010 5:08 pm    Post subject: Reply with quote

Hi Karthee,

Quote:
It seems CMPLX, SUM and EXP functions are not supported?
CMPLX is not supported. SUM and EXP are supported just not for Complex data types. For a complete list of supported intrinsics, please refer the Chapter 7 of PGI User's Guide (http://www.pgroup.com/doc/pgiug.pdf).

Quote:
Is there any work around?

You could replace "CMPLX(0,0.5d0)" with a variable initialized on the host. For sum, you would simply add another loop to perform the summation. Unfortunately, I can't think of anything for EXP.

Sorry,
Mat
Back to top
View user's profile
Alistair Hart



Joined: 06 Jul 2010
Posts: 21
Location: Cray Exascale Research Initiative, Edinburgh

PostPosted: Thu Jul 15, 2010 1:39 am    Post subject: Reply with quote

Do the real and imaginary parts as separate variables using:

CMPLX(a,b) * CMPLX(c,d) = CMPLX(a*c-b*d,a*d+b*c)

EXP(CMPLX(a,b)) = EXP(a) * CMPLX(COS(b),SIN(b))

Cheers,

Alistair.
Back to top
View user's profile
Malcolm Bibby



Joined: 16 Nov 2009
Posts: 33

PostPosted: Fri Jul 16, 2010 8:30 pm    Post subject: CMPLX not supported Reply with quote

Is it really true that CMPLX is not supported?

MMB

After further research, i.e. reading more of the PGI manuals, I see that CMPLX really is not supported, as shown in Table 7.5 of the User Guide. In fact, comparing Table 7.5 with the list of supported intrinsics shown in the Fortran Reference manual, there are quite a few intrinsics not supported. To the HPC community things like DOT_PRODUCT and TRANSPOSE, just to mention two that are not supported in any intrinsic data type, must crop up all of the time! This has got to be a real draw back to the adoption of the Accelerator product!!

MMB
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jul 19, 2010 10:44 am    Post subject: Reply with quote

Quote:
Is it really true that CMPLX is not supported?
I did more research on this and found that CMPLX is actually now supported. The docs just need updating.

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