UNFORAMTTED option question
Muhammad Akbar
mkakbar@gmail.com
Fri Jan 29 19:44:00 GMT 2010
I tried,
open(21,file='filename',form='unformatted',access='stream')
It compiles, but when I run the code, it says BAD ACCESS parameter in
OPEN statement.
On Fri, Jan 29, 2010 at 1:27 PM, N.M. Maclaren <nmm1@cam.ac.uk> wrote:
> On Jan 29 2010, Muhammad Akbar wrote:
>>
>> I am using gfortran-4.1.1 to convert/write our data file to visualize
>> in EnSight Gold. I am using the following statement to open the binary
>> file:
>>
>> open(21,file='filename',form='unformatted')
>>
>> I can write the file, but It writes some 'P' characters before each
>> line. I can read those files in EnSight Gold. The same file is
>> supposed to be read by Paraview, but it cannot. I have contacted
>> Paraview people, and they are suspecting those 'P' characters are the
>> problem. I have the following questions:
>
> They aren't 'P' characters, but part of a length field. A Fortran
> unformatted file is in a special format, with extra control information.
> You probably want to open the file for stream access, but there is no
> guarantee that Paraview can read that, either. It all depends on what
> format it expects.
>
> You can try adding ACCESS='stream' and see if that helps.
>
> Regards,
> Nick Maclaren.
>
>
>
More information about the Fortran
mailing list