TotalView Fortran Serial Exercise 2 - Assignment

Assignment

In this assignment, use TotalView to locate an error in the following program. The program is crashing with a segmentation fault.

 PROGRAM SEG

      DOUBLE PRECISION VEC(10)
      INTEGER I

      DO 10 I=1,10
        VEC(I) = 2.D0*I
10    CONTINUE

      I=1000000

      PRINT *, VEC(I)
      PRINT *, 'All Done'

      STOP
      END