Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem compiling arrays

Status
Not open for further replies.

CCONDE

Technical User
Nov 5, 2020
1
AR
Dear,
Please I would like to ask for your help with a problem when compiling arrays.
I have a code like the following:

INTEGER, DIMENSION:)), ALLOCATABLE :: r
INTEGER, DIMENSION:)), ALLOCATABLE :: p (The size of r and p depends on some computations within the code)
INTEGER, DIMENSION(0:5,0:5) :: t = RESHAPE([.....], [6,6])
.
.
.
DO i = 1, 3
FORALL (k = 1:6)
ss = SUM(t(r(i+1), p(k)))
END FORALL
END DO

When I try to compile the code I get this error: "Error: 'array' argument of 'sum' intrinsic at (1) must be an array"
What could I be doing wrongly? The compiler I use is GFortran version 8 for Windows 64 bits.

Many thanks for the help.
 
Which line is this on and where is the (1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top