2013-04-05 59 views
1

我想在两台不同的机器上安装这个包。 http://www.2decomp.org/download.html用gfortran安装fortran包

在我的Mac笔记本电脑上,当我使用Makefile.inc.x86作为我的Makefile.inc并做一个make时,它可以直接运行,没有任何问题。但是,当我用同样的Makefile.inc文件在另一台机器上,我收到以下错误:

[[email protected] src]$make 
mpif90 -DDOUBLE_PREC -O3 -fcray-pointer -cpp -c decomp_2d.f90 
gfortran: unrecognized option '-cpp' 
Warning: decomp_2d.f90:20: Illegal preprocessor directive 
Warning: decomp_2d.f90:21: Illegal preprocessor directive 
Warning: decomp_2d.f90:22: Illegal preprocessor directive 
Warning: decomp_2d.f90:23: Illegal preprocessor directive 
------------------------------------------------------- 
--- around 50 more lines with the same warning -------- 
------------------------------------------------------- 
In file decomp_2d.f90:32 

integer, parameter, public :: ga_real_type = MT_F_DBL 
                1 
Error: Symbol 'mt_f_dbl' at (1) has no IMPLICIT type 
In file decomp_2d.f90:33 

integer, parameter, public :: ga_complex_type = MT_F_DCPL 
                 1 
Error: Symbol 'mt_f_dcpl' at (1) has no IMPLICIT type 
In file decomp_2d.f90:36 
------------------------------------------------------- 
------------ a lot of other errors -------------------- 
------------------------------------------------------- 

他们两人都是Linux的x86_64机器。任何想法我可以做什么来安装在另一台机器上?

回答

0

你的gfortran可能太老了。 2008中增加了-cpp选项。获取一个新的,或尝试-x f95-cpp-input-x f77-cpp-input istead。

0

为了保证预处理,您可以将decomp_2d.f90重命名为decomp_2d.F90。我知道-cpp应该已经可以保证它,但它可能值得一试,因为我们不一定知道底层编译器是什么。