English 中文(简体)
fortran调试问题
原标题:fortran debugging problem
  • 时间:2011-05-31 15:06:44
  •  标签:
  • ide
  • fortran

我已经编译了代码,但它无法正常工作。我的makefile:

FC= ifort
LD = ifort -align all
FCFLAGS = -O0 -g -ipo -traceback -warn noalign
LDFLAGS = $(FCFLAGS)

# Executables
nray: main.o findnode.o plots.o segmnt.o empty.o aldone.o erase.o pcolor.o box.o plot.o axtick.o axis.o line.o pltsrcbox.o find.o dot.o grad.o intersect.o straight.o backproj.o ddtime.o kernel.o resolution.o plotnd.o bndinterpret.o time.o $< $(INCS)
    $(FC) $(LDFLAGS)  $(FCFLAGS) -o nray main.o findnode.o plots.o segmnt.o empty.o aldone.o erase.o pcolor.o box.o plot.o axtick.o axis.o line.o pltsrcbox.o find.o dot.o grad.o intersect.o straight.o backproj.o ddtime.o kernel.o resolution.o plotnd.o bndinterpret.o time.o $< $(INCS)
main.o:main.f ray.par ray.com
    $(FC)  $(FCFLAGS) -c main.f

所以,如果我想知道为什么backproject.o不起作用,我该怎么办?

forrtl: severe (24): end-of-file during read, unit 29, file /home/milenko/fast/ray/num.cell
Image              PC        Routine            Line        Source             
nray               080CBD03  Unknown               Unknown  Unknown
nray               080CAA20  Unknown               Unknown  Unknown
nray               080950BE  Unknown               Unknown  Unknown
nray               0805E7AC  Unknown               Unknown  Unknown
nray               0805E0AA  Unknown               Unknown  Unknown
nray               0806B83D  Unknown               Unknown  Unknown
nray               0804C6BB  MAIN__                    226  main.f
num.cell is empty.
Breakpoint 1.1 at 0x804c5d5: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.2 at 0x804c887: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.3 at 0x804c8fa: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.4 at 0x804ca94: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.5 at 0x804cb0e: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.6 at 0x804cc2b: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.7 at 0x804cc97: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.8 at 0x804cfa4: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.9 at 0x804cff2: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.10 at 0x804e527: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.11 at 0x804e73d: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.12 at 0x804f07b: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.13 at 0x804f142: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.14 at 0x804f2e4: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.15 at 0x804f3ab: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.16 at 0x8053eda: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.17 at 0x8053ff2: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.18 at 0x8054168: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.19 at 0x80542c2: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.20 at 0x8054546: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.21 at 0x80545c8: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.22 at 0x8054cef: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.23 at 0x8054dc8: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.24 at 0x80551f4: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.25 at 0x8055261: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.26 at 0x80552bc: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.27 at 0x8055321: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.28 at 0x80553aa: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.29 at 0x805541e: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.30 at 0x8056bc6: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.31 at 0x8056cb3: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.32 at 0x8056d10: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.33 at 0x8056dd3: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.34 at 0x8056e54: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.35 at 0x8056f17: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.36 at 0x805784b: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.37 at 0x8057af0: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.38 at 0x8057b4d: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.39 at 0x8057df9: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.40 at 0x8057eb9: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.41 at 0x8057f45: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.42 at 0x8057fd8: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.43 at 0x8058064: file /home/milenko/fast/ray/main.f, line 226.
最佳回答

您正在读取超过文件末尾的内容:

/home/milenko/fast/ray/num.cell

这可能是因为num.cell不够长,或者你的阅读程序没有停在正确的地方。冒犯性的读数在main.f的第226行,或者至少在那里调用。

如果没有看到一些代码,真的不能说太多。

问题似乎不太可能出在backproject.f上(听起来不像是应该/将要读取文件的例程),但这只是基于例程名称的猜测。

问题回答

您正在从fortran运行库中获取文件结尾错误,试图读取文件num.cell。第一步应该是检查该文件的内容是否有效。





相关问题
Sybase Development IDE

Is there a Toad type application for Sybase? I can t seem to find a single one! I ve tried using VS 2008 but can t see the sproc source.

Good C IDE for Mac? [closed]

I ve just started a job where I m programming in C on a Mac, which is my first experience using a Mac for development. For now I m using Xcode as my editor, then using make/gcc/svn at the command line ...

What are your experiences with Code::Blocks? [closed]

I looked at Code::Blocks and it certainly looks great for c++ development, I like it s multiplatform capabilities (runs everywhere), but I wanted to get your feedback. Is it good/stable enough to be ...

What do you use to write Go [closed]

I know its a bit too early, but I ve been trying out Go (Google s Programming Language) and its kindof annoying to write code in gedit. So, my question: What do you use to experiment with Go?

Help with strange Delphi 5 IDE problems

Ok, I m going nuts here. For the last (almost) four years, I ve been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include: Seemingly random errors in coride50.bpl ...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Selenium IDE: Incrementing values by 1 and 71

Currently I m incrementing a value called wert by 1 with the following code: getEval storedVars[ wert ]=${wert}+1; The value wert is something like 80401299. I want to add 1 to the value, if it ...

热门标签