PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Compiler error PGI Fortran 12.x

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Jost



Joined: 13 Oct 2009
Posts: 2

PostPosted: Wed May 02, 2012 5:20 am    Post subject: Compiler error PGI Fortran 12.x Reply with quote

Hello,
I found a Compiler error in all PGI Fortran versions 12.x

If I compile the following program:

program matrixtest
implicit none
real(kind = 4),dimension(2,2) :: a,b,h

a(1,1) = 1.0 ; a(1,2) = 2.0
a(2,1) = 3.0 ; a(2,2) = 4.0

b(1,1) = 5.0 ; b(1,2) = 6.0
b(2,1) = 7.0 ; b(2,2) = 8.0

write(*,*) 'matmul(a,transpose(b))=',matmul(a,transpose(b))

h = transpose(b)

write(*,*) 'matmul(a,h)=',matmul(a,h)

end program matrixtest



the results of both write-statements should be obviously the same.

That's the result of PGI-Fortran 11.3, 11.10:

jost@linux:~> pgf90 matrixtest.f90
jost@linux:~> ./a.out
matmul(a,transpose(b))= 17.00000 39.00000 23.00000
53.00000
matmul(a,h)= 17.00000 39.00000 23.00000 53.00000
jost@linux:~>



And this is the result of PGI-Fortran 12.x (tested with 12.2, 12.3, and 12.4):

jost@linux:~> pgf90 matrixtest.f90
jost@linux:~> ./a.out
matmul(a,transpose(b))= 5.000000 25.00000 5.000000
25.00000
matmul(a,h)= 17.00000 39.00000 23.00000 53.00000
jost@linux:~>

Is it possible to repair the compiler, since matrix calculations are very important for us?

Thanks and regards,
Jost
Back to top
View user's profile
mkcolg



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

PostPosted: Wed May 02, 2012 8:33 am    Post subject: Reply with quote

Hi Jost,

Thanks for the report. I added TPR#18670 and sent it off our engineers for investigation.

I'll update once I know more.

- Mat
Back to top
View user's profile
mkcolg



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

PostPosted: Wed May 02, 2012 4:23 pm    Post subject: Reply with quote

Hi Jost,

Looks like this is a problem with a new optimization we added for small matmuls. To disable this optimization please add the internal compiler flag "-Hx,47,0x200".

Best Regards,
Mat
Back to top
View user's profile
Jost



Joined: 13 Oct 2009
Posts: 2

PostPosted: Thu May 03, 2012 2:52 am    Post subject: Reply with quote

Hi Mat,

thank you very much! It seems to work perfectly with the internal compiler flag!

Best regards,
Jost
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
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