- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I checked the source code and find the related codes:
"open(18,file=phiinam(:phiilen),status='old',
1err=900,form='unformatted')
read(18)toblbl
read(18)label,title
"
Since the PGI version program can read it, I assume the input file is fine.
My knowledge in Fortran is very limited. Does anyone have idea what's going wrong here? I have seen this error mesage several times while trying to complie g77 source codes by ifort.
Thanks a lot!
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
The exact file structure for sequential unformatted is not part of fortran standards. It can change with compiler, version, and computer hardware.
I just wrote a note about debugging this in another forum. This may be of some help:
comp.lang.fortran, Jan. 27 thread, message #14.
--Dave
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Since you didn't tell us how the file was created, I can't be more specific about the nature of the mismatch. There is probably some way for you to work around the mismatch, whatever it is. For example, you might be able to read the file as an access='stream' file by adding explicit reads of the internal record lengths.
-Kurt
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I guess that the problem might be attributed to the difficulties in reading an unformatted file in 64-bit machine. Any further suggestion?
--Tianyin
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
"Any further suggestion?"
Yes! The article that I reference above describes the format in detail, then goes on to a debugging strategy that you can use. It was written for the same situation where there is an incompatibility in sequential unformatted between Intel and another compiler. You will need to do some of your own debugging. Please read carefully and try my suggestions. In short:
* Examine the file with a binary viewing tool. Learn and understand the low level binary file format; it is not complicated.
* Write a test file on the opposite machine and understand its format too.
* Determine what the differences are.
* Learn about compiler and program options related to sequential unformatted.
* Change either the writing program or the reading program to use format control options that are compatible with the other.
Please do feel free to ask again if you can show more relevant debugging information, in particular the first few dozen bytes of the binary file. I like hex dumps via "od -Ad -t x1 -N100 filename", but use any binary viewer available.
--Dave
