Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: g77 segmentation fault possible error allocating large arrays
On Tue, 27 Jul 2004, blue mannequin wrote:

> Hello,
>
> Generally I have been using g77 when writing and debugging my programs,
> but a different compiler (f77 on an IRIX machine) when running them.
> My program compiles and runs fine using f77 on the IRIX.  It also compiles
> fine using g77 but crashes when running with a segmentation fault.  After
> some debugging it appears that the segmentation fault occurs after g77 has
> allocated about 10MB of memory for use in arrays during runtime.  If I
> change the size of the arrays used (my program integrates over a 2D grid)
> and so it is easy to reduce the number of points on the grid) the program
> will run fine using g77.  Also if I add arrays e.g. for temporary storage
> of intermediate results the program will crash with a segmentation fault
> at the start of the subroutine that allocates these new arrays (presuming
> they are large enough).

This sort of problem usually indicates a bug in your code -- have you used
ftncheck and the runtime array bounds checking?  f77 on Irix is very old
-- are you runing Irix 5.3?  I use g77 on linux but f90 on Irix, which
allows me to use the f90 capabilities that have been implemented in g77.

> Can anyone explain this since I prefer to use linux and g77 for
> debugging(with ddd using gdb) and also i work quite a lot from home (linux
).
>
> I am guessing at this point that the program compiled with g77 can't
> handle large arrays properly.  (I have over 256MB RAM on any machine I use
> g77 with at work or at home.)

10MB is _NOT_ a large array by current standards.  Unless you are using
g77 and linux of the same vintage as your f77 compiler the chances that
this is a g77 bug are very small.

--
George N. White III  <aa056@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia, Canada

Report this thread to moderator Post Follow-up to this message
Old Post
George N. White III
07-29-04 02:06 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Fortran archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:26 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.