^= '''This page is under construction! ''' = \\\\\\ = Recommended compiler options The PALM code uses standard FORTRAN 2003 and should compile on any compiler conforming with this standard. For known issues with current compilers see [wiki:Help/FAQ#installation]. Compilers currently used by the PALM group are Intel, Cray, PGI and GNU-Fortran. We recommend to use these compilers with the following options (library and include-file options are omitted here): '''Intel (version 14 and higher) for optimized code:'''\\\\{{{ifort -fpp -fpe0 -O3 -xHost -fp-model source -ftz -no-prec-div -no-prec-sqrt -ip}}} ||='''Option''' =||='''meaning''' =|| |----------- ||-fpp ||Runs the Fortran preprocessor on source files before compilation. || ||-fpe0 ||Specifies the floating-point exception handling level. Floating-point invalid, divide-by-zero, and overflow exceptions are enabled. If any such exceptions occur, execution is aborted. This option causes denormalized floating-point results to be set to zero. || ||-O3 ||Performs O2 optimizations and enables more aggressive loop transformations such as Fusion, Block-Unroll-and-Jam, and collapsing IF statements. || ||-xHost ||This option tells the compiler to generate instructions for the highest instruction set available on the compilation host processor. || ||-fp-model source ||Controls the semantics of floating-point calculations. Rounds intermediate results to source-defined precision. '''This option is required to force jobs to deliver reproduceble results. If not set, two PALM runs with exactly identical setup may produce different results.''' Code performance is slightly reduced when using this option. || ||-ftz ||This option flushes denormal results to zero when the application is in the gradual underflow mode. It may improve performance if the denormal values are not critical to your application's behavior. || ||-no-prec-div ||Enables optimizations that give slightly less precise results than full IEEE division. || ||-no-prec-sqrt ||The compiler uses a faster but less precise implementation of square root. || ||-ip ||Enables additional interprocedural optimizations for single-file compilation. || |---------- \\\\ '''Intel (version 14 and higher) for debugging:'''\\\\{{{ifort -fpp -fpe0 -O0 -check -check nooutput_conversion -traceback -g}}} ||='''Option''' =||='''meaning''' =|| |----------- ||-O0 ||Disables all optimizations. || ||-check ||All available runtime checks (e.g. array bounds) are switched on. || ||-check nooutput_conversion ||No checking for the fit of data items within a designated format descriptor field. '''If this option isn't set, compilation aborts with errors.''' || ||-traceback ||Tells the compiler to generate extra information in the object file to provide source file traceback information when a severe error occurs at run time. || ||-g ||Tells the compiler to generate full debugging information in the object file. || \\\\ '''Cray (version 8.5.6):'''\\\\{{{ftn -eZ -em -O3 -hnoomp -hnoacc -hfp3 -hdynamic -dynamic}}} ||='''Option''' =||='''meaning''' =|| |----------- ||-eZ ||Perform source preprocessing and compilation on Fortran source files. || ||-em ||When this option is enabled, the compiler creates .mod files to hold module information for future compiles. || ||-O3 ||Switch on most aggressive optimization level. || ||-hnoomp ||Disable compiler recognition of OpenMP directives. || ||-hnoacc ||Disables the compiler recognition of OpenACC accelerator directives. || ||-hfp3 ||Controls the level of floating point optimizations. (highest level would be -hfp4) || ||-hdynamic -dynamik ||Directs the compiler driver to link dynamic libraries at runtime. || \\\\ '''Cray (version 8.5.6) for debugging:'''\\\\{{{ftn -eZ -K trap=fp -eD -ei -em -O0 -hnoomp -hnoacc -hdynamic -dynamic}}} ||='''Option''' =||='''meaning''' =|| |----------- ||-K trap=fp ||Enable traps on divz, inv, or ovf exceptions. || ||-eD ||Enables all debugging options. || ||-ei ||Initializes all undefined local stack, static, and heap variables of type REAL or COMPLEX to an invalid value (signaling NaN). || ||-O0 ||Disables all optimizations including floating point optimizations and OpenACC acceleration. || '''Important on Cray-systems:''' Getting tracebacks requires setting of {{{export ATP_ENABLED=1}}} before execution of PALM. Use an input command in the configuration file for that: {{{ IC:export ATP_ENABLED=1 }}}