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.
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.