gpt4 book ai didi

linux - Linux 上为 "Error Unclassifiable statement"

转载 作者:太空宇宙 更新时间:2023-11-04 05:43:36 25 4
gpt4 key购买 nike

在我的 Linux 集群中使用 gfortran 编译 .for 格式文件。

输入 gfortran -O2 calpuff.for -o calpuff.exe ,发生了一个错误:

Unclassifiable statement

错误
 In file calutils.for:2912
Included at calpuff.for:2115
cdeflt=ctext
Error: Unclassifiable statement at (1)

相应的calutil.for显示如下:

c ----------------------------------------
c
character*132 ctext,cdeflt
c
c --- Microsoft variables
c *** integer*2 iarg,istat
c
c --- HP declaration
c *** external getarg
c *** external iargc
c
c --- The following is for any system without a command line routine
c --- and is also used as a default
cdeflt=ctext ## Line 2912
c
c ----------------------------------------
c ----------------
## Another subroutine.
c --- Sun compiler
c ----------------
numargs=IARGC()
if(numargs.ge.1)then
call GETARG(1,ctext)
endif



### Add another subroutine which are the only code related to `cdeflt`
c --- If no command line arguments, use default
if(ctext(1:1).eq.' ')ctext=cdeflt # Line 2954

return
end

更新

感谢@Alexander Vogt的提醒,下面的代码是calpuff.for

c----------------------------------------------------------------------
c --- BRING IN SUBROUTINES for MCHEM=6,7 OPTIONS (API)
include 'api_chem.for'
include 'isorropia.for'
c --- BRING IN CALPUFF SYSTEM UTILITY SUBROUTINES
include 'calutils.for' ### This is line 2115
include 'coordlib.for'
c----------------------------------------------------------------------

cdeflt=ctext 有什么问题吗? ?有人可以给一些建议吗?

最佳答案

实际错误发生在后面的行中:

c ----------------
c --- Sun compiler
c ----------------
numargs=IARGC()
if(numargs.ge.1)then
call GETARG(1,ctext)
endif

那里只有五个空格,(至少)六个是必需的。应该是这样的:

c ----------------
c --- Sun compiler
c ----------------
numargs=IARGC()
if(numargs.ge.1)then
call GETARG(1,ctext)
endif

在固定形式的 Fortran 中,前六列具有特殊含义,不能用于代码。

不幸的是,这(再次)使您​​的问题与 SO 上的许多其他问题重复。

关于linux - Linux 上为 "Error Unclassifiable statement",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36246475/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com