1

I'm compiling a G77/GNU FORTRAN code developed in Linux to work with Intel Fortran in Windows. I got a strange assignments in the code to modify the DO loop index such as I+1=M or I-1=N where I in the index of the DO loop. This is not accepted by Intel Fortran compiler. The modification of the loop index is also not allowed in Intel Fortran compiler. What are the equivalent code in Intel Fortran for these assignments?

The code is as follows:

  DO L=2,LA  
    I=IL(L)  
    J=JL(L)  
    IF(IJCT(I-1,J).EQ.9)THEN
      L-1=LC
    ELSE
     L-1=LIJ(I-1,J)
     L-1=MAX(L-1,1)
    ENDIF
    IF(IJCT(I+1,J).EQ.9)THEN
     L+1=LC
    ELSE
     L+1=LIJ(I+1,J)
     L+1=MAX(L+1,1)
    ENDIF
  ENDDO 
Nghiem
  • 19
  • 2
  • 2
    Please post a minimum example of the code, which you are having a problem with. gfortran should not ever compile a statement of the form `i+1=m'. – evets Jul 04 '18 at 04:16
  • As I suspected, this code does not compile with gfortran. Are you still using g77, which hasn't been supported for 13 years? This code is simply not valid Fortran. – evets Jul 04 '18 at 05:00
  • Thanks, the code is probably not working. I am using Intel FORTRAN for Windows but I don't have g77 – Nghiem Jul 04 '18 at 06:16
  • 5
    This code is so broken I can not believe it was ever written this way. How did you get it? Was it scanned from a printed version and this introduced these statements - I won't call them errors, they're more wrong than that. – Ian Bush Jul 04 '18 at 07:50
  • Is this code some sort of incorrectly simplified version of the real code, where `L-1` and `L+1` are indices of arrays? – jme52 Jul 04 '18 at 11:41

0 Answers0