Re: How many arrays can you open with Fortran90?

xiaoxiao2021-03-06  119

Sender: peach1 (worry), letter area: Numcomp Title: Re: How many arrays can you open with Fortran90? Sending station: BBS Shuimu Tsinghua Station (Sun Aug 15 13:21:39 2004), in the station

This program can detect your machine itself can have a large number of large groups. Do you see it?

Program Tarray Implicit None Integer :: Size, Error = 0 Integer, Parameter :: One_MB = 1024 * 1024 Character, Allocatable :: A (:) Write (*, *) Size, Error Open (Unit = 9, File = 'Result .txt ', status =' unknown ')

Do while (.true.) size = size one_mb allocate (a (size), stat = error) IF (error.ne.0) THEN EXIT END IF WRITE (9, "('Allocate', I10, 'Byte' ) ") Size Write (9," (F10.2, 'MB Used') ")") Real (size) / real (one_mb) Write (9, "(F10.2, 'MW Used')") ") Real (Size ) / (one_mb) * 16.0) DEAALLOCATE (A) End do stop [mentioned in the masterpiece of HHSY (River Sea Demon):]: How many arrays can you open with Fortran90? I use 1.5G memory machine, one-dimensional single-precision real array is open to 380 million. In theory, it should be to open to 2.1 billion, that is, 2 ^ 32. Is there any other friend experienced this?

-

※ Source: · BBS Shuimu Tsinghua Station Smth.org · [from: 166.111.26. *]

转载请注明原文地址:https://www.9cbs.com/read-126648.html

New Post(0)