如何安装 Fortran 9x 编译器?

如何安装 Fortran 9x 编译器?

我想安装一个名为 OSIRIS 的程序,但我需要获取 Fortran 9x 编译器。我想知道如何安装它?我使用的是 Ubuntu 16

答案1

安装gfortran

man gfortran

   -std=std
       Specify the standard to which the program is expected to conform,
       which may be one of f95, f2003, f2008, gnu, or legacy.  The default
       value for std is gnu, which specifies a superset of the Fortran 95
       standard that includes all of the extensions supported by GNU
       Fortran, although warnings will be given for obsolete extensions
       not recommended for use in new code.  The legacy value is
       equivalent but without the warnings for obsolete extensions, and
       may be useful for old non-standard programs.  The f95, f2003 and
       f2008 values specify strict conformance to the Fortran 95, Fortran
       2003 and Fortran 2008 standards, respectively; errors are given for
       all extensions beyond the relevant language standard, and warnings
       are given for the Fortran 77 features that are permitted but
       obsolescent in later standards. -std=f2008ts allows the Fortran
       2008 standard including the additions of the Technical
       Specification (TS) 29113 on Further Interoperability of Fortran
       with C and TS 18508 on Additional Parallel Features in Fortran.

答案2

GNU Fortran 95 编译器存在于官方 Ubuntu 存储库中。

该包名为语言

您可以通过终端中的命令行来安装它

sudo apt install gfortran

在 web gfortran 包中查看更多信息:https://packages.ubuntu.com/xenial/gfortran

相关内容