Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Compilation 将Ifort标志转换为Pgi Fortran标志_Compilation_Fortran - Fatal编程技术网

Compilation 将Ifort标志转换为Pgi Fortran标志

Compilation 将Ifort标志转换为Pgi Fortran标志,compilation,fortran,Compilation,Fortran,当我使用“英特尔Fortran编译器”和“Portlan组编译器”编译同一代码时,我会从中得到不同的结果。pgi Fortran中与ifort中的-fp model precise最接近的标志是什么? pgi中是否有一组标志与-O2-fp model preciseifort标志的组合相匹配谢谢使用不同编译器(甚至同一编译器的不同版本)编译的程序预计不会产生完全相同的结果。编译器之间的不同优化级别(-On标志)也不相同(除了根本不要求优化的-O0) 我认为PGI中没有与ifort的-fp mo

当我使用“英特尔Fortran编译器”和“Portlan组编译器”编译同一代码时,我会从中得到不同的结果。pgi Fortran中与ifort中的
-fp model precise
最接近的标志是什么?

pgi中是否有一组标志与
-O2-fp model precise
ifort标志的组合相匹配
谢谢

使用不同编译器(甚至同一编译器的不同版本)编译的程序预计不会产生完全相同的结果。编译器之间的不同优化级别(
-On
标志)也不相同(除了根本不要求优化的
-O0

我认为PGI中没有与ifort的
-fp model precise
等效的标志,但您可能需要查看PGI Fortran编译器手册中的目标特定标志,更具体地说,这些标志:

-K[no]ieee          Use IEEE division, optionally enable traps
-Ktrap=align|denorm|divz|fp|inexact|inv|none|ovf|unf
                    Determine IEEE Trap conditions
-M[no]daz           Treat denormalized numbers as zero
-M[no]flushz        Set SSE to flush-to-zero mode
-M[no]fpapprox[=div|sqrt|rsqrt]
                    Perform certain fp operations using low-precision approximation
    div             Approximate floating point division
    sqrt            Approximate floating point square root
    rsqrt           Approximate floating point reciprocal square root
    -Mfpapprox      Approximate div,sqrt,rsqrt
-M[no]fpmisalign    Allow use of vector arithmetic instructions for unaligned operands
-M[no]fprelaxed[=div|recip|sqrt|rsqrt|[no]order]
                    Perform certain fp operations using relaxed precision
    div             Perform divide with relaxed precision
    recip           Perform reciprocal with relaxed precision
    sqrt            Perform square root with relaxed precision
    rsqrt           Perform reciprocal square root with relaxed precision
    [no]order       Allow expression reordering, including factoring
    -Mfprelaxed     Choose which operations depending on target processor
在不同的编译器之间,程序的输出在某些不太重要的数字上是不同的,这是可以接受的。如果您的结果非常不同,那么您的算法可能不是很健壮,可能需要改进