Reputation: 4434
I am new to FORTRAN and try to re-compile some .F90
codes in a WIN7 64-bit system with gfortan 4.5.2. The source code has been successfully compiled using LAHEY compiler, which I do not have access... My question is related to the blocksize
option in the open
statement, which is:
open (unit=RANUNT, file=trim(DAFile_Name), status='old',&
action='readwrite', recl=LENREC, access='direct',&
form='UNformatted', blocksize=LENREC, iostat=It_is_OK)
The error message I got is
form='UNformatted', blocksize=LENREC, iostat=It_is_OK)
1
Error: Syntax error in OPEN statement at (1)
So my question: Is this blocksize
option not supported in gfortran? What potential problems I could run into by removing it?
Thanks!
The program works fine in Windows XP compatibility mode. However, it complained in Windows 7 mode. The error I got in Windows 7 are:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 6f61143e
#1 6f68ec2f
#2 00401261
Upvotes: 0
Views: 1510
Reputation: 29391
"blocksize" keyword of an open
statement is not standard Fortran. You should have no problems by omitting it. It is an instruction to the OS to write to the output device in groups of bytes. Modern hardware (are you writing to a disk?) has builtin sophisticated buffering.
Upvotes: 1