OpenM++ compiler (omc)
OpenM++ compiler (omc)

The OpenM++ compiler produces c++ (.cpp and .h) files and SQL files (.sql) from model source files (.ompp, .mpp) and parameter value files (.dat, .odat).

The following command line arguments are supported by omc:

  • -Omc.ModelName name/of/model/executable, e.g. RiskPaths
  • -Omc.ScenarioName name/of/base/scenario, e.g. Base
  • -Omc.InputDir input/dir/to/find/source/files
  • -Omc.OutputDir output/dir/to/place/compiled/cpp_and_h_and_sql/files
  • -Omc.UseDir use/dir/with/ompp/files
  • -Omc.ParamDir input/dir/to/find/parameter/files/for/scenario
  • -Omc.FixedDir input/dir/to/find/fixed/parameter/files/
  • -Omc.CodePage code page for converting source files, e.g. windows-1252
  • -Omc.MessageLanguage language to display output messages, default: user environment settings
  • -Omc.MessageFnc localized message functions, default: LT,logMsg,logFormatted,WriteLogEntry,WarningMsg,ModelExit
  • -Omc.NoLineDirectives suppress #line directives in generated cpp files
  • -OpenM.OptionsFile path/to/optional/omc.ini
  • -Omc.TraceScanning detailed tracing from scanner
  • -Omc.TraceParsing detailed tracing from parser
  • -Omc.SqlDir sql/script/dir to create SQLite database
  • -Omc.SqlPublishTo create sql scripts to publish in SQLite,MySQL,PostgreSQL,MSSQL,Oracle,DB2, default: SQLite

Short form of command line arguments:

  • -m short form of -Omc.ModelName
  • -s short form of -Omc.ScenarioName
  • -i short form of -Omc.InputDir
  • -o short form of -Omc.OutputDir
  • -u short form of -Omc.UseDir
  • -p short form of -Omc.ParamDir
  • -f short form of -Omc.FixedDir
  • -ini short form of -OpenM.OptionsFile

Also common OpenM log options supported: OpenM.LogToConsole, OpenM.LogToFile, OpenM.LogFilePath, OpenM.LogToStampedFile, OpenM.LogUseTimeStam, OpenM.LogUsePidStamp, OpenM.LogSql. Please see OpenM++ wiki for more information about log options.
Parameters can be specified on command line or through ini-file. Command line parameters take precedence.