PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

complex sine?
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
jand



Joined: 17 Aug 2008
Posts: 53

PostPosted: Mon Mar 05, 2012 11:51 am    Post subject: complex sine? Reply with quote

Hi,

I am trying to port a scientific code to a GPU (Nvidia GTX 580). It has been working fine so far, but now I get this error after including the sine of a complex number. It appeared to me from the documentation that sine and cosine of complex numbers is supported.

jand@liard:~/CUDA/plane_wave_forward$ pgfortran -Mcuda cuda_plane_reflcoeff.f90
PGF90-F-0000-Internal compiler error. Unsupported procedure 0 (cuda_plane_reflcoeff.f90: 166)
PGF90/x86-64 Linux 11.10-0: compilation aborted

Line 166 in the code:
ztmp = SIN(CMPLX(1.,1.))

Edit: I am using cuda fortran with version 11.10 under ubuntu 10.04 linux

Any help would be greatly appreciated, Jan
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Mar 07, 2012 10:03 am    Post subject: Reply with quote

Hi Jan,

FYI, I needed to send this on to our compiler team since I'm not sure if Complex SIN has been implemented yet, and if not, when they are planning to add it. No word back yet, but I'll keep you posted once I know more.

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



Joined: 17 Aug 2008
Posts: 53

PostPosted: Thu Mar 08, 2012 2:44 pm    Post subject: Reply with quote

Thanks very much.

Jan
Back to top
View user's profile
jand



Joined: 17 Aug 2008
Posts: 53

PostPosted: Fri Mar 09, 2012 12:00 pm    Post subject: function call from kernel Reply with quote

Hi Mat,

so far, I have just implemented the complex sine myself which is fine too (a real intrinsic could be quite a bit more efficient I guess).

One problem I ran into now is that it's not clear to me if I can write a function (e.g., complex sine) which I can call from the device kernel. Can you point me to some examples for calling functions from a kernel?

Thanks, Jan
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 304
Location: Greenbelt, MD

PostPosted: Fri Mar 09, 2012 12:15 pm    Post subject: Re: function call from kernel Reply with quote

jand wrote:
Hi Mat,

so far, I have just implemented the complex sine myself which is fine too (a real intrinsic could be quite a bit more efficient I guess).

One problem I ran into now is that it's not clear to me if I can write a function (e.g., complex sine) which I can call from the device kernel. Can you point me to some examples for calling functions from a kernel?

If you want to run a function from an attributes(global) subroutine, you can make an attributes(device) function that is in the same module. attributes(device) procedures can't be PURE, ELEMENTAL, or RECURSIVE, but other than that, they are just a normal function that is compiled for use on the device.
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, 3  Next
Page 1 of 3

 
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