PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Suspected compiler bug/problem - 10.9

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



Joined: 08 Apr 2010
Posts: 79

PostPosted: Mon Oct 25, 2010 3:17 am    Post subject: Suspected compiler bug/problem - 10.9 Reply with quote

Hi.

Got a piece of code here:

Code:
do kx = 1, mx

    cx(kx) = chebev( ay, by, cxy(kx,:), my, y, iflag )

enddo


It fails to compile:

Code:
pgfortran -c curk4_mod.cuf -Mcuda=cuda3.1 -Mpreprocess
PGF90-S-0000-Internal compiler error. unsupported procedure     420 (curk4_mod.cuf: 943)
PGF90-S-0000-Internal compiler error. unsupported procedure     424 (curk4_mod.cuf: 943)
  0 inform,   0 warnings,   2 severes, 0 fatal for chebev2d
/tmp/pgcudaforZEXdztxDSNvo.gpu(282): error: argument of type "float *" is incompatible with parameter of type "signed char *"

/tmp/pgcudaforZEXdztxDSNvo.gpu(283): error: expected an expression

2 errors detected in the compilation of "/tmp/pgnvdTFXdhE7Cvz44.nv0".
PGF90-F-0000-Internal compiler error. pgnvd job exited with nonzero status code       0 (curk4_mod.cuf: 3787)
PGF90/x86-64 Linux 10.9-0: compilation aborted


However, if I do this:

Code:
do kx = 1, mx

   DUM = cxy(kx,:)
   cx(kx) = chebev( ay, by, DUM, my, y, iflag )

enddo


It compiles fine.....is this what's expected? I think this is related to a problem I posted about some months ago for compiler ver. 10.2-1.

Cheers,

Rob.
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Oct 25, 2010 5:17 pm    Post subject: Reply with quote

Hi Rob,

This is a known issue where the compiler should be issuing a semantic error. The problem is in order to pass an array section, the compiler needs to create a temporary array. However, CUDA does not yet allow for allocation on the device so the compiler can't create the temp array (the 'unsupported procedure' is a call to malloc).

As you discovered, the work around is to create a fixed size temp array to hold the array section and then pass in the temp array.

Hope this helps,
Mat
Back to top
View user's profile
alfvenwave



Joined: 08 Apr 2010
Posts: 79

PostPosted: Tue Oct 26, 2010 12:47 am    Post subject: Reply with quote

Interesting. Thanks for letting me know Mat.

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