[Beowulf] large array to run

Brian Dobbins bdobbins at gmail.com
Thu Dec 13 12:51:27 PST 2007


In C I'd get a return value from malloc (like, NULL in this case, assuming
> the memory allocation failed). How does that work in modern fortran?
>

If it's a static array, it'll just crash without even 'starting' simply
because not enough memory is available.  If it's using the ALLOCATE command
in F90, I believe it stops unless the 'STAT' (status) option is provided and
is greater than 0.

  Fortran *does* allow you to specify weird bounds, such as (10:12), and
even though the 'upper bound' in this example is the number twelve, the
number of elements is only 3 (with indices of 10, 11 and 12), but that
doesn't seem to be the case with the original poster's code, so the array
does seem to be allocating 3.6TB, assuming integers are 4 bytes.

  Cheers,
  - Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20071213/86fea093/attachment.html>


More information about the Beowulf mailing list