Hi

I wrote my program in Fortran 90 and complied it successfully, but when I run it this error was appeared.

the array ENERGY has value -3689348814741910323 which is less than the lower bound of 1.

Does someone have an idea about this problem?

My code is something like this:

SUBROUTINE A (energy,....)

DOUBLE PRECISION, POINTER, DIMENSION(:,:), INTENT(IN) ::energy

…...

…....

END SUBROUTINE A

!-****************

DOUBLE PRECISION FUNCTION B(x,addMember)

CALL A(energy,...)

DOUBLE PRECISION, POINTER, DIMENSION(:,:) :: energy

ALLOCATE (energy(....))

…...

…...

DEALLOCATE (energy)

END FUNCTION B

!--******************

SUBROUTINE C(energy,....)

DOUBLE PRECISION, POINTER, DIMENSION(:,:), INTENT(IN) ::energy

…..

…..

END SUNROUTINE C

!-****************

DOUBLE PRECISION FUNCTION D(.....)

DOUBLE PRECISION, POINTER, DIMENSION(:,:) :: energy

ALLOCATE (energy(....))

CALL A(energy,...)

DEALLOCATE(energy)

END FUNCTION D

many thanks in advanced

Hana