PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

complex 'matmul' function fails

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



Joined: 14 Apr 2008
Posts: 1

PostPosted: Sun Sep 16, 2012 11:02 pm    Post subject: complex 'matmul' function fails Reply with quote

Recently, I updated the PGI compiler version to 12.8 and started to get weird results from my program which worked fine with version 11.10. I've been trying to locate the source of error and think I got one. In the following code, it compiles fine, but gives segmentation fault when it is run.
Code:


 program check
 implicit none
 integer :: i, n
 complex(kind=8), allocatable, dimension(:,:) :: a, b, c

 n = 24
 allocate(a(n,n), b(n,n), c(n,n))

 !initialize
 a = (1.0d0,1.0d0)
 b = (2.0d0,2.0d0)
 c = (3.0d0,3.0d0)

 c = matmul( a, b ) !OK
 c = matmul( b, dconjg(a) ) !Segfault (core dump)
 c = matmul( dconjg(b), a ) !Segfault (core dump)
 c = matmul( dconjg(a), dconjg(b) ) !Segfault (core dump)

 end


The code basically do a series of complex matrix multiplications and it seems that whenever some intrinsic functions (e.g., dconjg, transpose etc) appear inside matmul parentheses it gives out segfault.

The code runs fine in other compilers. Also, when the allocatable arrays are exchanged to explicit shape arrays the code works fine too.
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Sep 17, 2012 8:50 am    Post subject: Reply with quote

Hi dux,

Thanks for the report. This is a known issue that will be resolved in our upcoming 12.9 release.
Code:

% pgf90 mm_complex.f90 -V12.8
% a.out
Segmentation fault
% pgf90 mm_complex.f90 -V12.9
% a.out
%


Best Regards,
Mat
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