Array sizes on Sun f77 compiler
Author |
Message |
Madhusudan Sing #1 / 6
|
 Array sizes on Sun f77 compiler
Hi I have a large problem (high array sizes) and would like to increase it beyond its current limit. Currently, I have array sizes around 120000 and 400x500. Whenever, I try to compile some code with a bigger array size, I get an error. Is there some option to the Sun OS 5.8 f77 compiler that can circumvent this limitation ? Thanks, Madhusudan Singh.
|
Sun, 23 May 2004 12:59:23 GMT |
|
 |
Dr Ivan D. Re #2 / 6
|
 Array sizes on Sun f77 compiler
Quote: > I have a large problem (high array sizes) and would like to >increase it beyond its current limit. > Currently, I have array sizes around 120000 and 400x500. Whenever, >I try to compile some code with a bigger array size, I get an error. Is
^^^^^^^^^^^^^^ Quote: >there some option to the Sun OS 5.8 f77 compiler that can circumvent this >limitation ?
It always helpt to give _exactly_ what the error message is. Do you get the error while compiling, or when trying to run the programme? The array sizes you cite don't seem excessive to me, but you may be running up against a system limit (e.g. stack size) if it's a run-time error. --
|
Sun, 23 May 2004 20:06:51 GMT |
|
 |
Madhusudan Sing #3 / 6
|
 Array sizes on Sun f77 compiler
Quote: > > I have a large problem (high array sizes) and would like to > >increase it beyond its current limit. > > Currently, I have array sizes around 120000 and 400x500. Whenever, > >I try to compile some code with a bigger array size, I get an error. Is > ^^^^^^^^^^^^^^ > >there some option to the Sun OS 5.8 f77 compiler that can circumvent this > >limitation ? > It always helpt to give _exactly_ what the error message is. Do > you get the error while compiling, or when trying to run the programme? > The array sizes you cite don't seem excessive to me, but you may be running > up against a system limit (e.g. stack size) if it's a run-time error.
It is a compile time error ~ "Array dimensions exceed maximum array size".
|
Mon, 24 May 2004 00:23:42 GMT |
|
 |
Richard Main #4 / 6
|
 Array sizes on Sun f77 compiler
Quote:
> > Currently, I have array sizes around 120000 and 400x500. Whenever, > >I try to compile some code with a bigger array size, I get an error. Is > ^^^^^^^^^^^^^^ > >there some option to the Sun OS 5.8 f77 compiler that can circumvent this > >limitation ? > It always helpt to give _exactly_ what the error message is....
I'll also add that Sun compiler versions are not linked to operating system versions. "Sun OS 5.8 f77" does very little to tell what compiler you are using. There are quite a lot of f77 compilers that will run on that operating system version. Assuming that you are talking about Sun's f77 compiler (which does seem a pretty easy guess - I can make that one, although it is far from the only possibility), there are still a pretty wide range of possible SUn f77 compiler versions. As with Ivan, I don't have enough data to give a constructive answer. The array sizes you mention aren't immediately bring ideas to mind. For example, they aren't big enough to make me think of 2 gb limits, where lots of issues come into play. But there can be any number of more modest limits - so many that it isn't close to worth either your or my time for me to try to list everything I can think of. (I could probably spend an hour listing possibilities and still fail to hit it). For one of the more obscure examples, some older versions of the Sun compiler had pretty modest default limits on I/O record sizes. If you were writing whole arrays to single records, you could easily hit those limits depending on array sizes. I don't really think that is likely to be your problem - I just list it as an illustration of how far afield I could go in speculating without more specific data. -- Richard Maine | Good judgment comes from experience; email: my last name at host.domain | experience comes from bad judgment. host: altair, domain: dfrc.nasa.gov | -- Mark Twain
|
Mon, 24 May 2004 00:25:51 GMT |
|
 |
Richard Main #5 / 6
|
 Array sizes on Sun f77 compiler
Quote:
> > > Currently, I have array sizes around 120000 and 400x500. Whenever, > > >I try to compile some code with a bigger array size,... > It is a compile time error ~ "Array dimensions exceed maximum array size".
I bet there are some arrays somewhere bigger than you are saying. Perhaps you have higher rank arrays with these as one or two of the dimensions? I don't have SunOS 5.8 any machines around here, but I have an old (1996) version (4.2) of Sun's f77 compiler on a SunOS 5.6 system. The following code compiles without complaint. program big double complex x(120000), y(400,500) read (*,*) x, y write (*,*) x,y end This was about the simplest complete program that I could think of using such array sizes. I used the non-standard double complex as the largest type that the compiler probably supports (not counting character), and thus the type likely to hit any limits first. (No, I didn't run the thing and laboriously type in enough numbers - but you did say your problem was at compile time). If I change the code to program big parameter (n=700) double complex x(120000,n), y(400,500,n) read (*,*) x, y write (*,*) x,y end then I get the error "big.f", line 3: Error: array "y" has too many elements works fine with n=600. With n=700, the number of elements in y is 400*500*700 = 140 million. Each double complex element takes 16 bytes, so the total array size is just over 2 billion bytes, which is a boundary at which I'd expect problems with many compilers. I'm using arrays a factor of 700 larger than you cite, I'm seeing a different error message than you cite, I'm using a different operating system version than you cite, I'm probably using a different compiler version than you are, and I'm certainly using different code than you are (the above would be somewhat "unusual" as a real application). So I'll freely grant that I may well be far missing the real problem here. It's a pretty big leap, but your cited message does seem to point in this direction. I think Sun's newer compilers (which you are probably using - it's sure hard to imagine that you'd be using one older than 4.2) may support options for arrays larger than 2 gb, though there can be many issues with that. Check the compiler docs. *HOWEVER*, that's a pretty big array. You may run into lots of other complications if you are using arrays that big. Sometimes, you have to. But I'd sure want to understand why my program was using that big an array before starting down that path. You only mentioned arrays a factor of several hundred smaller. Perhaps the particular compiler version you are using has some other lower limit that I'm not picking up on. (Seeing the code along with the message might help there). But if you really were off by a factor of several hundred in understanding what size arrays the program is using, then I suspect some time invested in studying the program might be worthwhile. -- Richard Maine | Good judgment comes from experience; email: my last name at host.domain | experience comes from bad judgment. host: altair, domain: dfrc.nasa.gov | -- Mark Twain
|
Mon, 24 May 2004 01:46:05 GMT |
|
 |
Robert Corbe #6 / 6
|
 Array sizes on Sun f77 compiler
Quote:
> Hi > I have a large problem (high array sizes) and would like to > increase it beyond its current limit. > Currently, I have array sizes around 120000 and 400x500. Whenever, > I try to compile some code with a bigger array size, I get an error. Is > there some option to the Sun OS 5.8 f77 compiler that can circumvent this > limitation ? > Thanks, > Madhusudan Singh.
If you are running on a machine that supports 64-bit addressing (an UltraSPARC based machine) and using a reasonably recent version of f77 (less than three years old), try compiling with the option -xarch=v9. Sincerely, Bob Corbett
|
Mon, 24 May 2004 14:54:02 GMT |
|
|
|