Silverfrost Forums

Welcome to our forums

Maximum limit of Array dimensions in silverFrost complier

5 Apr 2013 6:05 #11978

Dears,

Can anybody please confirm, if we can declare more then three dimensional arrays in Fortran 95 using Silver Frost (Plato) compiler ????

5 Apr 2013 7:24 #11980

FTN95 conforms to the Fortran 95 Standard which (I think) allows up to 7 dimensions.

5 Apr 2013 11:46 #11981

Oh, that's a bit limiting. What about the 11-dimensions necessary for the M-theory version of string theory (http://en.wikipedia.org/wiki/String_theory). Drat, we'll just have to use 11 separate arrays of the same length.

Eddie

5 Apr 2013 4:15 #11982

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*1007/109 Gigabytes or about 800 thousand Gigabytes. :roll:

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.

  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.

5 Apr 2013 5:06 #11983

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

Please login to reply.