我已编译代码但它无法正常工作。我的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
所以,如果我想知道为什么backproj.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.
答案 0 :(得分:2)
您正在阅读文件的末尾:
/home/milenko/fast/ray/num.cell
这可能是因为num.cell不够长或者您的阅读程序没有在正确的位置停止。违规读取在main.f的第226行或至少在那里被称为。
如果没有看到某些代码,真的不能说更多。
问题似乎不太可能是backproj.f(听起来不像应该/将会读取文件的那种例程),但这只是基于你的例程名称的猜测。
答案 1 :(得分:1)
您正在尝试读取文件num.cell
的fortran运行时库中收到并结束文件错误。第一步应该是检查该文件的内容是否有效。