PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

compiler information

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



Joined: 16 Mar 2012
Posts: 75

PostPosted: Fri Dec 21, 2012 4:34 am    Post subject: compiler information Reply with quote

I wrote a Fortran code as:
Code:
program picalc
      implicit none
      integer, parameter :: n=10
      integer :: i
      real(kind=8) :: a(n),b(n),c(n)

        !acc data copy(a,b,c)
        !$acc parallel
      do i=1, n
          a(i) = i
                  b(i) = 1
                  c(i) = a(i) + b(i)
      end do
        !$acc end parallel
          !acc end data

        write(*,*) c(2)
         
  end program picalc



The compiler information as below:
Compute capability mismatch
file: F:\PVFProject1\PVFProject1\ConsoleApp.f90
routine: picalc
line: 15
device: 0 compute capability 1.2
driver: 4020
Available compute capability: 1.3(elf) 2.0(elf) 2.0(ptx)

I had thought this code need compute capablity with 1.3+
But after I modified the code as below:
Code:
program picalc
      implicit none
      integer, parameter :: n=10
      integer :: i
      real(kind=8) :: a(n),b(n),c(n)
       
        !acc data copy(a,b,c)
        !$acc do
      do i=1, n
          a(i) = i
                  b(i) = 1
                  c(i) = a(i) + b(i)
      end do
       
          !acc end data

        write(*,*) c(2)
         
  end program picalc

This time,the code was compiled succesully. I got some confuseed ,Why?

I'm looking forward your reply.

Merry Christmas
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Dec 21, 2012 10:30 am    Post subject: Reply with quote

Hi Teslalady,

In the second case, you are not generating a compute kernel due to incorrect syntax. Change "!$acc do" to "!$acc parallel loop" and you'll get the compute capability error.

Be sure to add "-Minfo=accel" to your compile. If the information is blank, no kernel was generated.

Hope this helps,
Mat

Example using Linux:
Code:
% cat test.f90
program picalc
      implicit none
      integer, parameter :: n=10
      integer :: i
      real(kind=8) :: a(n),b(n),c(n)
       
        !acc data copy(a,b,c)
        !$acc parallel loop
      do i=1, n
          a(i) = i
                  b(i) = 1
                  c(i) = a(i) + b(i)
      end do
       
          !acc end data

        write(*,*) c(2)
         
  end program picalc
% pgf90 -acc -Minfo -ta=nvidia,cc12 test.f90 -V12.9
PGF90-S-0155-No valid compute capability generated  (test.f90)
PGF90-W-0155-Compiler failed to translate accelerator region (see -Minfo messages): Could not find GPU binary file (test.f90: 8)
picalc:
      8, Accelerator kernel generated
          9, !$acc loop gang, vector(256) ! blockidx%x threadidx%x
      8, Generating present_or_copyout(c(:))
         Generating present_or_copyout(b(:))
         Generating present_or_copyout(a(:))
         Double precision operations disable compute capability 1.2 kernel
     10, Double precision operations disable compute capability 1.2 kernel
     11, Double precision operations disable compute capability 1.2 kernel
     12, Double precision operations disable compute capability 1.2 kernel
  0 inform,   1 warnings,   1 severes, 0 fatal for picalc
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