Search code examples
formatfortranruntime-errorfortran77

error "startio error: error in format" with fortran 77 program


I am trying to run some old legacy fortran 77 code and it is giving me an error I cannot figure out. The program was compiled with g77.

Here is the output when run:

 Reading data from file: j.cmp
startio: error in format
apparent state: unit 14 named cyfile
last format: (i3,1x,i2,2f8.2,f8.2,1f8.3,20(1pe10.3.1))
lately writing sequential formatted external IO

Aborted (core dumped)

j.cmp is my input file; cyfile is suppose to be my output file. Does anyone have any ideas on what is causing the error? Is it the format of my input file? Can it not write to the output file?


Solution

  • 1pe10.3.1 is not a valid format. According to the Fortran standard, the E edit descriptor is:

    E w . d [ E e ]

    where w is the field width, d is the number of digits in the fractional part and e is the number of digits in the exponent.

    Try "1pe10.3" or "1pe10.3E1". The second choice limits the exponent field to one digit.