[Beowulf] g77 limits...

Robert G. Brown rgb at phy.duke.edu
Thu Feb 23 11:43:36 PST 2006


On Thu, 23 Feb 2006, Toon Moene wrote:

> The following code works on my 0.5 Gbyte RAM / 1.5 Gbyte SWAP Athlon 64 
> laptop with gfortran (the new Fortran 95 GNU Fortran), albeit horribly 
> slowly:

Dutifully saved.  We're talking about getting one very large memory
machine -- maybe 16 GB -- to be able to prototype and resolve these very
issues.

    Thanks!

       rgb

>
>      INTEGER*8 I, NSIZE
>      PARAMETER (NSIZE = 100 000 000_8)
>      DIMENSION A(3*NSIZE), A1(NSIZE), A2(NSIZE), A3(NSIZE)
>      EQUIVALENCE (A(        1), A1(1))
>      EQUIVALENCE (A(  NSIZE+1), A2(1))
>      EQUIVALENCE (A(2*NSIZE+1), A3(1))
>      DO I = 1, NSIZE
>         A1(I) = 0.0
>         A2(I) = 0.0
>         A3(I) = 0.0
>      ENDDO
>      DO I = 1, 3*NSIZE
>         A(I) = I
>      ENDDO
>      DO I = 1, NSIZE
>         IF (A1(I) .NE. A(        I)) CALL ABORT
>         IF (A2(I) .NE. A(  NSIZE+I)) CALL ABORT
>         IF (A3(I) .NE. A(2*NSIZE+I)) CALL ABORT
>      ENDDO
>      DO I = 1, NSIZE
>         A1(I) = 0.0
>         A2(I) = 0.0
>         A3(I) = 0.0
>      ENDDO
>      CALL SUB(A, 3*NSIZE)
>      DO I = 1, NSIZE
>         IF (A1(I) .NE. A(        I)) CALL ABORT
>         IF (A2(I) .NE. A(  NSIZE+I)) CALL ABORT
>         IF (A3(I) .NE. A(2*NSIZE+I)) CALL ABORT
>      ENDDO
>      END
>      SUBROUTINE SUB(A, N)
>      DIMENSION A(N)
>      DO I = 1, N
>         A(I) = I
>      ENDDO
>      END
>
> This is the compiler that will be in GCC 4.1 (which will be out in about a 
> week).  Perhaps you can jazz this up by increasing NSIZE so that you go over 
> the 4 Gbyte limit on a machine with enough memory ...
>
> Hope this helps,
>
>

-- 
Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu





More information about the Beowulf mailing list