Re: Could this result in Array Distortion ??



"monir" <monirg@xxxxxxxxxxxx> wrote in message news:8ff69493-7eda-4715-b82f-7d59a51a6748@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

| Could someone please have a quick look at the following snippets of
| code and advise whether there is a potential problem.
|
| My concern is: (F77, g95)
| 1) In main: variable Vx is declared as 3D array (10,10,30), and is
| passed as argument to Sub Splint3d().
| Sub Splint3d() sees the 3D Vx array as ya(k,m,n) of size
| (k=nP,m=nR,n=nT), where nP<=10, nR<=10, nT<=30.
| (I believe it would be correct if: nP=10, nR=10, nT<=30 ??)
|
| 2) I'm also using similar arrangements with 2D arrays, and I suspect
| might be causing array distortions as well.
|
| 3) For the 1D arrays Xg, Rg, Tg, there shouldn't be a problem
| resulting from k<=10, m<=10, n<=30
|
| Your help would be greatly appreciated.
| Monir
|
|
| Program main_1
| implicit double precision (a-h,o-z)
| Parameter (maxP=10, maxR=10, maxT=30)
|
| dimension Xg(maxP), Rg(maxR), Tg(maxT)
| dimension Vx(maxP,maxR,maxT)
| ! ......................................................
| call Splint3d( Xg, Rg, Tg,
| 1 Vx,
| 2 nP,nR,nT,
| 3 P1,P2,P3,
| 4 VxPm)
| ! ......................................................
| end program main_1
|
| ! ************************************************************
| Subroutine Splint3d( x1a, x2a, x3a,
| 1 ya,
| 2 k, m, n,
| 3 x1, x2, x3,
| 4 Z)
| ! ************************************************************
| implicit double precision (a-h,o-z)
|
| dimension x1a(k),x2a(m),x3a(n)
| dimension ya(k,m,n)
| ! ......................................................
| return
| end subroutine splint3d

This is generally OK as long as you don't read in or compute
any values for Vx in the main program.

All values for a 2-D or 3-D array must be computed and/or used
in subroutines or in functions.

(the declaration stays in the main program, of course.)


.



Relevant Pages

  • Re: 3 Page Datasets on one Volume
    ... You don't have the potential problem of a burst of activity to the ... Also, for number 2, you can still have contention at the physical drive level ... RAID array of 8 146 GB volumes, the array contains about a terabyte of data. ...
    (bit.listserv.ibm-main)
  • Re: Could this result in Array Distortion ??
    ... code and advise whether there is a potential problem. ... Sub Splint3d() sees the 3D Vx array as yaof size ... Two issues in the Splint3d: ...
    (comp.lang.fortran)
  • Re: Could this result in Array Distortion ??
    ... code and advise whether there is a potential problem. ... My concern is: (F77, g95) ... variable Vx is declared as 3D array, and is ... Sub Splint3d() sees the 3D Vx array as yaof size ...
    (comp.lang.fortran)
  • Could this result in Array Distortion ??
    ... code and advise whether there is a potential problem. ... variable Vx is declared as 3D array, and is ... Sub Splint3d() sees the 3D Vx array as yaof size ... dimension Xg, Rg, Tg ...
    (comp.lang.fortran)
  • Re: Java maybe, some help with something puzzling
    ... two snippets of code. ... language. ... private int wrongCode(Integer num){ ... ArrayList is a List, not an array. ...
    (comp.lang.java.programmer)