View previous topic :: View next topic |
Author |
Message |
AsifArshid
Joined: 13 Mar 2013 Posts: 5
|
Posted: Fri Apr 05, 2013 7:05 am Post subject: Maximum limit of Array dimensions in silverFrost complier |
|
|
Dears,
Can anybody please confirm, if we can declare more then three dimensional arrays in Fortran 95 using Silver Frost (Plato) compiler ???? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Fri Apr 05, 2013 8:24 am Post subject: |
|
|
FTN95 conforms to the Fortran 95 Standard which (I think) allows up to 7 dimensions. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Fri Apr 05, 2013 12:46 pm Post subject: |
|
|
Oh, that's a bit limiting. What about the 11-dimensions necessary for the M-theory version of string theory [url](http://en.wikipedia.org/wiki/String_theory). [/url]
Drat, we'll just have to use 11 separate arrays of the same length.
Eddie |
|
Back to top |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Fri Apr 05, 2013 5:15 pm Post subject: |
|
|
haha Eddie I think the cold in your shed must be getting to you!
Unfortunately 11 arrays each of size 100 (say) can't store all the elements (100 X 100 .... X 100) = 100**11.
If you have 100 elements in each of 7 dimensions and store double precision values thats about 8*100**7/10**9 Gigabytes or about 800 thousand Gigabytes.
You limit the size of problems you can "model" when you go anywhere near 7 dimensions (as Im sure you know ). I think its a reasonable limit in the Standard. This going up to 15 in Fortran 2008 so we can worry about M theory then.
What I don't understand is why the OP needed to ask this when it would have been easier to compile two lines of code to find the limit.
Code: |
integer a(1,1,1,1,1,1,1) ! Add/remove dimension to find where a compile error occurs
end
|
I'm off to PC World to see if they have any punched cards in stock for my Fortran coding. _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Fri Apr 05, 2013 6:06 pm Post subject: |
|
|
The shed is the only warm place - must be global warming run riot that has caused this winter.
I stand corrected - but it was not intended to be serious. So we could have around 15 REAL*8s in each of 7 dimensions with FTN95. That 64-bit version is going to be needed real soon now, with the 128-bit version soon after ...
Last time I was in PC World they had card readers, but my cards needed to be folded, spindled or mutilated to get them in the little slot, and I didn't think that was wise.
Eddie |
|
Back to top |
|
 |
|