HvD: Variables should be declared before they are used, even if this usage is in defining other variables (e.g. array dimensions). The strangest thing is that as the subroutine has implicit none the compilers do not complain about undefined variables (instead the intel compiler complains about a type definition that is inconsistent with previous use, the gfortran compiler even compiles this code without complaints). Anyway, moving the declaration of dd before its usage in array declarations fixes the problem.
HvD: Variables should be declared before they are used, even if this usage is
in defining other variables (e.g. array dimensions). The strangest thing is that
as the subroutine has implicit none the compilers do not complain about
undefined variables (instead the intel compiler complains about a type
definition that is inconsistent with previous use, the gfortran compiler even
compiles this code without complaints).
Anyway, moving the declaration of dd before its usage in array declarations
fixes the problem.





rangsimanketkaew/NWChem