Compilation 在集群上用图形内核系统(GKS)编译FORTRAN代码 我试图在科罗拉多大学计算集群上编译一个叫M道的美国地质调查代码。此处有指向代码的链接:

Compilation 在集群上用图形内核系统(GKS)编译FORTRAN代码 我试图在科罗拉多大学计算集群上编译一个叫M道的美国地质调查代码。此处有指向代码的链接:,compilation,makefile,fortran,Compilation,Makefile,Fortran,自述文件说: 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) librar

自述文件说:

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)

“nolib”来自哪里?这不是格弗特兰能理解的。您必须了解Makefile中的选项,并将其更改为gfortran等效项。您需要查看Makefile的$(EXE)和$(EXE2)部分。那里有许多特定于太阳的选项,如-nolib、-Bstatic、-Bdynamic、-lsunmath。表示不需要修改此行下方任何内容的部分。所有这些都需要删除或替换为gfortran或ld等效项。感谢您的提示。我想我的问题的主要部分(我应该更清楚)是,如果有人能告诉我一些关于GKS图书馆的事情——至少就我所能找到的而言,互联网上的参考文献似乎已经过时且不清楚了。