- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hello Steve,
I have recently upgraded my Intel compiler from DVF 6.6a to Intel Compiler 13 (Visual Fortran Compiler XE 13.1.3.198 [IA-32].
And I now have following problem:
This simple read statement keeps returning an IOSTAT = -1. Telling me that I am at the end of the file.
When I run the debugger I don’t have any problems and the IOSTAT returns correct 0.
Code:
open(handle,file=outfile,status='OLD', iostat = ios)
rewind(handle, iostat = ios1)
write(66,*) 'rewind status: ',ios1
read(handle,'(a256)', iostat = ios, err=920) XML_line
write(66,*) 'After read: ',ios
write(66,*) 'xml_line: ', xml_line
Is this a problem you have heard about before?
Thanks a lot for your help.
Best regards
Lane Hjelme
Johnson Controls Denmark
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I would check to make sure you are opening the correct file. My guess is that you're opening an empty file.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hello Steve,
Thanks for your answer.
I am quite sure the file is not empty. I have a poller program that is polling a folder - I check if the files exist
and have a size. Then I move on with the READ Statement.
I am asking you because it is not the first time I have problems with READ after installing new compiler.
From my program I am calling an external program. I/O is done by writing/reading XML files.
I think it could be a timing problem since it works fine in the debugger.
I have tried several different compiler options but haven't been able to solve the problem.
Best regards Lane
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Are the files you are opening on a network drive, or are they on the machine that is running the program?
I suggest trying your READ on a file that is located in the same folder as the executable and see if
even that results in the problem you see.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Try a CALL SLEEPQQ(500) before the first read (requires USE IFPORT) if it is a timing problem.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Thanks for all your answers.
app4619: And especially to you - a call to SLEEPQQ solved my problem.
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla