我試圖在遠程超級計算機上運行一個程序,該程序在我的筆記本上運行良好。但該程序不在那裏編譯。試圖追蹤這個問題,我將程序降低到最低程度,但仍然給我一個編譯錯誤。任何人有任何想法可能在這裏出錯?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