Subject: Pointers in FORTRAN under IRIX - problem solved !

From: <[email-masked]>
Date: Fri, 14 Oct 1994 19:20:59 -0500 (CDT)

CCL'ers,

   Many thanks to all who replied to my posting. Your answers helped me 
a lot to to detach my attention from the allocated memory SIZE problems, 
and find the real bug I created. 
Looks like posting to CCL is the best method of debugging ;-)
The bug was too early freeing of the allocated memory in one of my
procedures. The data in allocated memory still remained perfectly intact, 
but Unix thought this part of memory is free and the program was killed 
as soon as ANY statement using malloc call was executed (apparently disk
I/O statements belong to this class).

I have posted both detailed problem description and its solution to
comp.sys.sgi.bugs newsgroup.

   After removal of one fatal instruction the code runs perfectly and
the reward is ~30-fold increase in speed in the case of large inputs.
The final conclusion is that Fortran can succesfully use dynamic
memory allocation on its own (but it may not be available on all platforms).

Thanks again, especially to Peter Shenkin, whose suggestions were very
close to the real problem

---
Robert Fraczkiewicz
Department of Chemistry
University of Houston
[email-masked]