Changes between Version 1 and Version 2 of doc/app/cpp_options


Ignore:
Timestamp:
Jul 19, 2018 12:51:45 PM (7 years ago)
Author:
raasch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/app/cpp_options

    v1 v2  
    44= PALM preprocessor options / define strings
    55
    6 PALM uses so-called preprocessor define strings for conditional compilation of the code. Additionally, some preprocessor options are used to replace specific character strings. The following list gives a complete overview of the define strings used in the PALM code, and of additional preprocessor options that are used to replace strings in the FORTRAN code.
     6PALM uses so-called preprocessor define strings for conditional compilation of the code. These compile switches are mainly used for activating calls to external libraries like MPI or NetCDF. Additionally, some preprocessor options are used to replace specific character strings. Define strings and other preprocessor options need to be given in the configuration file {{{.palm.config.<host_identifier>}}} in the line starting with {{{%cpp_options}}}.
    77
    8 The define strings are used to activate specific parts of the code. For activation, compiler option {{{-Dactivation_string}}} has to be used. All activation strings used in PALM start with two underscores, e.g. {{{__parallel}}}
     8The following list gives a complete overview of the define strings used in the PALM code, and of additional preprocessor options that are used to replace strings in the FORTRAN code.
     9
     10
     11== '''Define strings''' ==
     12
     13The define strings are used to activate specific parts of the code. For activation, compiler option {{{-Dactivation_string}}} has to be used. All activation strings used in PALM start with two underscores, e.g. {{{__parallel}}}. Be aware to add respective include- and library-paths to the compiler options with respect to the specific define strings that has been set, e.g. if you have set {{{-D__netcdf}}} you need to provide the path to the NetCDF library.
    914
    1015
    1116||='''activation_string''' =||='''meaning''' =||
    1217|-----------
    13 ||__dvrp_graphics     ||      ||
    14 ||__fftw              ||      ||
    15 ||__ibm               ||      ||
    16 ||__intel_compiler    ||      ||
    17 ||__logging           ||      ||
    18 ||__mpifh             ||      ||
    19 ||__nec               ||      ||
    20 ||__netcdf            ||      ||
    21 ||__netcdf4           ||      ||
    22 ||__netcdf4_parallel  ||      ||
    23 ||__nopointer         ||      ||
    24 ||__parallel          ||test  ||
    25 ||__rrtmg             ||      ||
     18||{{{__dvrp_graphics}}}     ||Enables usage of the DVR graphic software from Univ. of Hamburg      ||
     19||{{{__fftw}}}              ||Enables usage of the FFTW library.      ||
     20||{{{__ibm}}}               ||Enables usage of specific IBM FFT. This additionally requires to set the initialization parameter [wiki:/doc/app/inipar#fft_method fft_method] = 'system-specific'. Do not use {{{-D__nec}}} at the same time. ||
     21||{{{__intel_compiler}}}    ||May be used in case of the Intel FORTRAN compiler to guarantee correct formatting of the progress bar, which is output to the terminal in case of interactive PALM runs.  ||
     22||{{{__logging}}}           ||Used by PALM developers to activate additional and extensive debug output.   ||
     23||{{{__mpifh}}}             ||Needs to be set in case of old MPI-libraries (using FORTRAN77 standard) which only support INCLUDE files (instead of FORTRAN modules). Is only effective if {{{-D__parallel}}} is set too.  ||
     24||{{{__nec}}}               ||Enables usage of specific NEC FFT. This additionally requires to set the initialization parameter [wiki:/doc/app/inipar#fft_method fft_method] = 'system-specific'. Do not use {{{-D__ibm}}} at the same time. ||
     25||{{{__netcdf}}}            ||Enables NetCDF I/O. If this activation string is not set, PALM does not read or write any NetCDF data. ASCII I/O files are not affected. You may omit {{{-D__netcdf}}} in order to test PALM without having a NetCDF library available on your system.    ||
     26||{{{__netcdf4}}}           ||Enables to use the NetCDF4/HDF5 data format. {{{-D__netcdf}}} has to be set too. See initialization parameter [wiki:/doc/app/d3par#netcdf_data_format netcdf_data_format] about how to choose the NetCDF data format. ||
     27||{{{__netcdf4_parallel}}}  ||Enables to use NetCDF4/HDF5 parallel I/O. {{{-D__netcdf}}} '''and''' {{{-D__netcdf4}}} have to be set too. See initialization parameter [wiki:/doc/app/d3par#netcdf_data_format netcdf_data_format] about how to choose the NetCDF data format.     ||
     28||{{{__nopointer}}}         ||Enables a pointer-free version of the PALM code. This is currently (July 2018) required to run PALM on GPUs.      ||
     29||{{{__parallel}}}          ||Enables usage of MPI. If you do '''not set''' {{{-D__parallel}}}, PALM runs in non-parallel mode on a single core.  ||
     30||{{{__rrtmg}}}             ||Enables usage of the Rapid Radiation Transfer Model library. See [wiki:/doc/tec/radiation#RRTMG] for further details.   ||
    2631
    2732
    28 Preprocessor options used for string replacement:
     33== '''Other preprocessor options''' ==
     34
     35Preprocessor options are used for string replacement. By default, two options are required to compile the PALM code:
    2936
    3037||='''option''' =||='''meaning''' =||
    3138|-----------
    32 ||-DMPI_REAL=MPI_DOUBLE_PRECISION    ||      ||
    33 ||-DMPI_2REAL=MPI_2DOUBLE_PRECISION  ||      ||
     39||{{{-DMPI_REAL=MPI_DOUBLE_PRECISION}}}    ||Replaces strings {{{MPI_REAL}}} by {{{MPI_DOUBLE_PRECISION}}} wherever they appear in the code.   ||
     40||{{{-DMPI_2REAL=MPI_2DOUBLE_PRECISION}}}  ||Replaces strings {{{MPI_2REAL}}} by {{{MPI_2DOUBLE_PRECISION}}} wherever they appear in the code.   ||
    3441
     42These preprocessor options are required, because by default the precision of {{{REAL}}} quantities in PALM is set to 64bit. You may define 32bit as the working precision (see routine [source:palm/trunk/SOURCE/mod_kinds.f90@3151#L69]). In such a case, you must omit the above preprocessor options.