ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fortran runtime error: end of file


From: Leon Maurer
Subject: Re: Fortran runtime error: end of file
Date: Sat, 25 Apr 2015 09:13:38 -0500

FWIW, it looks like gdb works fine with the code.

address@hidden:~/Research/Amanda$ gdb test
GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from test2...done.
(gdb) run
Starting program: /blahblahblah/test 
   5.00000006E-08
[Inferior 1 (process 11998) exited normally]

I'm running ubuntu 14.10 and 15.04.
-Leon

On Fri, Apr 24, 2015 at 10:45 PM, Leon Maurer <address@hidden> wrote:
Hello everyone,

I have a strange problem. Consider the following fortran program:

program test   
    real :: arg
    
    open(unit=1,file='test.txt',status='unknown')
    read(1,*) arg
    print *, arg
    close(1)
endprogram

test.txt simply is one line with a floating point number -- such as 50e-9. If I compile and run the code on its own, everything is fine:

$ f95 -g -o test test.f90 
$ ./test
   5.00000006E-08

However, if I run the program within DDD, I get

At line 5 of file test.f90 (unit = 1, file = 'test.txt')
Fortran runtime error: End of file
[Inferior 1 (process 16664) exited with code 02]

Does anyone know why the program works fine when run outside DDD but gives an error when run inside DDD?

Thanks for your time.
-Leon


reply via email to

[Prev in Thread] Current Thread [Next in Thread]