Open Statement Syntax?

Hi, I’m trying to compile these lines, but I keep getting this error.

PGF90-S-0034-Syntax error at or near = (FLOPEN.f: 118)

Here are the lines in question:

OPEN( UNIT=DEVNUM, FILE=DEVNAM, STATUS=CTYPE(ITYPE),
& RECL=80, BLOCKSIZE=BLKSIZE,
& FORM=FTYPE(IFRMAT), IOSTAT=IOFLAG)


Is there some kind of syntax problem in here? Any help will be greatly appreciated!

James

Hi James,

Remove the non-standard “BLOCKSIZE” specifier. I think this originated as an extension on VAX but it would have no meaning on Linux.

  • Mat

thanks mat!

I am trying to compile CALMM5 and I am getting this error:

PGF90-S-0034-Syntax error at or near = (calmm5.v3.f: 126)
0 inform, 0 warnings, 1 severes, 0 fatal for calmm5

Line 126 of calmm5.v3.f corresponds to:

open (io3,defaultfile=inpath,file=infile(iin)
& form=‘unformatted’,status=‘old’,iostat=iost3)

Thanks

Hi Charleston,

Please remove defaultfile=inpath as PGI does not support this. defaultfile provides a path to specifier ‘file=infile(iin)’. Unfortunately, We have calmm5 version 2.6 only and it does not have defaultfile option in source code.

I think what you can do is give a full pathname to specifier ‘file’.

Hongyon

Hello

I am trying to compile the following lines and get the PGF90-S-0034-Syntax error. I am not sure what the error means.

95 C Include Files
96
97 INCLUDE SUBST_MPICH ! MPI definitions and parameters
98 INCLUDE SUBST_IODECL ! I/O definitions and declarations
99 INCLUDE SUBST_PACTL_ID ! PA control parameters
PGF90-S-0034-Syntax error at or near identifier subst_mpich (par_init.F: 97)
0 inform, 0 warnings, 1 severes, 0 fatal for par_init

Hi avemuri,

The file names after an INCLUDE directive are character constants so need to be quoted.

However, the names of the files suggest to me that these are macros so perhaps the file isn’t being preprocessed? What happens if you add the flag “-Mpreprocess” to your compilation?

Hope this helps,
Mat