I am a bit perplexed that I am getting an error for something that has so often worked for me in the past. In a subroutine that I have written, I have an integer that when a value is specified, it creates the error mentioned in the subject heading. I declare "implicit none" in both the parent program and the subroutine, and declare the variable (in this case KOUNT, I have also tried using K) an integer. The program compiles normally and runs until the PAUSE right before KOUNT=1. Then I get the error, without KOUNT being printed. I have experimented with different names for KOUNT. Also, KOUNT is an index for the arrays RESAVG and ERRAVG, although KOUNT is not expected to reach 100001. I have experiemented with smaller sizes of RESAVG and ERRAVG, and the program still has the error. Initially, I had KOUNT=0, and thought that may be the problem, even though I have written other programs that successfully ran where that worked without issue. Thoughts?
DOUBLE PRECISION RESAVG(100001),ERRAVG(100001)
PRINT *, RESA
PRINT *, CTOL
c Establishes the convergence tolerance for the matrix
PRINT *, KOUNT