PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

accelerator compiler incompatible with GCC 4.2?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
E. Sumbar



Joined: 27 Jul 2006
Posts: 15

PostPosted: Fri Sep 03, 2010 10:21 am    Post subject: accelerator compiler incompatible with GCC 4.2? Reply with quote

I have a feeling this is a well-known issue... Can you confirm that the accelerator compiler is incompatible with GCC 4.2. My setup is

$ pgfortran -V
pgfortran 10.8-0 64-bit target on x86-64 Linux -tp nehalem-64

$ gcc --version
gcc (GCC) 4.2.0

$ uname -a
Linux cluster-login.nic.ualberta.ca 2.6.34.1-smp #1 SMP Tue Jul 6 13:03:50 MDT 2010 x86_64 x86_64 x86_64 GNU/Linux

When I try to compile the following source code with pgfortran -ta=nvidia -c acc.f, it fails, emitting a slew of messages beginning with "c++config.h(149): error: expected a "{"" and ending with "Compilation terminated. PGF90-F-0000-Internal compiler error. pgnvd job exited with nonzero status code 0 (acc.f: 15)". However, when I switch to GCC 3.4.4, compilation succeeds.

It's distasteful to have to downgrade GCC. Is there anything I can do to avoid it? If not, are there any gotchas associated with downgrading (loss of Fortran 90 support, for example). Or, would you recommend upgrading GCC to 4.3 (or higher), provided it's compatible (is it?).

Code:

      subroutine xyz(a,b,c,n1,n2,n3)
      real a(n3,n2)
      real b(n2,n1)
      real c(n3,n1)
!$acc region
      do k = 1,n1
        do i = 1,n3
          c(i,k) = 0.0
          do j = 1,n2
            c(i,k) = c(i,k) + a(i,j) * b(j,k)
          enddo
        enddo
      enddo
!$acc end region
      end


--
Ed
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Fri Sep 03, 2010 11:08 am    Post subject: Reply with quote

Hi,

It should work on GCC4.2 too. Unfortunately our 4.2 is down at the moment and it will be sometime to get it back up to know what the problem is or provide a workaround.

Yes, it should work with 4.3. We have tested your program here without problem.

Have you upgraded to GCC 4.2 after installing PGI Compilers? If that is the case, you may need to run makelocarc to update the information in localrc file.

Thank you,
Hongyon
Back to top
View user's profile
E. Sumbar



Joined: 27 Jul 2006
Posts: 15

PostPosted: Sat Sep 04, 2010 9:10 am    Post subject: Reply with quote

Thanks for your reply hongyon.

I did not upgrade GCC after installing the Portland Compilers (I had that experience once before, many years ago, thanks for the tip about makelocalrc).

I will install GCC 4.3 or 4.4 to make it work. However, I am still curious to know why my GCC 4.2 environment caused a problem, and what, if any, workarounds there might be (other than upgrading GCC). So when you do get an opportunity to investigate this problem, let me know what you find. Thanks again.

--
Ed
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Tue Sep 07, 2010 9:58 am    Post subject: Reply with quote

Hi,

We have installed GCC 4.2.3 here and I still see no problem.
Can you please send us what your localrc? What about an output of pgfortran -v -ta=nvinia acc.f -c ?

Thank you,
Hongyon
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Tue Sep 07, 2010 12:56 pm    Post subject: Reply with quote

never mind. We installed GCC 4.2.0. We now can replicate the problem.

Hongyon
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  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