[Beowulf] large array to run

Brian Dobbins bdobbins at gmail.com
Thu Dec 13 15:51:27 EST 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


!DSPAM:4761c0a2208721691722815!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.clustermonkey.net/pipermail/beowulf/attachments/20071213/86fea093/attachment-0001.html>
-------------- next part --------------
_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf


!DSPAM:4761c0a2208721691722815!


More information about the Beowulf mailing list