Size of Largest Array? 
Author Message
 Size of Largest Array?

Hey Folks,

Can anybody tell me the size of the largest array I can dimension?
I am using Lahey fortran 90.  I was able to dimension and populate
4 arrays, each with 100,000,000 elements.  When I added another, I
received an error stating that the compiled executable was not a
legal Win32 application.

I get the idea that I can only use 2 gigs of memory.  I have a machine
with 6 gigs of memory (running Win 2000 Advanced Server).  I want to
use as much as possible.  Can somebody fill me in if there is a switch
I can use when compiling to let the program use more memory?

Thanks,

TLowe
WSFR, UGA



Wed, 19 Jul 2006 02:06:30 GMT  
 Size of Largest Array?

Quote:

> Hey Folks,

> Can anybody tell me the size of the largest array I can dimension?
> I am using Lahey FORTRAN 90.  I was able to dimension and populate
> 4 arrays, each with 100,000,000 elements.  When I added another, I
> received an error stating that the compiled executable was not a
> legal Win32 application.

> I get the idea that I can only use 2 gigs of memory.  I have a machine
> with 6 gigs of memory (running Win 2000 Advanced Server).  I want to
> use as much as possible.  Can somebody fill me in if there is a switch
> I can use when compiling to let the program use more memory?

Sorry, not my platform so I can't directly help. However, might I ask
what you are putting in matrices that large? The reason I ask is that
many very large matrices are actually sparse (ie they have an awful
lot of zero entries) in which case there are storage mechanisms which
use a lot less memory and make processing much faster.

Regards,

David



Wed, 19 Jul 2006 02:54:53 GMT  
 Size of Largest Array?
T:  For arrays this large to be part of the object code is not reasonable. To
use such large arrays use Allocate(able) arrays. For example:
see Metcalf's example at: http://ftp.cac.psu.edu/pub/ger/fortran/hdk/dyng.f90
or a somewhat cruder example:

        integer ierror, MB, na, nb
        double precision a
        allocatable a
        dimension a(:,:)
        print*, "How many MB to Allocate?"
        read(unit=*,fmt=*) na
        MB=1024**2
!---DOUBLE PRECISION array assumed to have 8-byte elements.
        nb=MB/8
        allocate( a(na,nb), stat=ierror)
        if (ierror.ne.0) then
          print *, "?? Cannot allocate',na,'MB of virtual storage."
          print *, "At least this much free disk space for swap file",   &
                        " is needed."
          stop
        endif
!---Initialize all elements of that array (for example's sake here).
        call anysub(a, na,nb)
!---Deallocate the array and quit.
        deallocate( a)
        print *, "Double Presion Array of dimension (",na,",",nb,")"
        print *, "was succesfully allocated, used, and deallocated."
        end
   subroutine anysub(a, n1,n2)
        integer i,j,n1,n2
        double precision a(n1,n2)
!---Access the array in row major order - by columns - (least paging).
        do  j=1,n2
          do  i=1,n1
           a(i,j)=i+j
          end do
       end do
        end

Skip Knoble, Penn State


-|Hey Folks,
-|
-|Can anybody tell me the size of the largest array I can dimension?
-|I am using Lahey FORTRAN 90.  I was able to dimension and populate
-|4 arrays, each with 100,000,000 elements.  When I added another, I
-|received an error stating that the compiled executable was not a
-|legal Win32 application.
-|
-|I get the idea that I can only use 2 gigs of memory.  I have a machine
-|with 6 gigs of memory (running Win 2000 Advanced Server).  I want to
-|use as much as possible.  Can somebody fill me in if there is a switch
-|I can use when compiling to let the program use more memory?
-|
-|Thanks,
-|
-|TLowe
-|WSFR, UGA

   Herman D. (Skip) Knoble, Research Associate
   (a computing professional for 38 years)

   Web: http://www.personal.psu.edu/hdk
   Penn State Information Technology Services
    Academic Services and Emerging Technologies
     Graduate Education and Research Services
   Penn State University
     214C Computer Building
     University Park, PA 16802-21013
   Phone:+1 814 865-0818   Fax:+1 814 863-7049



Wed, 19 Jul 2006 02:56:27 GMT  
 Size of Largest Array?

Quote:
> I get the idea that I can only use 2 gigs of memory.  I have a machine
> with 6 gigs of memory (running Win 2000 Advanced Server).

Do not confuse the amount of physical RAM you have (6G) with the amount of
virtual address space you can use (2G typically).

With 32-bit Windows, 2GB is the limit for process address space.  With your
version of Windows, you can add a /3GB switch to boot.ini that increases
this to 3GB, but that's as far as it goes.  I can't say whether the
particular compiler you use can properly address arrays that go across the
2GB boundary - careful attention needs to have been paid to address
arithmetic in order for this to work.

More RAM means that more processes can use lots of virtual memory without
paging to the pagefile, but it does not increase the virtual address space
size.

--
Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

Intel Fortran Support:
  http://developer.intel.com/software/products/support/

User communities for Intel Fortran and Visual Fortran:
  http://softwareforums.intel.com/



Wed, 19 Jul 2006 02:59:07 GMT  
 Size of Largest Array?


Quote:
> Hey Folks,

> Can anybody tell me the size of the largest array I can dimension?
> I am using Lahey FORTRAN 90.  I was able to dimension and populate
> 4 arrays, each with 100,000,000 elements.  When I added another, I
> received an error stating that the compiled executable was not a
> legal Win32 application.

> I get the idea that I can only use 2 gigs of memory.  I have a machine
> with 6 gigs of memory (running Win 2000 Advanced Server).  I want to
> use as much as possible.  Can somebody fill me in if there is a switch
> I can use when compiling to let the program use more memory?

That's a typical limitation for 32-bit Fortran compilers.  Any production
Windows OS which supports 4GB or more is using the PAE hardware option,
which would impose serious performance problems if used directly by a
compiler.  It's more likely useful to support multi-programming.   Windows
AS is not designed as a Fortran platform.
The old PAE model is on the way out, with compilers able to support 40-bit
physical/48-bit virtual addressing in a more direct way on the new models.
Many of those compilers retain a limitation of 2GB on the size of individual
arrays and COMMON blocks, even when building applications to run in "64-bit"
mode.


Wed, 19 Jul 2006 05:54:16 GMT  
 Size of Largest Array?

Quote:
> Do not confuse the amount of physical RAM you have (6G) with the amount of
> virtual address space you can use (2G typically).

And quite soon after that - should you, for instance, be using the mythical
Win64 running on a 64-bit processor - your default integer used as an array
index might run out of steam addressing all those array elements.

        Jan



Fri, 21 Jul 2006 17:02:01 GMT  
 Size of Largest Array?
Thanks ALL for the information.

If I may ask one more thing without starting a war
amongst the viewers of this board...

Mr. Prince suggested that Windows advanced server is not
designed as a FORTRAN platform.  What is the best (or at
least the standard) platform to develop fortran programs on?

Thanks again.

TLowe



Sun, 23 Jul 2006 04:04:54 GMT  
 Size of Largest Array?

--- 8< 8< 8< ------------

Quote:
> Mr. Prince suggested that Windows advanced server is not
> designed as a FORTRAN platform.  What is the best (or at
> least the standard) platform to develop fortran programs on?

I do not know if there is a standard platform for FORTRAN development but
to provide you with some input I can tell you that I use the following
"equipment" (for FORTRAN 90 programming):

At home:
Linux with Intel's FORTRAN compiler.

At university:
SUN Blade, Ultra-4, and Fire servers/computers with SunOS 5.7-5.9 and
SUN's FORTRAN compiler.

An SGI server/computer with IRIX 6.5 and a MIPSpro compiler. (Need a
compiler upgrade in order to get my OpenMP 2.0 directives working though).

Best regards,
Claus

--
Stud. Polyt. Claus Pedersen,
Dept. of Communication Technology, Inst. of Electronic Systems,
Aalborg University, Aalborg, Denmark.



Sun, 23 Jul 2006 04:41:09 GMT  
 Size of Largest Array?

Quote:

>Mr. Prince suggested that Windows advanced server is not
>designed as a FORTRAN platform.  What is the best (or at
>least the standard) platform to develop fortran programs on?

Details count. He said that an OS which limits individual processes to
2 or 3 gbytes of RAM isn't as useful as an OS which allows unlimited
memory sizes. If you want real large memory without jumping through
any hoops, there are quite a few choices, ranging from traditional
Unix server vendors (Sun, HP, IBM, etc etc) down to 64-bit Linux on
the AMD Opteron or Athlon64. Windows64 on Itanium and the forthcoming
Windows64 for Opteron also fall into this category.

-- greg



Sun, 23 Jul 2006 05:14:19 GMT  
 Size of Largest Array?

Quote:

> If I may ask one more thing without starting a war
> amongst the viewers of this board...

> Mr. Prince suggested that Windows advanced server is not
> designed as a FORTRAN platform.  What is the best (or at
> least the standard) platform to develop fortran programs on?

You aren't going to get a consensus on that.  It is one of
those "religious" issues that is prone to flame wars.  The
only answer you will find reasonably wide agreement on is that
there is no single best choice - that it depends on the
application, the environment, and the people involved.

Some people will disagree with Tim and say that Windows advanced
server is a great Fortran platform.  (I'm not one of those people, but
I know they exist).  Linux boxes work fine, as does OS-X.  Traditional
Unix boxes like Sun/HP/SGI/IBM.  Big iron like Cray/Nec/Fuji/IBM-SP
(or whatever it is that the big IBM machines are these days - I'm not
in touch with that world).  (If you've got the money for the big iron,
you can afford professional consultants instead of counting on clf for
advice).

If this was slashdot, I'd be almost obligated to suggest a
Beowolf cluster, which indeed is an excellent choice for
some applications (but not for others).

Personally, I'm fond of Linux boxes for the price performance,
and Mac OS-X for nicely integrated systems.  But I'm not going to
tell you those are the best choices for everyone, because I
know that they aren't.

--
Richard Maine                       |  Good judgment comes from experience;
email: my first.last at org.domain  |  experience comes from bad judgment.
org: nasa, domain: gov              |        -- Mark Twain



Sun, 23 Jul 2006 04:53:17 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Problem taking 'Size of large array (gnat)

2. Size(ASSUMED Size ARRAY)

3. Array Selection Start / Array Selection Size

4. Numerical Python array math with different sized arrays

5. Variable Size arrays Was: Indeterminate arrays??

6. Array intrinsics with zero-size array argument

7. Array performance degrades as array size increases

8. newbie: Why such large application sizes?

9. Size of memofield - cant make it larger than 255 (CW5 PE)

10. How to browse a large size of data in Waveform Graph

11. File size and large files

12. Ruby and Large File sizes

 

 
Powered by phpBB® Forum Software