arminius85
Programmer
Hi all
I have a problem with a simple read instruction, for the sake of
clarity I write a dummy program ion which the problem persist. I
don't know if there are some limitation about the read instruction.
The program is as the follow:
-----------------------------------------------------------------------------------------------
in another file
after 12936 iteration it stopped without any message as those labeled
in "800" or "900" but "Press
any key to continue", as you can see in attachment.
The file named as "template_112.f06", with a dimension of 2.988.214
byte, contains 332024 lines of the word "PROVA x", where x is a
number.
Any help is greatly appreciated
I have a problem with a simple read instruction, for the sake of
clarity I write a dummy program ion which the problem persist. I
don't know if there are some limitation about the read instruction.
The program is as the follow:
Code:
program usrfun
USE lettura_risultati_da_f06
INTEGER*8 :: CALLS, INTERO
DOUBLE PRECISION :: MASSA, &
MAX_ROD_STR, &
MIN_ROD_STR, &
MAX_CQUAD_STR, &
ANGLEA, &
ELEV, &
MAX_DISP, &
MAX_DAMPING, &
ACC_MFT, &
Freq_MAX_calcolata
DOUBLE PRECISION, DIMENSION(3)::F
CHARACTER(18) :: NOME_FILE
CHARACTER*100 :: COMMAND
DO
CALLS=CALLS+1
write(*,*) '---------------------------------'
write(*,*) ' ITERAZIONE NUMERO', calls
write(*,*) '---------------------------------'
NOME_FILE='template_112.f06'
CALL sol_112_stress(NOME_FILE)
END DO
stop
end program usrfun
in another file
Code:
MODULE lettura_risultati_da_f06
CONTAINS
SUBROUTINE sol_112_stress(NOME_FILE)
IMPLICIT NONE
CHARACTER*18, INTENT(IN) :: NOME_FILE
INTEGER:: &
UNIT_FILE, &
ISTATUS
CHARACTER*132 :: stringa, &
RIGA, &
NOME_VINCOLO
CHARACTER*18 :: VAR1
INTEGER :: ID, ID_MAX_STR, ID_MIN_STR, ID_MAX_CQUAD_STR, INTERO, CALLS_FLAG
DOUBLE PRECISION :: TIME1, AX_STR1, TOR_STR1, TIME2, AX_STR2, TOR_STR2, &
FIB_DIS, NX, NY, TXY, ANGLE, MAJ, MIN, VONM, &
TIME_MAX_STR, TIME_MIN_STR, TIME_MAX_CQUAD
UNIT_FILE=112
OPEN(UNIT=UNIT_FILE, FILE=NOME_FILE, IOSTAT=ISTATUS, STATUS='OLD', ACTION='READ', ERR=800)
REWIND(UNIT_FILE)
DO
READ(UNIT_FILE,"(A132)",IOSTAT=ISTATUS) RIGA
IF (ISTATUS<0) EXIT
END DO
CLOSE(UNIT_FILE)
RETURN
! ERROR
800 WRITE(*,*) 'ERROR OPEN FILE ',NOME_FILE
STOP
900 WRITE(*,*) 'Error in READ line 191, ISTATUS =',ISTATUS
STOP
END SUBROUTINE sol_112_stress
in "800" or "900" but "Press
any key to continue", as you can see in attachment.
The file named as "template_112.f06", with a dimension of 2.988.214
byte, contains 332024 lines of the word "PROVA x", where x is a
number.
Any help is greatly appreciated