在群集上使用图形内核系统(GKS)编译FORTRAN代码

时间:2014-04-23 14:29:36

标签: compilation makefile fortran

我正在考虑在科罗拉多大学计算集群上编译一份名为MODPATH的美国地质调查局代码。代码链接位于:http://water.usgs.gov/software/MODPATH/

自述文件说:

In general, to compile a new version of the software, you will need:

    a) a Fortran compiler,
    b) a minimal level of knowledge of Make, the compiler, and
       the UNIX operating system, and
    c) a Graphical Kernel System (GKS) library; GKS libraries
       available without fee include GLI/GKS (available from
       http://iff001.iff.kfa-juelich.de/gli/) and xgks (available
       as the file ftp://unidata.ucar.edu/pub/xgks/xgks-2.5.5.tar.Z).

我将编译器命令更改为gfortran,运行make时出现错误:

    gfortran: error: unrecognized command line option ‘-nolib’

我认为错误与我的编译器有关。此外,我担心这个GKS业务,因为(i)我不想使用此代码的图形功能,我只是将代码作为更大优化例程的一部分运行,以及(ii)所有下载链接GKS已经死了。

非常感谢有关我的编译器或GKS问题的任何帮助!

最后,默认的makefile选项如下:

   # Fortran compiler flags (Solaris):
   #   -O - optimization
   # (Note: set FFLAGS to: OptM to generate optimized code
   #                       DbgF to generate debug code)
   DG      = -O -save
   Solaris = -O 
   SGI     = -O -32 -static
   OptM    = $(Solaris)
   DbgF    = -C -g
   FFLAGS  = $(OptM)

   # Compiler name
   FC     = f90

   # GKS libraries:
   XGks     = -L/usr/opt/xgks/lib -lxgks
   GliGks   = -L/usr/local/lib -lgks
   LGks     = $(GliGks)

   # GKS-implementation-specific routines:
   XGksObj  = gkslev2b.o gkscus.o utilgks.o
   GliObj   = gkslev0a.o gkscus.o gqcr.o utilgli.o
   GksObj   = $(GliObj)

0 个答案:

没有答案