vim - Fortran Error fmt: read unexpected error. Possible Hidden Characters? -
i running fortran code, compiling using g77 version 3.4.0 on mac osx 10.9.4. running following error in code:
fmt: read unexpected character apparent state: unit 4 named p_resids_inversion last format: (6(i3,x,f7.2,x,i2,x)) lately reading sequential formatted external io
i understand error must have formatting of input requires (6(i3,x,f7.2,x,i2,x)) format. have located formatting in script, , have checked input. above formatting corresponds following lines of sample data:
27 -0.23 1 26 -0.03 1 28 0.52 1 17 1.09 1 29 0.07 1 25 0.14 1 30 0.09 1 24 -0.13 1 4 -0.01 1 35 -0.48 1 23 -0.28 1 22 -0.08 1 21 -0.66 1 0 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0
i have compared input file input file work fortran code no issues formatting -- i've checked spacing many times , found no discrepancies. here hypothesis why error occurring, though spacing correct:
i created input file using perl script, applies "\n" newline character once 6th group of inputs (i3, f7.2,i2) completed. there may hidden newline character not removed in input file, giving fortran fit. however, opened both of input files in vim , performed ":set list" command, , character @ end of each line dollar sign.
i wondering if have ideas how possibly remove hidden characters within input file, or if there other reasons hiccup in fortran code, though input correct (in text file)?
as side note, input file know works unix executable file, whereas malfunctioning input file text file, , malfunctioning file created on mac.
Comments
Post a Comment