Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

F77 error

  1. May 8, 2012 #1
    I have a fortran 77 code, I compiled it on cygwin in windows 7 by using f77 and gfortran, and it has been working correctly.
    I should use this code on Ubuntu, so I installed f77, gfortran and gcc compiler. I tried to comile that code by using f77 but it gave me the following error:
    > f77 software.f -o software
    > pickup_blockiirm:
    > /usr/bin/f77: aborting compilation

    The code was compiled successfully when I tried gfortran and f95, but whenever I want to run the program, it gives me the following error:
    > At line 172 of file software.f
    > Fortran runtime error: Bad value during integer read

    I should mention that I'm sure that my input data is integer, and this code and input file works on cygwin smoothly!

    Can anyone help me?
  2. jcsd
  3. May 8, 2012 #2


    User Avatar
    Science Advisor

    Hey mathia and welcome to the forums.

    This is just a suggestion, but since your problem is not so much with the language or even the compiler in general (but a specific version), you might get better luck posting to the dev boards for that particular port.

    The only alternative to this that I think is feasible is if you had the compiler code in the raw source and then stepped through it yourself.

    This sounds like a real pain to be in given that you have run it on a different platform with no problem... argh!
  4. May 8, 2012 #3
    Hhhh...could it have something to do with the format or, rather encoding of the input file? So, I am not talking about the numbers in it, but, rather about UTF-8 versus something else? How did you bring your input file from Windows over to Ubuntu?

    Other than that...for debugging purposes, I would shorten the program to just read one number and see if you can do that much...and start incrementing the scope of the program.
  5. May 8, 2012 #4
    You probably have not got the right runtime libraries between the two systems.

    Install the fortran system using the Ubuntu package management system and recompile your code on the Ubuntu installation. It should run correctly after that.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook