fortran compiler option

  1. preprocessing预处理
-cpp/-nocpp
启动或者关闭预处理过程
预处理以传统的方式运行。任何有关文件格式,行长度的限制都会被预处理到输出结果中。因此,建议使用-ffree-line-length-none or -ffixed-line-length-none options.
  1. -W警告信息
-Wall
启动所有常见的警告信息。包括:-Waliasing,-Wampersand,-Wconversion,-Wsurprising,-Wc-binding-type,-Wintrinsics-std,-Wtabs,-Wintrinsic-shadow,-Wline-truncation,-Wtarget-lifetime,-Winteger-division,-Wreal-q-constant,-Wunused and -Wundefined-do-loop.
-Werror
将警告提高为错误
Turns all warnings into errors
  1. x86 Options
-march=cpu-type
这些'-m'选项都是为x86计算机系列设置的
'native'
Using -march=cpu-type enables all instrucyion subsets supported by the local machine (hence the result might not run on different machines).编译器会根据本地计算机优化代码,因此程序再其他计算机上不一定能运行。Uing -mtune=native produces code optimized for the local machine under the constraints of the selected instruction set
'x86-64'
 A generic CPU with 64-bit extensions
 'i386'
 Original Intel i386 CPU
 'i486'
 'i586'/'pentium'
 Intel Pentium CPU with no MMX support
 总而言之,和cpu类型有关
-mtune
Tune to cpu-type everything applicable about the generated code  , except for the ABI and the set of avaliable instructions
-mtune专门产生指定cpu型号的代码,而-march可以产生在本地不被运行的代码
-mtune除了和-march一样的参数之外,还有两个额外的选项
'generic'
Produce code optimized for the most common IA32/AMD64/EM64T processors.在不知道用户的cpu情况下,使用generic选项。如果知道,应该选择对应的选项
'intel'
Produce code optimized for the most current Intel processors, which are Haswell and Silvermont for this version of GCC.
为intel处理器优化代码
  1. debug选项
    -ffpe-trap=llist
    list=invalid,zero,overflow等浮点数相关选项
    invalid:SQRT(-1.0)
    zero: division by zero
    overflow: overflow in a floating point operation
    underflow: underflow in a floating point operation
    inexact: loss of precision during operation
    denormal: operation on a denormal value
    -fno-backtrace
    When a serious runtime error is encountered or a deadly signal is emitted(segmentation fault, illegal instruction, bus error, floating-point exception, and the other POSIX signals that have the action ‘core’), the Fortran runtime library tries to output a backtrace of the error. -fno-backtrace disables the backtrace generation.
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值