PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

program seg faults unless compiled with -g
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
BenjaminMiller66516



Joined: 08 Sep 2009
Posts: 2

PostPosted: Tue Mar 30, 2010 12:39 pm    Post subject: program seg faults unless compiled with -g Reply with quote

I've been part of a Fortran95 code conversion for a large molecular dynamics program; the code compiles and completes test cases for both GCC/gfortran and Intel/ifort compilers. With PGI/pgf95 (including 10.3), code compiled without -g (at any optimization level) fails most of the test cases with segmentation violations, which seem to come from routine __hpf_bcopysl

Because the error does not occur when compiled with -g, it has been difficult to track down any further. Suggestions are appreciated, as we'd like to continue to support the PGI compiler with the program installation procedures.
Back to top
View user's profile
Malcolm Bibby



Joined: 16 Nov 2009
Posts: 33

PostPosted: Tue Mar 30, 2010 1:04 pm    Post subject: Reply with quote

For what it is worth, I have a similar problem, on a large body of code that I am converting from Intel to PGI. In my case, -gopt, with O0 and O1 seem fine, it is when I use -gopt and O2 that I get the segmentatiion fault.

Strategically placed write statements make the problem disappear, but that is not a practical solution.

Malcolm Bibby
Back to top
View user's profile
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Tue Mar 30, 2010 1:14 pm    Post subject: Reply with quote

this happened to me once also.
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Mar 30, 2010 3:21 pm    Post subject: Reply with quote

Hi BenjaminMiller66516,

"__hpf_bcopysl" is a runtime routine that performs strided bcopy. Most likely one or more of the arrays being copied is getting corrupted somehow.

Would it be possible for me to download the code and investigate the error?

Thanks,
Mat
Back to top
View user's profile
BenjaminMiller66516



Joined: 08 Sep 2009
Posts: 2

PostPosted: Wed Mar 31, 2010 10:28 am    Post subject: Reply with quote

Not directly, as there are some license issues and commercial entanglements. We can probably arrange access to the source, likely subject to a formal non-disclosure agreement. We have a PGI subscription; should we file a support request to facilitate this?
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling 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