- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As detailed in a previous thread, we have discovered that the structure of unformatted files has changed between CVF6.6 and Intel 11.1.
Intel built executables cannot read the CVF 6.6 structure unless the project is compiled with /fpscomp:ioformat.
We have a dilemma regarding this backwards incompatibility: all our products currently in the marketplace use CVF 6.6 and hence all our users have all their unformatted files in the CVF structure. Various of our products are designed to read these files, and will now fail in the READ unless we specify /fpscomp:ioformat.
However if we specify /fpscomp:ioformat, I understand this will affect the WRITE behavior as well as the READ: hence we will be pertuating the (old) CVF format within our products into the future, which I am reluctant to do, since this feature may well be deprecated in the future.
I also understand there is no conversion utility to convert from one file type to the other.
Please advise how best we should proceed.
Adrian
Intel built executables cannot read the CVF 6.6 structure unless the project is compiled with /fpscomp:ioformat.
We have a dilemma regarding this backwards incompatibility: all our products currently in the marketplace use CVF 6.6 and hence all our users have all their unformatted files in the CVF structure. Various of our products are designed to read these files, and will now fail in the READ unless we specify /fpscomp:ioformat.
However if we specify /fpscomp:ioformat, I understand this will affect the WRITE behavior as well as the READ: hence we will be pertuating the (old) CVF format within our products into the future, which I am reluctant to do, since this feature may well be deprecated in the future.
I also understand there is no conversion utility to convert from one file type to the other.
Please advise how best we should proceed.
Adrian
Link Copied
11 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Provide a program which wrote and read the file in CVF, and a sample of the data file which you say Intel Fortran can't read. Zip these and attach to a reply here.
The unformatted file format did not change. It may be that you unintentionally used /fpscomp:ioformat under CVF.
The unformatted file format did not change. It may be that you unintentionally used /fpscomp:ioformat under CVF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
I replied under separate thread, but I attach the examples here as well.
Here is a zip file containing 2 identical fortran files which write 3 values to an unformatted file, one compiled with CVF 6.6, the other with Intel 11.1. The generated unformatted output files are also attached which show the different structures.
test_dig.for compiled with:
c:\progra~1"microsoft visual studio"\df98\bin\dfvars
fl32 test_dig.for
test_intel.for compiled with:
C:\Program Files\Intel\Compiler\11.1\060\Bin\ifortvars.bat" ia32
ifort test_intel.for
Adrian
I replied under separate thread, but I attach the examples here as well.
Here is a zip file containing 2 identical fortran files which write 3 values to an unformatted file, one compiled with CVF 6.6, the other with Intel 11.1. The generated unformatted output files are also attached which show the different structures.
test_dig.for compiled with:
c:\progra~1"microsoft visual studio"\df98\bin\dfvars
fl32 test_dig.for
test_intel.for compiled with:
C:\Program Files\Intel\Compiler\11.1\060\Bin\ifortvars.bat" ia32
ifort test_intel.for
Adrian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Answered in the other thread. It's your use of "fl32", the Microsoft Fortran PowerStation command verb (which CVF supported) that gives you /fpscomp:ioformat implicitly. The default unformatted I/O format did not change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Is there a description of the old PowerStation structure? If so, it should be relatively easy to write a converter program to read the old format and write the new.
Adrian
Is there a description of the old PowerStation structure? If so, it should be relatively easy to write a converter program to read the old format and write the new.
Adrian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This link:
<>
provides a good description of PowerStation file formats, including one for "unformatted sequential file". These appear to be identical to those found in
<>
provides a good description of PowerStation file formats, including one for "unformatted sequential file". These appear to be identical to those found in
"Fortran PowerStation Programmer's Guide" Version 4.0 1995: Page 170, Unformatted Sequential Files
>- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Converting the MS format is a bit more complicated because you don't
know how long the whole record is until you reach the end of it
and, one may add, having to provide for the possibility that there may be records in the file whose logical length is too big to be represented as a four-byte integer.
and, one may add, having to provide for the possibility that there may be records in the file whose logical length is too big to be represented as a four-byte integer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MS didn't support such large records, so that should not be a problem. The DEC/Intel format allows for larger records - the layout is also documented - but the Lahey program I wrote assumes that there won't be records larger than 1GB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for this. Is there an equivalent page in the documentation for the 'new' format? ie. I'd like to see the differences between olfd and new formats for :
Formatted Sequential
Formatted Direct
Unformatted Sequential
Unformatted Direct
Binary Sequential
Binary Direct
Adrian
Formatted Sequential
Formatted Direct
Unformatted Sequential
Unformatted Direct
Binary Sequential
Binary Direct
Adrian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The default DEC/Compaq/Intel layout is also documented in that chapter. I will note that the unformatted format has not changed in our product since - um - forever, so I would not call it 'new'. The difference you are seeing is strictly between Microsoft Fortran PowerStation and the DEC layout (shared with most Linux, UNIX and Windows compilers).
For "Binary" files, these are just a stream of bytes - there is no record layout. Formatted files for both compilers have CR-LF line terminators. Direct access files have no record lengths in the data. The last time we made a change of any nature was when we introduced a method for representing records longer than 1GB, which appears only for those records. That was back in the 1990s. This is the same method current gfortran uses (they switched to adopt our approach.)
For "Binary" files, these are just a stream of bytes - there is no record layout. Formatted files for both compilers have CR-LF line terminators. Direct access files have no record lengths in the data. The last time we made a change of any nature was when we introduced a method for representing records longer than 1GB, which appears only for those records. That was back in the 1990s. This is the same method current gfortran uses (they switched to adopt our approach.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm writing code now to deal with the structure changes for unformatted sequential files between PS and Intel.
So I just need to make sure that I do not have to worry about the other 5 formats. Please confirm.
Adrian
So I just need to make sure that I do not have to worry about the other 5 formats. Please confirm.
Adrian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far as I know, you do not have to worry about the other formats.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page