我试图在远程超级计算机上运行一个程序,该程序在我的笔记本上运行良好。但该程序不在那里编译。试图追踪这个问题,我将程序降低到最低程度,但仍然给我一个编译错误。任何人有任何想法可能在这里出错?Fortran:CHARACTER声明中的语法错误
[[email protected] python_utilities]$cat test.f90
program test
character(:), allocatable :: out
end program test
[[email protected] python_utilities]$gfortran test.f90
In file test.f90:3
character(:), allocatable :: out
1
Error: Syntax error in CHARACTER declaration at (1)
我猜gfortran运行正常,当我这样做时,它的工作原理:
[[email protected] python_utilities]$cat test.f90
program test
print *, "Hello World!"
end program test
[[email protected] python_utilities]$gfortran test.f90
[[email protected] python_utilities]$./a.out
Hello World!
在超级计算机编译器是:
[[email protected] 256]$gfortran --version
GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
Copyright (C) 2007 Free Software Foundation, Inc.
我看,超级计算机上的编译器确实老了。它是:[k00603 @ fe01p08 256] $ gfortran --version GNU Fortran(GCC)4.1.2 20080704(Red Hat 4.1.2-51) 版权所有(C)2007自由软件基金会,Inc. – jhaprade 2013-03-14 06:33:54
您应该得到SysAdmin升级。 gfortran 4.1版已经过时并且有错误。 4.3之前我不会使用任何版本。原则上你可以在你的用户区安装编译器,但这并不容易。 – 2013-03-14 07:16:47