fork(1) download
  1. PROGRAM HALLO3B
  2. ! IMPLICIT NONE
  3. PARAMETER(n=6)
  4. INTEGER::i,j
  5. DOUBLE PRECISION DA(n,n),A(n,n),X(n,n),Z(n,n),S(n),E,max
  6. DO i=1,n
  7. DO j=1,n
  8. READ(*,*) A(i,j)
  9. END DO
  10. END DO
  11. CALL HALLO3(A,X)
  12. CALL HALLO3(X,Z)
  13. DO i=1,n
  14. DO j=1,n
  15. DA(i,j)=Z(i,j)-A(i,j)
  16. END DO
  17. END DO
  18. DO i=1,n
  19. S(i)=0
  20. DO j=1,n
  21. S(i)=S(i)+DABS(DA(i,j))
  22. END DO
  23. END DO
  24. max=S(1)
  25. DO i=2,n
  26. IF (S(i)>max) THEN
  27. max=S(i)
  28. END IF
  29. E=max
  30. END
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. SUBROUTINE HALLO3(A,X)
  38. PARAMETER(n=6)
  39. INTEGER::i,j,k,IOPT,IREG,ND,MON(n,n)
  40. DOUBLE PRECISION A(n,n),AI(n,n+1),B(n),X(n,n),D
  41. ND=n
  42. DO i=1,n
  43. DO j=1,n
  44. IF (i==j) THEN
  45. MON(i,j)=1
  46. ELSE
  47. MON(i,j)=0
  48. END IF
  49. AI(i,j)=A(i,j)
  50. END DO
  51. END DO
  52. IOPT=1
  53. CALL DGAUSS(ND,n,A,B,IOPT,D,IREG)
  54. IOPT=2
  55. DO k=1,n
  56. DO i=1,n
  57. AI(i,n+1)=MON(i,k)
  58. END DO
  59. CALL DGAUSS(ND,n,A,B,IOPT,D,IREG)
  60. DO i=1,n
  61. X(i,k)=B(i)
  62. END DO
  63. END DO
  64. END
  65.  
  66.  
  67.  
  68.  
  69. SUBROUTINE DGAUSS(ND,N,A,B,IOPT,D,IREG)
  70. DOUBLE PRECISION A,B,D,S,EE
  71. DIMENSION A(ND,N),B(ND),L(ND)
  72. EE=1.D-12
  73. IREG=1
  74. NM=N-1
  75. IF(IOPT.EQ.2) GO TO 60
  76.  
  77. D=1.D0
  78. DO 10 K=1,NM
  79. KP=K+1
  80. M=K
  81. DO 20 I=KP,N
  82. IF(DABS(A(I,K)).GT.DABS(A(M,K))) M=I
  83. 20 CONTINUE
  84. L(K)=M
  85. D=D*A(M,K)
  86. IF(DABS(A(M,K)).LE.EE) GO TO 100
  87. IF(M.EQ.K) GO TO 30
  88. D=-D
  89. DO 40 J=K,N
  90. S=A(M,J)
  91. A(M,J)=A(K,J)
  92. 40 A(K,J)=S
  93. 30 DO 50 I=KP,N
  94. S=A(I,K)/A(K,K)
  95. A(I,K)=S
  96. DO 50 J=KP,N
  97. 50 A(I,J)=A(I,J)-S*A(K,J)
  98. 10 CONTINUE
  99. D=D*A(N,N)
  100. IF(DABS(A(N,N)).LE.EE) GO TO 100
  101. IF(IOPT.EQ.1) RETURN
  102.  
  103. 60 DO 70 K=1,NM
  104. KP=K+1
  105. M=L(K)
  106. S=B(M)
  107. B(M)=B(K)
  108. B(K)=S
  109. DO 70 I=KP,N
  110. 70 B(I)=B(I)-A(I,K)*S
  111.  
  112. B(N)=B(N)/A(N,N)
  113. DO 80 I=1,NM
  114. K=N-I
  115. KP=K+1
  116. S=0.D0
  117. DO 90 J=KP,N
  118. 90 S=S+A(K,J)*B(J)
  119. 80 B(K)=(B(K)-S)/A(K,K)
  120. RETURN
  121. 100 IREG=0
  122. RETURN
  123. END
  124.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.f95:30.5:

     END
     1
Error: END DO statement expected at (1)
prog.f95:37.3:

   SUBROUTINE HALLO3(A,X)
   1
Error: Unclassifiable statement at (1)
prog.f95:38.16:

   PARAMETER(n=6)
                1
Error: PARAMETER attribute of 'n' conflicts with PARAMETER attribute at (1)
prog.f95:39.13:

   INTEGER::i,j,k,IOPT,IREG,ND,MON(n,n)
             1
Error: Symbol 'i' at (1) already has basic type of INTEGER
prog.f95:40.22:

    DOUBLE PRECISION A(n,n),AI(n,n+1),B(n),X(n,n),D
                      1
Error: Symbol 'a' at (1) already has basic type of REAL
prog.f95:42.11:

   DO i=1,n
           1
prog.f95:25.13:

     DO i=2,n
             2
Error: Variable 'i' at (1) cannot be redefined inside loop beginning at (2)
prog.f95:45.16:

      MON(i,j)=1
                1
Error: Unexpected STATEMENT FUNCTION statement at (1)
prog.f95:47.16:

      MON(i,j)=0
                1
Error: Unexpected STATEMENT FUNCTION statement at (1)
prog.f95:49.20:

      AI(i,j)=A(i,j)
                    1
Error: Unexpected STATEMENT FUNCTION statement at (1)
prog.f95:56.12:

    DO i=1,n
            1
prog.f95:25.13:

     DO i=2,n
             2
Error: Variable 'i' at (1) cannot be redefined inside loop beginning at (2)
prog.f95:57.5:

     AI(i,n+1)=MON(i,k)
     1
Error: Unclassifiable statement at (1)
prog.f95:60.12:

    DO i=1,n
            1
prog.f95:25.13:

     DO i=2,n
             2
Error: Variable 'i' at (1) cannot be redefined inside loop beginning at (2)
prog.f95:64.2:

  END
  1
Error: END DO statement expected at (1)
prog.f95:69.2:

  SUBROUTINE DGAUSS(ND,N,A,B,IOPT,D,IREG)
  1
Error: Unclassifiable statement at (1)
prog.f95:70.21:

   DOUBLE PRECISION A,B,D,S,EE
                     1
Error: Symbol 'a' at (1) already has basic type of REAL
prog.f95:71.17:

      DIMENSION A(ND,N),B(ND),L(ND)
                 1
Error: Duplicate DIMENSION attribute specified at (1)
prog.f95:81.21:

         DO 20 I=KP,N
                     1
prog.f95:25.13:

     DO i=2,n
             2
Error: Variable 'i' at (1) cannot be redefined inside loop beginning at (2)
prog.f95:84.12:

      L(K)=M
            1
Error: Unexpected STATEMENT FUNCTION statement at (1)
prog.f95:92.17:

   40    A(K,J)=S
                 1
Warning: Obsolescent feature: DO termination statement which is not END DO or CONTINUE with label 40 at (1)
prog.f95:93.21:

   30    DO 50 I=KP,N
                     1
prog.f95:25.13:

     DO i=2,n
             2
Error: Variable 'i' at (1) cannot be redefined inside loop beginning at (2)
prog.f95:96.24:

            DO 50 J=KP,N
                        1
Warning: Obsolescent feature: Shared DO termination label 50 at (1)
prog.f95:97.34:

   50       A(I,J)=A(I,J)-S*A(K,J)
                                  1
Warning: Obsolescent feature: DO termination statement which is not END DO or CONTINUE with label 50 at (1)
prog.f95:101.26:

      IF(IOPT.EQ.1) RETURN
                          1
Error: GNU Extension: RETURN statement in main program at (1)
prog.f95:107.11:

      B(M)=B(K)
           1
Error: Statement function at (1) is recursive
prog.f95:108.12:

      B(K)=S
            1
Error: Unexpected STATEMENT FUNCTION statement at (1)
prog.f95:109.21:

         DO 70 I=KP,N
                     1
prog.f95:25.13:

     DO i=2,n
             2
Error: Variable 'i' at (1) cannot be redefined inside loop beginning at (2)
prog.f95:109.21:

         DO 70 I=KP,N
                     1
Warning: Obsolescent feature: Shared DO termination label 70 at (1)
prog.f95:110.14:

   70    B(I)=B(I)-A(I,K)*S
              1
Error: Statement function at (1) is recursive
prog.f95:112.11:

      B(N)=B(N)/A(N,N)
           1
Error: Statement function at (1) is recursive
Fatal Error: Error count reached limit of 25.
stdout
Standard output is empty