Solving Fortran Error on Linux: invalid number

  • Context: Fortran 
  • Thread starter Thread starter Norman
  • Start date Start date
  • Tags Tags
    Error Fortran Linux
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 5K views
Norman
Messages
895
Reaction score
4
Hi all,

I am trying to run some fortran code on Linux that was originally written (and worked) on Windows.

I am getting the following error:

invalid number: incomprehensible list input
apparent state: unit 63 named NUCLEAR.DAT
last format: list io
lately reading sequential formatted external IO
Aborted

I was in the process of changing a statement OPEN(100, FILE='NUCLEAR.DAT', STATUS='OLD') to OPEN(63, FILE='NUCLEAR.DAT', STATUS='OLD') since I know that g77 doesn't like numbers greater than 99 for unit numbers (as a default). Anyone know what this error means?
Thanks,
Ryan
 
Physics news on Phys.org
< guess >
Is the prgm reading any of the file or does it bomb at the open ? If it starts reading the file and bombs at the end you may have an invalid eof in the NUCLEAR.DAT file. Another thing it could be is case sensitivity. I've never seen the error and I port codes between pcs and various flavors of UNIX (including g77 and g95 on linux) routinely.
< /guess >
 
I figured it out. The .dat file was created in Windows and it had virtual characters in it. I just had to run sed to get them out of it. Thanks for the help.
Cheers,
Ryan