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?).
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