Personal tools

Difference between revisions of "Compilation preprocessor settings"

From MohidWiki

Jump to: navigation, search
Line 1: Line 1:
During compilation of the MOHID source code, at preprocessing time, depending on the definition and values of preprocessor variables, different regions of the code will be compiled.
+
During compilation of the MOHID source code, at preprocessing time, depending on the definition and values of preprocessor variables, different regions of the code will be compiled. Each preprocessor variable has a scope within the code where it is used. The scope of a preprocessor variable definition can be a single module or it can be the whole solution or only one project of the solution (such as Base1 or Base2).
  
The advanced MOHID user should be aware of the optional preprocessor settings as the released executables don't contain all the possibilities available and this obliges one to compile its own version of the MOHID executable.
+
The advanced MOHID user should be aware of the optional preprocessor settings as the released executables don't contain all the possibilities available and this obliges one to compile its own version of the MOHID executable under certain circumstances.
  
 
== Exclude modules ==
 
== Exclude modules ==

Revision as of 10:01, 10 April 2012

During compilation of the MOHID source code, at preprocessing time, depending on the definition and values of preprocessor variables, different regions of the code will be compiled. Each preprocessor variable has a scope within the code where it is used. The scope of a preprocessor variable definition can be a single module or it can be the whole solution or only one project of the solution (such as Base1 or Base2).

The advanced MOHID user should be aware of the optional preprocessor settings as the released executables don't contain all the possibilities available and this obliges one to compile its own version of the MOHID executable under certain circumstances.

Exclude modules

Some modules can be completely excluded from compilation. If your simulations do not use these modules you can use this pre-processor keywords.

_LAGRANGIAN_	   excludes Modules Lagrangian + Jet + Oil
_AIR_	           excludes Modules InterfaceWaterAir + Atmosphere
_WAVES_	           excludes Module Waves
_SEDIMENT_	   excludes Modules SedimentProperties + Consolidation

Performance options

Use this option if you want to nest several domains

_USE_MPI           includes MPI code

Time Series Maximum Number of Columns in Character size

Default line_length of input/output ascii files such as TimeSeries is 256, however this can be a problem if the time series contains many many columns with many many properties and exceeds the 256 characters limit. Conveniently, this can be changed by defining the following preprocessor options

Scope: ModuleGlobalData
_SHORT_LINE_LENGTH        sets line_length = 64
_LONG_LINE_LENGTH         sets line_length = 1024
_BIG_LINE_LENGTH          sets line_length = 6144
_EXTRA_LONG_LINE_LENGTH   sets line_length = 131072
_EXTRA_SHORT_LINE_LENGTH  sets line_length = 32

Miscelaneous options

_GUI_              includes GUI code

Errors that may arise from incorrect preprocessor variables definition