PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Code won't compile with PGF 10.6-0

 
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: Tue Oct 12, 2010 4:31 am    Post subject: Code won't compile with PGF 10.6-0 Reply with quote

Hi.

I'm trying to run my code on a new machine - unfortunately, it won't compile. The code compiles and runs fine on a C1060 based machine with compiler version 10.2-1. The new machine is a GTX480 based machine with compiler version 10.6-0. Can anyone tell from this whether it's the machine that's to blame or the compiler (we are about to upgrade to 10.6 on the C1060 machine).

Unfortunately, -Mcuda=ptxinfo doesn't work for version 10.1. This is what I get though for the GTX480+10.6 compilation:

If I compile my main kernel module alone (have I used too much memory for a GTX480?):

Code:
$ pgfortran -c curk4_mod.cuf -Mcuda=ptxinfo
ptxas info    : Compiling entry function 'state_kernel'
ptxas info    : Used 41 registers, 40+0 bytes lmem, 152+16 bytes smem, 88 bytes cmem[0], 60 bytes cmem[1], 4 bytes cmem[14]
ptxas info    : Compiling entry function 'curk4_kernel'
ptxas info    : Used 64 registers, 688+0 bytes lmem, 2432+16 bytes smem, 88 bytes cmem[0], 300 bytes cmem[1], 4 bytes cmem[14]
ptxas info    : Compiling entry function 'state_kernel'
ptxas info    : Used 41 registers, 40+0 bytes lmem, 152+16 bytes smem, 88 bytes cmem[0], 60 bytes cmem[1], 4 bytes cmem[14]
ptxas info    : Compiling entry function 'curk4_kernel'
ptxas info    : Used 81 registers, 664+0 bytes lmem, 2432+16 bytes smem, 88 bytes cmem[0], 352 bytes cmem[1], 4 bytes cmem[14]


Then when I try to compile the executable:

Code:
$ pgfortran -fast prec_mod.cuf disp_crt.cuf rand_mod.cuf wrapper.cuf curk4_mod.cuf pgen.cuf pload.cuf terp1_X.cuf MersenneTwister_kernel.o -mp -Mcuda=ptxinfo
prec_mod.cuf:
ptxas info    : Compiling entry function '__cuda_dummy_entry__'
ptxas info    : Used 0 registers, 16 bytes cmem[0]
ptxas info    : Compiling entry function '__cuda_dummy_entry__'
ptxas info    : Used 0 registers, 16 bytes cmem[0]
disp_crt.cuf:
rand_mod.cuf:
wrapper.cuf:
curk4_mod.cuf:
pgfortran-Fatal-/opt/local/bin/pgf902 TERMINATED by signal 11
Arguments to /opt/local/bin/pgf902
/opt/local/bin/pgf902 /tmp/pgfortran2LOgIBTMjFNV.ilm -fn curk4_mod.cuf -opt 2 -terse 1 -inform warn -x 51 0x20 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -quad -vect 56 -y 34 16 -x 34 0x8 -x 32 262144 -y 19 8 -y 35 0 -x 42 0x30 -x 39 0x40 -x 39 0x80 -x 34 0x400000 -x 149 1 -x 150 1 -x 59 4 -x 59 4 -tp nehalem-64 -x 120 0x1000 -x 124 0x1400 -y 15 2 -x 57 0x3b0000 -x 58 0x48000000 -x 49 0x100 -x 120 0x200 -astype 0 -x 121 1 -x 124 1 -x 9 1 -x 42 0x14200000 -x 72 0x1 -x 136 0x11 -x 80 0x800000 -quad -x 119 0x10000000 -x 129 0x40000000 -x 129 2 -x 164 0x1000 -mp -x 69 0x200 -x 69 0x400 -x 137 1 -x 163 0x400000 -x 176 0x100000 -x 177 0x0c -x 176 1 -x 137 1 -x 176 1 -x 176 0x100000 -x 177 0x0c -cmdline '+pgfortran curk4_mod.cuf -fast -Mvect=sse -Mscalarsse -Mcache_align -Mflushz -Mpre -mp -Mcuda=ptxinfo' -asm /tmp/pgfortrangLOgsMEepK0Y.sm


Sometimes the compiler seems to take forever too, whereas with the C1060s and version 10.1 of the compiler everything compiles reasonably quickly....

Here is the compiler info for the C1060 (working) setup:

Code:
$ pgfortran -V
pgfortran 10.2-1 64-bit target on x86-64 Linux -tp nehalem-64


and for the non working GTX480 based system:

Code:
$ pgfortran -V
pgfortran 10.6-0 64-bit target on x86-64 Linux -tp nehalem-64


any help greatly appreciated....

Rob.
Back to top
View user's profile
alfvenwave



Joined: 08 Apr 2010
Posts: 79

PostPosted: Tue Oct 12, 2010 7:09 am    Post subject: This appears to be a bug with the fast optimizer option. Reply with quote

OK. I have systematically stripped my code right down to find where it's failing. The failure appears to be occuring when I try to exit a do loop in a device subroutine whilst also changing the variable that was used in the exit condition. One module subroutine, it compiles fine with 10.1 with and without the -fast option. It compiles with 10.6 without the -fast option, but fails with -fast optimization turned on:

Code:
module test_mod

use cudafor

implicit none

contains

attributes(device) subroutine foo()

      implicit none

      integer                       :: iflag
      integer                       :: j

      do j = 1,2

        if(iflag /= 0)then
            iflag = 1
            exit
        endif

      enddo

end subroutine foo

end module test_mod


And here is the error output:

Code:
$ pgfortran -fast -c test_mod.cuf -mp
pgfortran-Fatal-/opt/local/bin/pgf902 TERMINATED by signal 11
Arguments to /opt/local/bin/pgf902
/opt/local/bin/pgf902 /tmp/pgfortranO8Eb4lTWmtzq.ilm -fn test_mod.cuf -opt 2 -terse 1 -inform warn -x 51 0x20 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -quad -vect 56 -y 34 16 -x 34 0x8 -x 32 262144 -y 19 8 -y 35 0 -x 42 0x30 -x 39 0x40 -x 39 0x80 -x 34 0x400000 -x 149 1 -x 150 1 -x 59 4 -x 59 4 -tp nehalem-64 -x 120 0x1000 -x 124 0x1400 -y 15 2 -x 57 0x3b0000 -x 58 0x48000000 -x 49 0x100 -x 120 0x200 -astype 0 -x 121 1 -x 124 1 -x 9 1 -x 42 0x14200000 -x 72 0x1 -x 136 0x11 -x 80 0x800000 -quad -x 119 0x10000000 -x 129 0x40000000 -x 129 2 -x 164 0x1000 -mp -x 69 0x200 -x 69 0x400 -x 137 1 -x 176 1 -x 176 0x100000 -x 177 0x0c -cmdline '+pgfortran test_mod.cuf -fast -Mvect=sse -Mscalarsse -Mcache_align -Mflushz -Mpre -c -mp' -asm /tmp/pgfortranO8Eb4qSoMlA6.sm


If I comment out line 20 (the exit) it compiles, and if I comment out line 19 (iflag=1) it compiles.

Rob.
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Tue Oct 12, 2010 7:56 am    Post subject: Reply with quote

Hi,

It was a bug in 10.6. We have fixed it. Please try release 10.8 or later.

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



Joined: 08 Apr 2010
Posts: 79

PostPosted: Tue Oct 12, 2010 9:55 am    Post subject: Reply with quote

Exellent - thanks Hongyon.

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