| 查看: 2868 | 回复: 18 | ||||||
| 【奖励】 本帖被评价12次,作者dxf_dxf_dxf增加金币 9.4 个 | ||||||
| 本帖产生 1 个 1ST强帖 ,点击这里进行查看 | ||||||
[资源]
[VASP编译]五 Makefile中fortran Flags的解释
|
||||||
|
Gfortran编译器 略 Intel编译器 vasp.5.lib中的Makefile makefile.linux_ifc_P4 −O0 −FI –FR −O0 [cite man ifort] −O[n] Specifies the code optimization for applications. Architectures: IA−32, Intel® 64 architectures Arguments: n Is the optimization level. Possible values are 1, 2, or 3. On Linux* OS and Mac OS* X systems, you can also specify 0. Default: O2 Optimizes for code speed. This default may change depending on which other compiler options are specified. For details, see below. Description: This option specifies the code optimization for applications. Option Description O(Linux* OS and Mac OS* X) This is the same as specifying O2. O0 (Linux OS and Mac OS X) Disables all optimizations. This option may set other options. This is determined by the compiler,depending on which operating system and architecture you are using. The options that are set may change from release to release. This option causes certain warn options to be ignored. This is the default if you specify option −debug (with no keyword). O1 Enables optimizations for speed and disables some optimizations that increase code size and affect speed. Tolimit code size, this option: •Enables global optimization; this includes data−flowanalysis, code motion, strength reduction and test replacement, split−lifetime analysis, and instruction scheduling. This option may set other options. This is determined by the compiler,depending on which operating system and architecture you are using. The options that are set may change from release to release. The O1 option may improve performance for applications with very large code size, many branches, and execution time not dominated by code within loops. O2 Enables optimizations for speed. This is the generally recommended optimization level. Vectorization is enabled at O2 and higher levels. On systems using IA−32 architecture: Some basic loop optimizations such as Distribution, Predicate Opt, Interchange, multi−versioning, and scalar replacements are performed. This option also enables: •Inlining of intrinsics •Intra−file interprocedural optimization, which includes: •inlining •constant propagation •forward substitution •routine attribute propagation •variable address−taken analysis •dead static function elimination •removalofunreferenced variables •The following capabilities for performance gain: •constant propagation •copypropagation •dead−code elimination •global register allocation •global instruction scheduling and control speculation •loop unrolling •optimized code selection •partial redundancyelimination •strength reduction/induction variable simplification •variable renaming •exception handling optimizations •tail recursions •peephole optimizations •structure assignment lowering and optimizations •dead store elimination This option may set other options, especially options that optimize for code speed. This is determined by the compiler,depending on which operating system and architecture you are using. The options that are set may change from release to release. On Windows systems, this option is the same as the Ox option. On Linux and Mac OS X systems, if −g is specified, O2 is turned offand O0 is the default unless O2 (or O1 or O3) is explicitly specified in the command line together with −g. Manyroutines in the shared libraries are more highly optimized for Intel® microprocessors than for non−Intel microprocessors. O3 Performs O2 optimizations and enables more aggressive loop transforma tions such as Fusion, Block−Unroll−and−Jam, and collapsing IF statements. This option may set other options. This is determined by the compiler,depending on which operating system and architecture you are using. The options that are set may change from release to release. When O3 is used with options −ax or −x (Linux OS) or with options /Qax or /Qx (Windows OS), the compiler performs more aggressive data dependencyanalysis than for O2, which may result in longer compilation times. The O3 optimizations may not cause higher performance unless loop and memory access transformations takeplace. The optimizations may slowdowncode in some cases compared to O2 optimizations. The O3 option is recommended for applications that have loops that heavily use floating−point calculations and process large data sets. Manyroutines in the shared libraries are more highly optimized for Intel® microprocessors than for non−Intel microprocessors. The last O option specified on the command line takes precedence overany others. −FI [cite man ifort] −nofixed Specifies source files are in fixed format. Architectures: IA−32, Intel® 64 architectures Arguments: None Default: OFF The source file format is determined from the file extension. Description: This option specifies source files are in fixed format. If this option is not specified, format is determined as follows: •Files with an extension of .f90, .F90, or .i90 are free−format source files. •Files with an extension of .f, .for,.FOR, .ftn, .FTN, .fpp, .FPP,or.iare fixed−format files. Note that on Linux and Mac OS X systems, file names and file extensions are case sensitive. Alternate Options: Linux and Mac OS X: −FI −FR [cite man ifort] −free −nofree Specifies source files are in free format. Architectures: IA−32, Intel® 64 architectures Arguments: None Default: OFF The source file format is determined from the file extension. Description: This option specifies source files are in free format. If this option is not specified, format is deter- mined as follows: •Files with an extension of .f90, .F90, or .i90 are free−format source files. •Files with an extension of .f, .for,.FOR, .ftn, or .i are fixed−format files. Alternate Options: Linux and Mac OS X: −FR makefile.linux_ifc_P4 −FR –lowercase –assume byterecl –lowercase [cite man ifort] −names keyword Specifies howsource code identifiers and external names are interpreted. Architectures: IA−32, Intel® 64 architectures Arguments: keyword Specifies howtointerpret the identifiers and external names in source code. Possible values are: lowercase Causes the compiler to ignore case differences in identifiers and to convert external names to lowercase. uppercase Causes the compiler to ignore case differences in identifiers and to convert external names to uppercase. as_is Causes the compiler to distinguish case differences inidentifiers and to preservethe case of external names. Default: lowercase This is the default on Linux and Mac OS X systems. The compiler ignorescase differences in identifiers and converts external names to lowercase. uppercase This is the default on Windows systems. The compiler ignores case differences in identifiers and converts external names to uppercase. Description: This option specifies howsource code identifiers and external names are interpreted. It can be useful in mixed−language programming. This naming convention applies whether names are being defined or referenced. Youcan use the ALIAS directive tospecify an alternate external name to be used when referring to external subprograms. CAUTION: On Windows systems, if you specify option /iface:cref, it overrides the default for external names and causes them to be lowercase. It is as if you specified "!dec$ attributes c, reference" for the external name. If you specify option /iface:cref and want external names to be uppercase, you must explicitly specify option /names:uppercase. Alternate Options: names lowercase Linux and Mac OS X: −lowercase (this is a deprecated option) names uppercase Linux and Mac OS X: −uppercase (this is a deprecated option) −assume byterecl [cite man ifort] −assume keyword Tells the compiler to makecertain assumptions. Architectures: IA−32, Intel® 64 architectures Arguments: keyword Specifies the assumptions to be made. Possible values are: none Disables all assume options. [no]bscc Determines whether the backslash character is treated asaC−style control character syntax in character literals. [no]buffered_io Determines whether data is immediately written to disk or accumulated in a buffer. [no]byterecl Determines whether units for the OPEN statement RECL specifier (record length) value in unformatted files are in bytes or longwords (four−byte units). [no]cc_omp Determines whether conditional compilation as defined by the OpenMP Fortran API is enabled or disabled. [no]dummy_aliases Determines whether the compiler assumes that dummy arguments to procedures share memory locations with other dummy arguments or with COMMON variables that are assigned. [no]fpe_summary Determines whether a floating−point exceptions summary is displayed when a STOP statement is encountered. [no]ieee_fpe_flags Determines whether the floating−point exception and status flags are savedonroutine entry and restored on routine exit. [no]minus0 Determines whether the compiler uses Fortran 2003 or Fortran 90/77 standard semantics in the SIGN intrinsic when treating −0.0 and +0.0 as 0.0, and howitwrites the value on formatted output. [no]old_boz Determines whether the binary,octal, and hexadecimal constant arguments in intrinsic functions INT,REAL, DBLE, and CMPLX are treated as signed integer constants. [no]old_ldout_format Determines the output of integer and real values in list−directed and namelist−directed output. [no]old_logical_ldio Determines whether NAMELIST and list−directed input accept logical values for numeric IO−list items. [no]old_maxminloc Determines the results of intrinsics MAXLOC and MINLOC when givenanempty array as an argument. nobyterecl Units for OPEN statement RECL values with unfor matted files are in four-byte (longword) units. Description: This option specifies assumptions to be made by the compiler. Option Description assume byterecl Specifies that the units for the OPEN statement RECL specifier (record length) value are in bytes for unformatted data files, not long words (four-byte units). For formatted files, the RECL value is always in bytes. If a file is open for unformatted data and assume byterecl is specified, INQUIRE returns RECL in bytes; otherwise, it returns RECL in long words. An INQUIRE returns RECL in bytes if the unit is not open. −assume byterecl [cite vasp.5.2/makefile.linux_ifc_P4] #----------------------------------------------------------------------- # general fortran flags (there must a trailing blank on this line) # byterecl is strictly required for ifc, since otherwise # the WAVECAR file becomes huge #----------------------------------------------------------------------- PGI编译器 vasp.5.lib中的Makefile makefile.linux_pg & makefile.linux_pgi_opt -Mx,119,0x200000 -O1 –Mfree -Mx,119,0x200000 [cite vasp.5.2/makefile.linux_pg] #----------------------------------------------------------------------- # general fortran flags (there must a trailing blank on this line) # the -Mx,119,0x200000 is required if you use older pgf90 versions # on a more recent LINUX installation # the option will not do any harm on other 3.X pgf90 distributions #----------------------------------------------------------------------- 译: 一般的fortran编译选项(本行结尾必须有一个空格)。 如果你在比较新的LINUX发行版中使用较旧的pgf90版本,你需要“-Mx,119,0x200000”选项。 这个选项不会对其它 3.X pgf90发行版产生任何害处。 -O1[cite man pgf90] −O[level] Set the optimization level. If −O is not specified, then the default level is 1 if −g is not specified,and 0 if −g is specified. If a number is not supplied with −O then the optimization levelisset to 2.The optimization levels and their meanings are as follows: 设定优化等级。如果 -O 没有被专门设定, 那么如果没有设定 -g ,则默认等级为1,反之为0。如果你设定了一个不被 –O 支持的数字,则优化等级被设为2.优化等级与他们的含义如下: 0 A basic block is generated for each C statement. No scheduling is done between statements. No global optimizations are performed. 0 每个C语句都产生一个基本语句块。不对语句块的顺序重新排列。不进行全局优化。 1 Scheduling within extended basic blocks is performed. Some register allocation is performed. No global optimizations are performed. 1 执行扩展的基本语句块内的重排。某些寄存器被分配以使用。不进行全局优化。 2 All level 1 optimizations are performed. In addition, traditional scalar optimizations such as induction recognition and loop invariant motion are performed by the global optimizer. 执行所有的1级优化。此外,传统的“标量优化”,例如“诱发识别”和“循环不变”等通过全局优化实现。 3 All level 1 and 2 optimizations are performed. In addition, this level enables more aggressive code hoisting and scalar replacement optimizations that may or may not be profitable. 执行所有的1级和2级优化。此外,这个等级允许更多的、不知是否合适的积极的代码优化和标量取代优化被执行。 4 All level 1,2and 3 optimizations are performed. In addition, hoisting of guarded invariant floating point expressions is enabled. 执行所有的1,2和3级优化。此外,这个等级允许对对浮点数表达式的优化。 makefile.linux_pgi_opt -tp k8-64 –i8 -tp k8-64 [cite man pgf90] −tp target Specify the type of the target processor; possibilities are −tp amd64 AMD Opteron or Athlon-64 in 64-bit mode −tp amd64e AMD Opteron revision E or later,in64-bit mode; includes SSE3 instructions −tp athlon AMD Athlon processor −tp athlonxp AMD AthlonXP and AthlonMP processor −tp barcelona −tp barcelona−32 AMD Barcelona processor in 32-bit mode −tp barcelona−64 AMD Barcelona processor in 64-bit mode −tp core2 −tp core2−32 Intel core2 processor in 32-bit mode −tp core2−64 Intel core2 processor in 64-bit mode −tp istanbul −tp istanbul−32 AMD Istanbul architecture Opteron processor,32-bit mode −tp istanbul−64 AMD Istanbul architecture Opteron processor,64-bit mode −tp k7 AMD Athlon processor −tp k8−32 AMD Opteron or Athlon-64 in 32-bit mode −tp k8−64 AMD Opteron or Athlon-64 in 64-bit mode −tp k8−64e AMD Opteron revision E or later,in64-bit mode; includes SSE3 instructions −tp nehalem −tp nehalem−32 Intel Nehalem architecture Core processor,32-bit mode −tp nehalem−64 Intel Nehalem architecture Core processor,64-bit mode −tp p5 Pentium processor −tp p6 Pentium Pro / Pentium II −tp p7 −tp p7−32 Pentium 4 processor −tp p7−64 IA32/EM64T processor in 64-bit mode −tp penryn −tp penryn−32 Intel Penryn architecture Pentium processor,32-bit mode −tp penryn−64 Intel Penryn architecture Pentium processor,64-bit mode −tp piii Pentium III processor −tp piv Pentium 4 processor −tp px −tp px−32 Blended code generation that will work on anyx86-compatible processor −tp px−64 Blended code generation that will work on any64-bit x86 processor −tp shanghai −tp shanghai−32 AMD Shanghai architecture Opteron processor,32-bit mode −tp shanghai−64 AMD Shanghai architecture Opteron processor,64-bit mode −tp x64 Single binary where each procedure is optimized for both the AMD Opteron and the Intel IA32/EM64T in 64-bit mode; the selection of which optimized copy to execute is made at run time depending on the machine executing the code. The default in the absence of the −tp flag is to compile for the type of CPU on which the compiler is running. −i8 [cite man pgf90] −i2 Treat INTEGER variables as twobytes. −i4 Treat INTEGER variables as four bytes. −i8 Treat default INTEGER and LOGICAL variables as eight bytes. Foroperations involving integers, use 64-bits for computations. vasp.5.2中的Makefile makefile.linux_pg −Mfree –Mx,119,0x200000 –O2 –tp p6 −Mfree [cite man pgf90] −Mfree −Mfreeform −Mnofree −Mnofreeform Process Fortran source using free form specifications. The −Mnofree and −Mfixed options specify fixed form formatting. By default files with a .f90, .F90, .f95 or .F95 extension use freeform formatting. KEY WORDS: FFLAGS fortran编译选项 ifort Intel PGI pgf90[ Last edited by dxf_dxf_dxf on 2012-4-10 at 15:55 ] |
» 本帖附件资源列表
-
欢迎监督和反馈:小木虫仅提供交流平台,不对该内容负责。
本内容由用户自主发布,如果其内容涉及到知识产权问题,其责任在于用户本人,如对版权有异议,请联系邮箱:xiaomuchong@tal.com - 附件 1 : ifort.pdf
- 附件 2 : pgf90.pdf
2012-04-10 15:42:46, 407.79 K
2012-04-10 15:42:47, 60.08 K
» 收录本帖的淘帖专辑推荐
第一性原理计算经验 | @个人收集@ | VASP资料 | 有效质量 |
» 猜你喜欢
三甲基碘化亚砜的氧化反应
已经有4人回复
请问下大家为什么这个铃木偶联几乎不反应呢
已经有5人回复
请问有评职称,把科研教学业绩算分排序的高校吗
已经有5人回复
孩子确诊有中度注意力缺陷
已经有12人回复
2025冷门绝学什么时候出结果
已经有3人回复
天津工业大学郑柳春团队欢迎化学化工、高分子化学或有机合成方向的博士生和硕士生加入
已经有4人回复
康复大学泰山学者周祺惠团队招收博士研究生
已经有6人回复
AI论文写作工具:是科研加速器还是学术作弊器?
已经有3人回复
论文投稿,期刊推荐
已经有4人回复
硕士和导师闹得不愉快
已经有13人回复
» 本主题相关价值贴推荐,对您同样有帮助:
VASP 5.3安装出现问题,求助
已经有8人回复
VASP5.2版本并行安装时出问题了,已经到最后一步了
已经有28人回复
学习VASP,在编译的时候要用到Fortran嘛?或者是其他编程软件
已经有4人回复
使用ifort+MKL编译VASP,出错信息却是gfortran
已经有11人回复
编译vasp.5.lib出错
已经有7人回复
ntrex1:Bad file descriptor
已经有3人回复
【Plackett—Burman实验,这样正常么?】
已经有6人回复
taphophilia在中文里应该怎么解释呢?
已经有10人回复
求助:VASP 安装
已经有17人回复
【求助成功】Vasp 5.2.11编译出错
已经有10人回复
【求助】f77的ifdef语句
已经有18人回复
【求助】VASP安装makefile选择
已经有6人回复
【求助】在三维空间中有五个点,这五个点能否相互之间距离相等?非常感谢
已经有8人回复
【求助】vasp 编译错误
已经有5人回复
【讨论】编译lammps时Makefile的修改问题
已经有8人回复
|
简略版 Gfortran编译器 略 Intel编译器 vasp.5.lib中的Makefile makefile.linux_ifc_P4 −O0 −FI –FR −O0 [cite man ifort] −O[n] n=0,1,2,3 Specifies the code optimization for applications. −FI [cite man ifort] −nofixed Specifies source files are in fixed format. Linux and Mac OS X: −FI −FR [cite man ifort] −free −nofree Specifies source files are in free format. Alternate Options: Linux and Mac OS X: −FR vasp.5.2中的Makefile makefile.linux_ifc_P4 −FR –lowercase –assume byterecl –lowercase [cite man ifort] −names keyword Specifies howsource code identifiers and external names are interpreted. keyword Specifies how to interpret the identifiers and external names in source code. Possible values are: lowercase Causes the compiler to ignore case differences in identifiers and to convert external names to lowercase. Alternate Options: names lowercase Linux and Mac OS X: −lowercase (this is a deprecated option) names uppercase Linux and Mac OS X: −uppercase (this is a deprecated option) −assume byterecl [cite man ifort] −assume keyword Tells the compiler to make certain assumptions. keyword Specifies the assumptions to be made. [no]byterecl Determines whether units for the OPEN statement RECL specifier (record length) value in unformatted files are in bytes or longwords (four−byte units). −assume byterecl [cite vasp.5.2/makefile.linux_ifc_P4] #----------------------------------------------------------------------- # general fortran flags (there must a trailing blank on this line) # byterecl is strictly required for ifc, since otherwise # the WAVECAR file becomes huge #----------------------------------------------------------------------- −Mfree [cite man pgf90] PGI编译器 vasp.5.lib中的Makefile makefile.linux_pg & makefile.linux_pgi_opt -Mx,119,0x200000 -O1 –Mfree -Mx,119,0x200000 [cite vasp.5.2/makefile.linux_pg] #----------------------------------------------------------------------- # general fortran flags (there must a trailing blank on this line) # the -Mx,119,0x200000 is required if you use older pgf90 versions # on a more recent LINUX installation # the option will not do any harm on other 3.X pgf90 distributions #----------------------------------------------------------------------- 译: 一般的fortran编译选项(本行结尾必须有一个空格)。 如果你在比较新的LINUX发行版中使用较旧的pgf90版本,你需要“-Mx,119,0x200000”选项。 这个选项不会对其它 3.X pgf90发行版产生任何害处。 -O1[cite man pgf90] −O[level] 0~4 makefile.linux_pgi_opt -tp k8-64 –i8 -tp k8-64 [cite man pgf90] −tp core2−64 Intel core2 processor in 64-bit mode −i8 [cite man pgf90] −i8 Treat default INTEGER and LOGICAL variables as eight bytes. Foroperations involving integers, use 64-bits for computations. vasp.5.2中的Makefile makefile.linux_pg −Mfree –Mx,119,0x200000 –O2 –tp p6 −Mfree [cite man pgf90] −Mfree −Mfreeform −Mnofree −Mnofreeform Process Fortran source using free form specifications. The −Mnofree and −Mfixed options specify fixed form formatting. By default files with a .f90, .F90, .f95 or .F95 extension use freeform formatting. [ Last edited by dxf_dxf_dxf on 2012-4-10 at 16:06 ] |
2楼2012-04-10 15:51:23
3楼2012-04-10 19:25:32
4楼2012-04-10 19:54:14
8楼2012-04-29 09:18:36
简单回复
雁儿霏霏5楼
2012-04-22 19:18
回复
五星好评 顶一下,感谢分享!
雁儿霏霏6楼
2012-04-22 19:18
回复
顶一下,感谢分享!
love52647楼
2012-04-28 10:55
回复
五星好评 



zhmdream9楼
2012-09-16 23:48
回复
五星好评 顶一下,感谢分享!
zhmdream10楼
2012-09-16 23:48
回复
顶一下,感谢分享!
tangcheng911楼
2012-10-22 02:19
回复
五星好评 顶一下,感谢分享!
love526412楼
2013-04-06 05:35
回复


zuocuiping13楼
2013-04-07 08:33
回复
三星好评
28535206514楼
2013-04-09 09:29
回复
五星好评 顶一下,感谢分享!
28535206515楼
2013-04-29 20:26
回复
顶一下,感谢分享!
叶色风铃16楼
2015-05-12 23:30
回复
五星好评 顶一下,感谢分享!
shi39891443917楼
2015-08-02 12:19
回复
五星好评 顶一下,感谢分享!
zhy小桥流水18楼
2016-03-25 18:22
回复
五星好评 顶一下,感谢分享!
zhy小桥流水19楼
2016-03-31 10:50
回复
顶一下,感谢分享!














回复此楼