Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* fortran error?
@ 1998-03-12  5:00 Armin Leuprecht
  1998-03-12  5:00 ` robin
  1998-03-16  5:00 ` Steve Lionel
  0 siblings, 2 replies; 32+ messages in thread
From: Armin Leuprecht @ 1998-03-12  5:00 UTC (permalink / raw)



Dynamic allocation using DEC Fortran is working in general.
For some strange reason sometimes a programm like the following
will crash with a segmentation fault while allocating the memory
in line 3 of the subroutine.
Though I couldn't reproduce the error with this little program
(not even for large values, i.e. more than physical installed
memory) I cannot locate another source of failure in my application.

	SUBROUTINE sub(n)
	INTEGER n
	REAL*4  a(n)
	END

	PROGRAM test
	INTEGER n
	n = 1234
	CALL sub(n)
	END

My application is of course more complex so that I can't post it
as whole. The subroutine looks like this:

	SUBROUTINE name (n, a, x, b)

	INTEGER n
	REAL    a(*), x(*), b(*)

c *** local variables

	REAL p(n)
	REAL r(n)
	REAL s(n)
	REAL t(n)
	REAL z(n)

...

in fact there are 10 such arrays dimensioned with n, and regardless of
the order of variables, the program crashes while allocating memory for
the sixth array.
So it seems to depend on the amount of requested memory.

We had no problem with that subroutine before the operating system
upgrade from V2.1 to V3.2

My OS:       OSF1 V3.2 148 alpha
My Compiler: DEC Fortran for OSF/1 AXP Systems version T3.6


thanks for any advice
Armin



^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~1998-03-24  5:00 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-12  5:00 fortran error? Armin Leuprecht
1998-03-12  5:00 ` robin
1998-03-16  5:00 ` Steve Lionel
1998-03-17  5:00   ` Peter Shenkin
1998-03-17  5:00     ` Craig Burley
1998-03-17  5:00       ` Peter Shenkin
1998-03-18  5:00         ` Toon Moene
1998-03-18  5:00           ` Jeff Drummond
1998-03-19  5:00           ` Peter Shenkin
1998-03-18  5:00         ` Craig Burley
1998-03-19  5:00           ` Peter Shenkin
1998-03-19  5:00             ` Craig Burley
1998-03-20  5:00               ` Peter Shenkin
1998-03-20  5:00                 ` Craig Burley
1998-03-20  5:00                   ` Peter Shenkin
1998-03-23  5:00                     ` Craig Burley
1998-03-23  5:00                       ` Summary (I hope) failure of automatic allocation; was, " Peter Shenkin
1998-03-24  5:00                         ` Craig Burley
1998-03-23  5:00                       ` Craig Burley
1998-03-23  5:00                         ` Peter Shenkin
1998-03-24  5:00                           ` Craig Burley
1998-03-24  5:00                             ` Nick Maclaren
1998-03-20  5:00                   ` Nick Maclaren
1998-03-20  5:00                     ` Richard Maine
1998-03-20  5:00                 ` Richard Maine
1998-03-20  5:00               ` Nick Maclaren
1998-03-20  5:00             ` Dick Hendrickson
1998-03-20  5:00               ` Peter Shenkin
1998-03-20  5:00               ` Craig Burley
1998-03-20  5:00                 ` Peter Shenkin
1998-03-23  5:00                   ` Craig Burley
1998-03-18  5:00     ` Steve Lionel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox