frecord-marker'

Sébastien Rousseaux s_rousseaux@hotmail.com
Mon Dec 15 10:06:00 GMT 2008



Hello
I need to read a fortran file generated with a 32 bits marker. This file was generated by a HPUNIX computer.
Actually I'am on a Linux computer and I manage to read the file in the right way using the option 'CONVERT'.
I use gfortran as a compiler.
I heard about the 'frecord-marker' option in using the compiler. I tryed to used it and I didn't saw any different in initialising it at 4 or 8. So I look on the net and saw this option doesn't work and instead of we have to use the option RECM=4 while we open the file.
So actualy my open function is like :
          OPEN ( UNIT=IUNIT,
     %          FILE=AC_NAME_FILE,
     %          FORM='UNFORMATTED',
     %          RECM='4',
     %          ACCESS='SEQUENTIAL',
     %          STATUS='OLD',
     %          CONVERT='SWAP',
     %          IOSTAT=IOS)

The problem I have is gfortran doesn't recognize RECM.
When I compile my project I have
gfortran -g  -I../inc  -DCN_RSIZE=4 -DCN_ISIZE=4  -frecord-marker=4 -fcray-pointer -ffpe-trap=overflow,zero,invalid -fconvert=big-endian   -c tvload.F
 In file tvload.F:223

     %          FORM='UNFORMATTED',                                    
                                                         1
Error: Syntax error in OPEN statement at (1)

I used
GNU Fortran (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14).

Linux 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007 i686

I'm not at the moment on the mailing list. So please can you answer me in my own mail address.
Thank you very much for your help.



More information about the Fortran mailing list