Re: text-2-binary I/O switch issue



Jan Vorbrüggen wrote:


How are the arrays allocated - at compile-time, dynamically with ALLOCATE or as automatic arrays? Sound like the usual problem of large arrays being allocated on a stack that's too small.


The program is in Fortran77, the arrays are allocated as follows: Main program reads data size from parameter file and passes the dimensions to the computational routine at the top of which arrays with the corresponding dimensions are allocated - is this "compile time" ? How do I check where the program crashes - it seems to be very early on, before/during the reading of the in-data ...


Also, one particular thing that struck me is that I store a bunch of arrays in unformatted, sequential: by liberally doing a write(1,*)

But the * indicates a list-directed write, which is a case of a FORMATTED
write! You want just a write (1) ...


Yeah, that was a typo - I use write(1) and the file size is so bloated, any ideas why?
.



Relevant Pages

  • Re: heap allocation of arrays
    ... to force all arrays to be allocated on the heap. ... the stack would be replaced with pointers on the stack. ... heap is easier to detect than failure to allocate space on the ...
    (comp.lang.fortran)
  • Re: ALLOCATABLE arrays
    ... >> If try to create a very large array on the stack and you do not have enough ... > Allocatable arrays are allocated on the heap. ... > Automatic arrays are always allocated on the stack. ... why a compiler couldn't allocate them on the stack. ...
    (comp.lang.fortran)
  • Re: heap allocation of arrays
    ... to force all arrays to be allocated on the heap. ... the stack would be replaced with pointers on the stack. ... heap is easier to detect than failure to allocate space on the ...
    (comp.lang.fortran)
  • Re: heap allocation of arrays
    ... to force all arrays to be allocated on the heap. ... the stack would be replaced with pointers on the stack. ... heap is easier to detect than failure to allocate space on the ...
    (comp.lang.fortran)
  • Re: Fortran vs. C++ : Which is best to choose now i
    ... yes I've benchmarked allocatable against automatic arrays. ... allocate ) ... alloc sum= 3.7499104E+07 cpu= 12.17751 ...
    (comp.lang.fortran)