PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Segmentation fault with PACK function since pgi/12.X
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
escj



Joined: 30 Sep 2009
Posts: 50
Location: Laboratoire d'Aérologie, Toulouse, FRANCE

PostPosted: Mon Sep 24, 2012 7:06 am    Post subject: Segmentation fault with PACK function since pgi/12.X Reply with quote

Hello ( ;-)Again me )

Segmentation fault with basic use of PACK function since pgi/12.X

Sample "test_pack" compile with pgi/11.10 ( or ifort or gfortran) OK
Quote:

test_pack
IINDEX= 1 2 3
IJINDEX= 1 2 3


Now compiled with pgi/12.5 or over
Quote:

test_pack
Segmentation fault


Here is the compilation line
Quote:

pgf90 -g test_pack.f90 -o test_pack


And the test_pack source :
Code:

PROGRAM TEST_PACK

  IMPLICIT NONE

  INTEGER, PARAMETER                  :: NI=3
  INTEGER, ALLOCATABLE, DIMENSION(:)  :: IINDEX,IJINDEX
  LOGICAL, ALLOCATABLE, DIMENSION(:)  :: GTRIG

  INTEGER                             :: I

  ALLOCATE (IINDEX(NI),IJINDEX(NI),GTRIG(NI))
 
  DO I=1,NI
    IINDEX(I) = I
    GTRIG(I)  = .TRUE.
  END DO

  IJINDEX(:) = PACK( IINDEX(:), MASK=GTRIG(:) )

  print*,"  IINDEX=",IINDEX(:)
  print*," IJINDEX=",IJINDEX(:)

END PROGRAM TEST_PACK


A+
Juan
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Sep 24, 2012 9:22 am    Post subject: Reply with quote

Thanks Jaun,

I submitted TPR#18937 for this error. Interestingly the error does not occur in our internal development compiler. I don't see other similar reports but our engineers might have already found this error or it was fixed as a side effect of another issue. This means that we should be able to get the fix into the next release.

- Mat
Back to top
View user's profile
escj



Joined: 30 Sep 2009
Posts: 50
Location: Laboratoire d'Aérologie, Toulouse, FRANCE

PostPosted: Mon Sep 24, 2012 10:07 am    Post subject: Reply with quote

Hello Mat .

In the original code I don't alway have the seg fault ...
... but must of the time the resulting array IJINDEX is completely wrong ...
... and the original array IINDEX is arise with wrong value ...
even if it only an input tab ?

A+

Juan
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Sep 24, 2012 11:05 am    Post subject: Reply with quote

Can you send PGI Customer Support (trs@pgroup.com) the full source? I'd rather us have the full source just in case there are multiple issues here.

- Mat
Back to top
View user's profile
escj



Joined: 30 Sep 2009
Posts: 50
Location: Laboratoire d'Aérologie, Toulouse, FRANCE

PostPosted: Tue Sep 25, 2012 7:12 am    Post subject: Reply with quote

Hello Mat ...

The original code is 1 million fortran lines , more than 4000 fortran files ...
makefiles + 10 tests case ( and need a license agreement ... )

but I could put it in a tarball some where ...

A+

Juan
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
Goto page 1, 2  Next
Page 1 of 2

 
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