PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

CUDA Fortran, PGI 11.8, and gcc 4.5
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
TheMatt



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

PostPosted: Fri Aug 19, 2011 9:34 am    Post subject: CUDA Fortran, PGI 11.8, and gcc 4.5 Reply with quote

I'm trying to experiment with CUDA 4.0 and a large model that I work on. On one machine where this is done, I need to load a python module (for f2py) that requires gcc 4.5 also be loaded. Unfortunately, when you have gcc-4.5 loaded, CUDA 4.0 goes a-failing:
Code:
In file included from /usr/local/sles11/pgi/linux86-64/2011/cuda/4.0/include/cuda_runtime.h:59:0,
                 from /gpfsm/dnb31/tdirs/pbs.137231.borgpbs1.mathomp4/pgcudafor25GcI9HkDRf4.gpu:1:
/usr/local/sles11/pgi/linux86-64/2011/cuda/4.0/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.5 and up are not supported!
PGF90-F-0000-Internal compiler error. pgnvd job exited with nonzero status code       0 (irrad.F90: 3027)
PGF90/x86-64 Linux 11.8-0: compilation aborted
gmake[6]: *** [irrad.o] Error 2

Is there any way around this? Or should I ask the sysadmins to install a parallel-installable gcc-4.4 and try to use --compiler-bindir a la this NVIDIA forum post. But that raises the question: is there a PGI analogue to --compiler-binder?

Anyone else encounter this?

Thanks,
Matt
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Aug 19, 2011 3:25 pm    Post subject: Reply with quote

Hi Matt,

Unfortunately, we don't have a way to switch the underlying GCC version that the NVIDIA components want to use. Though, I added a feature request (TPR#18121) to see if something can be done.

- Mat
Back to top
View user's profile
Senya



Joined: 20 Jun 2011
Posts: 58

PostPosted: Wed Aug 22, 2012 5:21 am    Post subject: Reply with quote

What about progress on this problem? I'm experiencing it too on 12.2.

I've got Ubuntu with gcc-4.4, gcc-4.5 and gcc-4.6 installed. I've tried to point PGI fortran to use gcc-4.4, but it didn't help for CUDA compiler.
Back to top
View user's profile
TheMatt



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

PostPosted: Wed Aug 22, 2012 6:18 am    Post subject: Reply with quote

Senya wrote:
What about progress on this problem? I'm experiencing it too on 12.2.

I've got Ubuntu with gcc-4.4, gcc-4.5 and gcc-4.6 installed. I've tried to point PGI fortran to use gcc-4.4, but it didn't help for CUDA compiler.

Senya,

As I started this, I'll let you know my discoveries. The issue was that CUDA 4.0 and lower used gcc as the backend. CUDA 4.1 and higher use LLVM in such a way that the gcc version doesn't seem to be an issue anymore (or, perhaps, gcc 4.5+ use LLVM as well, where as 4.4- didn't?)

Anyway, the solution is to use, if you can, CUDA 4.1 or higher as your default for CUDA Fortran. If you upgrade your PGI to 12.6 or higher, I believe it's moot as they now default to CUDA 4.1. But for 12.2, you'll have to pass, say, -Mcuda=4.1 or -ta=nvidia:4.1.

In the end, it's probably better to use 4.1 as it generated CUDA code that was, I think, something like 10% faster than 4.0...for free! You might also want to upgrade to the latest PGI compiler. Many bugs were closed between 12.2 and 12.8, and CUDA 4.1 is default. (Note: to use CUDA 4.1, you'll have to make sure your NVIDIA driver is new enough to. That is, the driver for CUDA 4.0 doesn't support running CUDA 4.1 code.)

Matt


Last edited by TheMatt on Wed Aug 22, 2012 11:04 am; edited 1 time in total
Back to top
View user's profile
Senya



Joined: 20 Jun 2011
Posts: 58

PostPosted: Wed Aug 22, 2012 10:43 am    Post subject: Reply with quote

Thanks for your help!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling 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