PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Debug error checking

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
Kolluru



Joined: 02 Nov 2006
Posts: 20

PostPosted: Tue Dec 18, 2012 9:50 am    Post subject: Debug error checking Reply with quote

Hi,
I have a program which used to work fine until I added some new set of routines. The segmentation fault occurs at a place where I have not touced the code. It happens in places like reading a file (which it reads ok and error happens in somewhere in the middle of the data set. The input data is a time vaying input file). I checked the new code several times by printing the code and reviewing it thoroughly. But the error still happens.
So, I got into debugging and captured the error location.

I go the following error during debugging

Signalled SIGSEGV at 0x3E5D472DBA, function _IO_un_link_internal, file interp.c
0x3E5D472DBA: 48 8B 40 68 movq 104(%rax),%rax

pgdbg> where

STACK TRACE:
#1 _IO_fclose@@GLIBC_2.2.5 address: 0x3E5D46611D
=> #0 _IO_un_link_internal file: interp.c address: 0x3E5D472DBA





Does this relate to closing a file?
This happens afer running the model for 3 months of simulation time. Ihave to run onr more month of simulation to complete a successful run.
Please let me know as how I can fix this problem.

Thanks
Venkat
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Dec 18, 2012 10:42 am    Post subject: Reply with quote

Hi Venkat,

Unfortunately, I would know what's wrong with your program. Most likely some memory is getting corrupted somewhere or the new code perturbed an existing error. Then again, the error is occurring when you close a file so it could be a problem with your file or file system.

Are you able to back out the new code? I'd start there and then add the routines back in one by one until the error occurs. You might also want to try using Valgrind (www.valgrind.org) to see if there are any memory issues.

- Mat
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
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