<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>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?
</div></blockquote><div><br>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.
<br></div></div><br> Fortran <i>does</i> 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. <br><br> Cheers,<br> - Brian<br>