Skip to content

Console Output

+ sudo chroot /var/www/build.openmodelica.org/virtual_machines/tmp-build/root su -l openmodelica -c omc /installLibraries.mos
OpenModelica Compiler OpenModelica 1.25.0~dev-147-gd750806
Copyright © 2019 Open Source Modelica Consortium (OSMC)
Distributed under OMSC-PL and GPL, see www.openmodelica.org

Usage: omc [Options] (Model.mo | Script.mos) [Libraries | .mo-files] 
* Libraries: Fully qualified names of libraries to load before processing Model or Script.
             The libraries should be separated by spaces: Lib1 Lib2 ... LibN.

* Options:
  -d, --debug                Sets debug flags. Use --help=debug to see available flags.
  -h, --help                 Displays the help text. Use --help=topics for more information.
 --v, --version              Print the version and exit.
      --target               Sets the target compiler to use.
                               Valid options: gcc, msvc, msvc10, msvc12, msvc13, msvc15, msvc19, vxworks69, debugrt
  -g, --grammar              Sets the grammar and semantics to accept.
                               Valid options: Modelica, MetaModelica, ParModelica, Optimica, PDEModelica
      --annotationVersion    Sets the annotation version that should be used.
                               Valid options: 1.x, 2.x, 3.x
      --std                  Sets the language standard that should be used.
                               Valid options: 1.x, 2.x, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, latest, experimental
      --showErrorMessages    Show error messages immediately when they happen.
      --showAnnotations      Show annotations in the flattened code.
      --noSimplify           Do not simplify expressions if set.
      --preOptModules        Sets the pre optimization modules to use in the back end. See --help=optmodules for more info.
                               Valid options:
                                * introduceOutputAliases
                                * clockPartitioning
                                * collapseArrayExpressions
                                * comSubExp
                                * dumpDAE
                                * dumpDAEXML
                                * encapsulateWhenConditions
                                * evalFunc
                                * evaluateParameters
                                * expandDerOperator
                                * findStateOrder
                                * inlineArrayEqn
                                * normalInlineFunction
                                * inputDerivativesForDynOpt
                                * introduceDerAlias
                                * removeEqualRHS
                                * removeProtectedParameters
                                * removeSimpleEquations
                                * removeUnusedParameter
                                * removeUnusedVariables
                                * removeVerySimpleEquations
                                * replaceEdgeChange
                                * residualForm
                                * resolveLoops
                                * simplifyAllExpressions
                                * simplifyIfEquations
                                * sortEqnsVars
                                * unitChecking
                                * wrapFunctionCalls

      --cheapmatchingAlgorithm Sets the cheap matching algorithm to use. A cheap matching algorithm gives a jump start matching by heuristics.
                               Valid options:
                                * 0
                                * 1
                                * 3

      --matchingAlgorithm    Sets the matching algorithm to use. See --help=optmodules for more info.
                               Valid options:
                                * BFSB
                                * DFSB
                                * MC21A
                                * PF
                                * PFPlus
                                * HK
                                * HKDW
                                * ABMP
                                * PR
                                * DFSBExt
                                * BFSBExt
                                * MC21AExt
                                * PFExt
                                * PFPlusExt
                                * HKExt
                                * HKDWExt
                                * ABMPExt
                                * PRExt
                                * BB
                                * SBGraph
                                * pseudo

      --indexReductionMethod Sets the index reduction method to use. See --help=optmodules for more info.
                               Valid options:
                                * none
                                * uode
                                * dynamicStateSelection
                                * dummyDerivatives

      --postOptModules       Sets the post optimization modules to use in the back end. See --help=optmodules for more info.
                               Valid options:
                                * addScaledVars_states
                                * addScaledVars_inputs
                                * addTimeAsState
                                * calculateStateSetsJacobians
                                * calculateStrongComponentJacobians
                                * collapseArrayExpressions
                                * constantLinearSystem
                                * countOperations
                                * cseBinary
                                * dumpComponentsGraphStr
                                * dumpDAE
                                * dumpDAEXML
                                * evaluateParameters
                                * extendDynamicOptimization
                                * generateSymbolicLinearization
                                * generateSymbolicSensitivities
                                * inlineArrayEqn
                                * inputDerivativesUsed
                                * lateInlineFunction
                                * partlintornsystem
                                * recursiveTearing
                                * reduceDynamicOptimization
                                * relaxSystem
                                * removeConstants
                                * removeEqualRHS
                                * removeSimpleEquations
                                * removeUnusedParameter
                                * removeUnusedVariables
                                * reshufflePost
                                * simplifyAllExpressions
                                * simplifyComplexFunction
                                * simplifyConstraints
                                * simplifyLoops
                                * simplifyTimeIndepFuncCalls
                                * simplifysemiLinear
                                * solveLinearSystem
                                * solveSimpleEquations
                                * symSolver
                                * symbolicJacobian
                                * tearingSystem
                                * wrapFunctionCalls

      --simCodeTarget        Sets the target language for the code generation.
                               Valid options: None, C, Cpp, omsicpp, ExperimentalEmbeddedC, JavaScript, omsic, XML, MidC
      --orderConnections     Orders connect equations alphabetically if set.
  -t, --typeinfo             Prints out extra type information if set.
  -a, --keepArrays           Sets whether to split arrays or not.
  -m, --modelicaOutput       Enables valid modelica output for flat modelica.
  -q, --silent               Turns on silent mode.
  -c, --corbaSessionName     Sets the name of the corba session if -d=interactiveCorba or --interactive=corba is used.
  -n, --numProcs             Sets the number of processors to use (0=default=auto).
  -i, --instClass            Instantiate the class given by the fully qualified path.
  -v, --vectorizationLimit   Sets the vectorization limit, arrays and matrices larger than this will not be vectorized.
  -s, --simulationCg         Turns on simulation code generation.
      --evalAnnotationParams Sets whether to evaluate parameters in annotations or not.
      --unitChecking         Enable unit checking.
      --generateLabeledSimCode Turns on labeled SimCode generation for reduction algorithms.
      --reduceTerms          Turns on reducing terms for reduction algorithms.
      --reductionMethod      Sets the reduction method to be used.
                               Valid options: deletion, substitution, linearization
      --demoMode             Disable Warning/Error Massages.
      --locale               Override the locale from the environment.
  -o, --defaultOCLDevice     Sets the default OpenCL device to be used for parallel execution.
      --maxTraversals        Maximal traversals to find simple equations in the acausal system.
      --dumpTarget           Redirect the dump to file. If the file ends with .html HTML code is generated.
      --delayBreakLoop       Enables (very) experimental code to break algebraic loops using the delay() operator. Probably messes with initialization.
      --tearingMethod        Sets the tearing method to use. Select no tearing or choose tearing method.
                               Valid options:
                                * noTearing
                                * minimalTearing
                                * omcTearing
                                * cellier

      --tearingHeuristic     Sets the tearing heuristic to use for Cellier-tearing.
                               Valid options:
                                * MC1
                                * MC2
                                * MC11
                                * MC21
                                * MC12
                                * MC22
                                * MC13
                                * MC23
                                * MC231
                                * MC3
                                * MC4

      --scalarizeMinMax      Scalarizes the builtin min/max reduction operators if true.
      --strict               Enables stricter enforcement of Modelica language rules.
      --scalarizeBindings    Always scalarizes bindings if set.
      --corbaObjectReferenceFilePath Sets the path for corba object reference file if -d=interactiveCorba is used.
      --hpcomScheduler       Sets the scheduler for task graph scheduling (list | listr | level | levelfix | ext | metis | mcp | taskdep | tds | bls | rand | none). Default: level.
      --hpcomCode            Sets the code-type produced by hpcom (openmp | pthreads | pthreads_spin | tbb | mpi). Default: openmp.
      --rewriteRulesFile     Activates user given rewrite rules for Absyn expressions. The rules are read from the given file and are of the form rewrite(fromExp, toExp);
      --replaceHomotopy      Replaces homotopy(actual, simplified) with the actual expression or the simplified expression. Good for debugging models which use homotopy. The default is to not replace homotopy.
                               Valid options:
                                * none
                                * actual
                                * simplified

      --generateSymbolicJacobian Generates symbolic Jacobian matrix, where der(x) is differentiated w.r.t. x. This matrix can be used by dassl or ida solver with simulation flag '-jacobian'.
      --generateSymbolicLinearization Generates symbolic linearization matrices A,B,C,D for linear model:
                              		:math:`\dot{x} = Ax + Bu`
                              		:math:`y = Cx + Du`
      --intEnumConversion    Allow Integer to enumeration conversion.
      --profiling            Sets the profiling level to use. Profiled equations and functions record execution time and count for each time step taken by the integrator.
                               Valid options:
                                * none
                                * blocks
                                * blocks+html
                                * all
                                * all_perf
                                * all_stat

      --reshuffle            sets tolerance of reshuffling algorithm: 1: conservative, 2: more tolerant, 3 resolve all
      --gDynOpt              Generate dynamic optimization problem based on annotation approach.
      --maxSizeSolveLinearSystem Max size for solveLinearSystem.
      --cppFlags             Sets extra flags for compilation with the C++ compiler (e.g. +cppFlags=-O3,-Wall)
      --removeSimpleEquations Specifies method that removes simple equations.
                               Valid options:
                                * none
                                * default
                                * causal
                                * fastAcausal
                                * allAcausal
                                * new

      --dynamicTearing       Activates dynamic tearing (TearingSet can be changed automatically during runtime, strict set vs. casual set.)
                               Valid options:
                                * false
                                * true
                                * linear
                                * nonlinear

      --symSolver            Activates symbolic implicit solver (original system is not changed).
                               Valid options: none, impEuler, expEuler
      --loop2con             Specifies method that transform loops in constraints. hint: using initial guess from file!
                               Valid options:
                                * none
                                * lin
                                * noLin
                                * all

      --forceTearing         Use tearing set even if it is not smaller than the original component.
      --simplifyLoops        Simplify algebraic loops.
                               Valid options:
                                * 0
                                * 1
                                * 2

      --recursiveTearing     Inline and repeat tearing.
                               Valid options:
                                * 0
                                * 1
                                * 2

      --flowThreshold        Sets the minium threshold for stream flow rates
      --matrixFormat         Sets the matrix format type in cpp runtime which should be used (dense | sparse ). Default: dense.
      --partlintorn          Sets the limit for partitionin of linear torn systems.
      --initOptModules       Sets the initialization optimization modules to use in the back end. See --help=optmodules for more info.
                               Valid options:
                                * calculateStrongComponentJacobians
                                * collapseArrayExpressions
                                * inlineArrayEqn
                                * constantLinearSystem
                                * extendDynamicOptimization
                                * generateHomotopyComponents
                                * inlineHomotopy
                                * inputDerivativesUsed
                                * recursiveTearing
                                * reduceDynamicOptimization
                                * replaceHomotopyWithSimplified
                                * simplifyAllExpressions
                                * simplifyComplexFunction
                                * simplifyConstraints
                                * simplifyLoops
                                * solveSimpleEquations
                                * tearingSystem
                                * wrapFunctionCalls

      --maxMixedDeterminedIndex Sets the maximum mixed-determined index that is handled by the initialization.
      --useLocalDirection    Keeps the input/output prefix for all variables in the flat model, not only top-level ones.
      --defaultOptModulesOrdering If this is activated, then the specified pre-/post-/init-optimization modules will be rearranged to the recommended ordering.
      --preOptModules+       Enables additional pre-optimization modules, e.g. --preOptModules+=module1,module2 would additionally enable module1 and module2. See --help=optmodules for more info.
      --preOptModules-       Disables a list of pre-optimization modules, e.g. --preOptModules-=module1,module2 would disable module1 and module2. See --help=optmodules for more info.
      --postOptModules+      Enables additional post-optimization modules, e.g. --postOptModules+=module1,module2 would additionally enable module1 and module2. See --help=optmodules for more info.
      --postOptModules-      Disables a list of post-optimization modules, e.g. --postOptModules-=module1,module2 would disable module1 and module2. See --help=optmodules for more info.
      --initOptModules+      Enables additional init-optimization modules, e.g. --initOptModules+=module1,module2 would additionally enable module1 and module2. See --help=optmodules for more info.
      --initOptModules-      Disables a list of init-optimization modules, e.g. --initOptModules-=module1,module2 would disable module1 and module2. See --help=optmodules for more info.
      --instCacheSize        Sets the size of the internal hash table used for instantiation caching.
      --maxSizeLinearTearing Sets the maximum system size for tearing of linear systems (default 200).
      --maxSizeNonlinearTearing Sets the maximum system size for tearing of nonlinear systems (default 10000).
      --noTearingForComponent Deactivates tearing for the specified components.
                              Use '-d=tearingdump' to find out the relevant indexes.
      --daeMode              Generates code to simulate models in DAE mode. The whole system is passed directly to the DAE solver SUNDIALS/IDA and no algebraic solver is involved in the simulation process.
      --inlineMethod         Sets the inline method to use.
                              replace : This method inlines by replacing in place all expressions. Might lead to very long expression.
                              append  : This method inlines by adding additional variables to the whole system. Might lead to much bigger system.
                               Valid options: replace, append
      --setTearingVars       Sets the tearing variables by its strong component indexes. Use '-d=tearingdump' to find out the relevant indexes.
                              Use following format: '--setTearingVars=(sci,n,t1,...,tn)*', with sci = strong component index, n = number of tearing variables, t1,...tn = tearing variables.
                              E.g.: '--setTearingVars=4,2,3,5' would select variables 3 and 5 in strong component 4.
      --setResidualEqns      Sets the residual equations by its strong component indexes. Use '-d=tearingdump' to find out the relevant indexes for the collective equations.
                              Use following format: '--setResidualEqns=(sci,n,r1,...,rn)*', with sci = strong component index, n = number of residual equations, r1,...rn = residual equations.
                              E.g.: '--setResidualEqns=4,2,3,5' would select equations 3 and 5 in strong component 4.
                              Only works in combination with 'setTearingVars'.
      --ignoreCommandLineOptionsAnnotation Ignores the command line options specified as annotation in the class.
      --calculateSensitivities Generates sensitivities variables and matrices.
  -r, --alarm                Sets the number seconds until omc timeouts and exits. Used by the testing framework to terminate infinite running processes.
      --totalTearing         Activates total tearing (determination of all possible tearing sets) for the specified components.
                              Use '-d=tearingdump' to find out the relevant indexes.
      --ignoreSimulationFlagsAnnotation Ignores the simulation flags specified as annotation in the class.
      --dynamicTearingForInitialization Enable Dynamic Tearing also for the initialization system.
      --preferTVarsWithStartValue Prefer tearing variables with start value for initialization.
      --equationsPerFile     Generate code for at most this many equations per C-file (partially implemented in the compiler).
      --evaluateFinalParameters Evaluates all the final parameters in addition to parameters with annotation(Evaluate=true).
      --evaluateProtectedParameters Evaluates all the protected parameters in addition to parameters with annotation(Evaluate=true).
      --replaceEvaluatedParameters Replaces all the evaluated parameters in the DAE.
      --condenseArrays       Sets whether array expressions containing function calls are condensed or not.
      --wfcAdvanced          wrapFunctionCalls ignores more then default cases, e.g. exp, sin, cos, log, (experimental flag)
      --tearingStrictness    Sets the strictness of the tearing method regarding the solvability restrictions.
                               Valid options:
                                * casual
                                * strict
                                * veryStrict

      --interactive          Sets the interactive mode for omc.
                               Valid options:
                                * none
                                * corba
                                * tcp
                                * zmq

  -z, --zeroMQFileSuffix     Sets the file suffix for zeroMQ port file if --interactive=zmq is used.
      --homotopyApproach     Sets the homotopy approach.
                               Valid options:
                                * equidistantLocal
                                * adaptiveLocal
                                * equidistantGlobal
                                * adaptiveGlobal

      --ignoreReplaceable    Sets whether to ignore replaceability or not when redeclaring.
      --postOptModulesDAE    Sets the optimization modules for the DAEmode in the back end. See --help=optmodules for more info.
      --evalLoopLimit        The loop iteration limit used when evaluating constant function calls.
      --evalRecursionLimit   The recursion limit used when evaluating constant function calls.
      --singleInstanceAglSolver Sets to instantiate only  one algebraic loop solver all algebraic loops
      --showStructuralAnnotations Show annotations affecting the solution process in the flattened code.
      --initialStateSelection Activates the state selection inside initialization to avoid singularities.
      --linearizationDumpLanguage Sets the target language for the produced code of linearization.
                               Valid options:
                                * none
                                * modelica
                                * matlab
                                * julia
                                * python

      --noASSC               Disables analytical to structural singularity conversion.
      --fullASSC             Enables full equation replacement for BLT transformation from the ASSC algorithm.
      --realASSC             Enables the ASSC algorithm to evaluate real valued coefficients (usually only integers).
      --initASSC             Enables the ASSC algorithm for initialization.
      --maxSizeASSC          Sets the maximum system size for the analytical to structural conversion algorithm (default 200).
  -f, --baseModelica         Outputs experimental Base Modelica.
      --fmiFilter            Specifies which model variables are exposed by the modelDescription.xml
                               Valid options:
                                * none
                                * internal
                                * protected
                                * blackBox

      --fmiSources           Defines if FMUs will be exported with sources or not. --fmiFilter=blackBox might override this, because black box FMUs do never contain their source code.
      --fmiFlags             Add simulation flags to FMU. Will create <fmiPrefix>_flags.json in resources folder with given flags. Use --fmiFlags or --fmiFlags=none to disable [default]. Use --fmiFlags=default for the default simulation flags. To pass flags use e.g. --fmiFlags=s:cvode,nls:homotopy or --fmiFlags=path/to/yourFlags.json.
      --fmuCMakeBuild        Configured and build FMU with CMake if true.
      --newBackend           Activates experimental new backend for better array handling. This also activates the new frontend. [WIP]
      --parmodauto           Experimental: Enable parallelization of independent systems of equations in the translated model. Only works on Linux systems.
      --interactivePort      Sets the port used by the interactive server.
      --allowNonStandardModelica Flags to allow non-standard Modelica.
                               Valid options:
                                * nonStdMultipleExternalDeclarations
                                * nonStdEnumerationAsIntegers
                                * nonStdIntegersAsEnumeration
                                * nonStdDifferentCaseFileVsClassName
                                * nonStdTopLevelOuter
                                * protectedAccess
                                * reinitInAlgorithms
                                * unbalancedModel
                                * implicitParameterStartAttribute

      --exportClocksInModelDescription exports clocks in modeldescription.xml for fmus, The default is false.
      --linkType             Sets the link type for the simulation executable.
                              dynamic: libraries are dynamically linked; the executable is built very fast but is not portable because of DLL dependencies.
                              static: libraries are statically linked; the executable is built more slowly but it is portable and dependency-free.
                               Valid options: dynamic, static
      --tearingAlwaysDer     Always choose state derivatives as iteration variables in strong components.
      --dumpFlatModel        Dumps the flat model at the given stages of the frontend.
                               Valid options:
                                * flatten
                                * connections
                                * eval
                                * simplify
                                * scalarize

  -u, --simulation           Simulates the last model in the given Modelica file.
      --obfuscate            Obfuscates identifiers in the simulation model
                               Valid options:
                                * none
                                * encrypted
                                * protected
                                * full

      --fmuRuntimeDepends    Defines if runtime library dependencies are included in the FMU. Only used when compiler flag fmuCMakeBuild=true.
                               Valid options:
                                * default
                                * none
                                * modelica
                                * all

      --frontendInline       Enables inlining of functions in the frontend.
      --exposeLocalIOs       Introduces top-level inputs/outputs for unconnected input/output connectors at requested levels, provided they are public, 0 meaning top-level (standard Modelica), 1 inputs/outputs of top-level components, >1 going deeper. This flag is particularly useful for FMI export.
      --baseModelicaFormat   Formatting options for Base Modelica
                               Valid options: scalarized, partiallyScalarized, nonScalarized, withRecords, withoutRecords
      --baseModelicaOptions  Enables optional Base Modelica options.
                               Valid options:
                                * moveBindings
                                * scalarize

      --debugFollowEquations Takes a list of equation names and prints the corresponding equations after each stage of the backend process.
      --maxSizeLinearization Sets the maximum system size for which linearization code is generated.

For more details on a specific topic, use --help=topics or help("topics")

* Examples:
  omc Model.mo             will produce flattened Model on standard output.
  omc -s Model.mo          will produce simulation code for the model:
                            * Model.c           The model C code.
                            * Model_functions.c The model functions C code.
                            * Model.makefile    The makefile to compile the model.
                            * Model_init.xml    The initial values.
  omc Script.mos           will run the commands from Script.mos.
  omc Model.mo Modelica    will first load the Modelica library and then produce 
                            flattened Model on standard output.
  omc Model1.mo Model2.mo  will load both Model1.mo and Model2.mo, and produce 
                            flattened Model1 on standard output.
  *.mo (Modelica files) 
  *.mos (Modelica Script files)

For available simulation flags, use --help=simulation.

Documentation is available in the built-in package OpenModelica.Scripting or
online <https://build.openmodelica.org/Documentation/OpenModelica.Scripting.html>.