Minor release 15 of November 2023
Minor release 15 of November 2023
20231115 : v1.15.6
This is a minor release and it is recommended for all model developers.
Changes in that release:
- c++ core: early error detection of unmatched comment, brace, parenthesis, bracket, or syntactic island
- c++ core: new Model Metrics Report
- c++ core: disable model build steps for speedier model code syntax checking
- c++ core: new options which emit warnings for missing model symbol documentation
- c++ core: new options which emit warnings for missing explicit names
- c++ core: explicit short names can be used in //LABEL and /*NOTE
- c++ core: event Trace can display table increments
- c++ core: detect unrecognized option and raise error
- c++ core: disable population scaling for a case-based model
- dbcopy: suppress zero and/or null in csv output
- go oms: use ini-file for run description to fix -Description bug
- go oms API: in run comparison csv allow to use multiple variant runs, comma separated.
- R: use openM++ models in cloud from local computer RStudio
- UI: prevent user to leave parameter page if notes edited and not saved
Early error detection of unmatched comment, brace, parenthesis, bracket, or syntactic island
In this release, the OpenM++ compiler (omc) detects and emits an error message if it encounters an unmatched
- C-style comment /* */
- brace { }
- parenthesis ( )
- bracket [ ]
- syntactic island, e.g. a syntactic island which is missing its trailing ‘;’
This error detection occurs for both ompp syntactic islands and for C++ code in model code.
The error will stop the build early in the ompp compilation phase before code generation and DB publishing, and before C++ compilation.
If the mismatch occurs at the end-of-file (EOF) of a code module, the error message indicates the line where the construct started, e.g. the opening /* of a C-style comment which had no finishing */.
For example, if a module HostCore.mpp contained an unterminated NOTE which started at line 364
/* NOTE(Person.myfunc,EN)
the OpenM++ compiler would detect the error at the EOF of HostCore.mpp, but would emit the error message
1>../code/HostCore.mpp(364): error : unexpected EOF due to unmatched /* */.
to indicate line 364 where the comment started, rather than the last line of the module where the error was detected.
If a mismatch is detected before EOF due to a supernumerary closing brace/parenthesis/bracket, the error message gives the line where the error was detected followed by a note giving the line of the innermost preceding matching construct, e.g.
1>../code/HostCore.mpp(370): error : '}' without opening '{'.
1>../code/HostCore.mpp(364) : note: Location of innermost previous '{'.
The brace-matching capabilities of your IDE may help locate missing matching constructs, e.g. Ctrl-] in Visual Studio with the cursor after a brace, parenthesis, or bracket will navigate to the matching brace. Note that if there is no matching brace, Ctrl-] does nothing (but a red squiggly indicates the brace has no match).
Note: The OpenM++ compiler does not grammatically parse C++ code located outside of OpenM++ syntactic islands. This error condition is detected at a lower pre-grammatical level in the parsing process.
New Model Metrics Report
A Model Metrics Report is now produced by the OpenM++ compiler.
It summarizes code inputs, code outputs, model inputs, model outputs, model symbols, visibility to end users, and maintained dependencies.
For more information including an example using RiskPaths, please see
Model Metrics Report · openmpp/openmpp.github.io Wiki
Disable model build steps for speedier model code syntax checking
In Visual Studio, two Yes/No options have been added to Model Property Pages > Configuration Properties > OpenM++.
They are in the “Build Options” section of the dialog, with labels “Disable metadata publishing” and “Disable C++ build” (see screenshot below).
Turning both options on can significantly improve build speed for a big model when a syntax check of code changes is all that’s needed.
Evidently, turning on either of these options does not produce a functional model.
In a test of a large model, build time was reduced by ~8x (from ~2m to ~15s).
When changing these options, it’s probably better to Rebuild, rather than Build.
Thanks to Chantal for suggesting this enhancement.
New options which emit warnings for missing model symbol documentation
This enhancement implements a family of 15 options to help model developers identify and address missing label and note documentation in model code.
The 15 options target specific kinds of symbols and documentation. For example, one of the options targets missing translations of notes of published symbols.
When turned on, each option causes the OpenM++ compiler to issue a warning for each symbol which meets the option conditions.
The warnings contain file and line number and can be used to navigate directly to the relevant model code in an IDE.
For more, see: https://github.com/openmpp/openmpp.github.io/wiki/model-documentation#identifying-missing-symbol-documentation
Thanks to Claude Nadeau for pointing out the need for this enhancement and contributing to the design.
New options which emit warnings for missing explicit names
Explicit names replace default names like Dim2 in downloads with meaningful names like age_group.
This enhancement implements a family of 6 options to help model developers identify and address missing explicit names in model code.
When turned on, each option causes the OpenM++ compiler to issue a warning which meets the option conditions.
The warnings contain file and line number and can be used to navigate directly to the relevant model code in an IDE.
For more, see: https://github.com/openmpp/openmpp.github.io/wiki/external-names#identifying-missing-explicit-names
Explicit short names can be used in //LABEL
and /*NOTE
In this release, the two-part name in a //LABEL
or /*NOTE
model documentation comment can use the explicit short name for the second part of name as an alternative to the Modgen naming scheme, e.g. MyTable.region instead of MyTable.Dim3.
For more on explicit short names, see:
https://github.com/openmpp/openmpp.github.io/wiki/external-names#explicit-name
For more on two-part names in model documentation, see:
https://github.com/openmpp/openmpp.github.io/wiki/model-documentation#symbol-labels-label-with-two-part-name-explicit-short-name
Event Trace can display table increments
An entity table is updated ‘on the fly’ during a run, in response to changes in entity attributes.
Event Trace now includes options to see these table increments in the context of the entity’s timeline.
For a worked example, see: https://github.com/openmpp/openmpp.github.io/wiki/Event-Trace#worked-example-4
Detect unrecognized option and raise error
In this version, the OpenM++ compiler will detect an unrecognized option and issue an error.
For example, the following statement
options autofix_model_logic = on;
will produce an error message like
1>../code/ompp_framework.ompp(45): error : unrecognized option 'autofix_model_logic'
Disable population scaling for a case-based model
A new use
module which disables population scaling is included in this release.
This module (case_based/case_based_scaling_disable.ompp
) scales each sub upwards by the number of subs in the run, which causes overall (average) run results to become the sums of the original (unscaled) subs. This can be helpful for microdata-based models which partition the starting microdata among subs to gain computational speed through parallel execution of subs.
Thanks to Dominic for working with us on the underlying issue.
For more, see: Population Size and Scaling · openmpp/openmpp.github.io Wiki
Dbcopy: suppress zero and / or null in CSV output
Some output tables may contain large amount of zero values or missing values (NULLs). You can suppress zero values and / or NULL (missing) values in output tables or microdata CSV files:
dbcopy -m modelOne -dbcopy.To csv -dbcopy.NoZeroCsv
dbcopy -m modelOne -dbcopy.To csv -dbcopy.NoZeroCsv=true
dbcopy -m modelOne -dbcopy.To csv -dbcopy.NoNullCsv
dbcopy -m modelOne -dbcopy.To csv -dbcopy.NoNullCsv=true
dbcopy -m modelOne -dbcopy.To csv -dbcopy.NoZeroCsv -dbcopy.NoNullCsv
Thanks to Dominic Grenier for suggestion.
Oms API: in run comparison CSV allow to use multiple variant runs, comma separated
There is an oms
API method which allow to compare run output tables with arbitrary expressions and get results as CSV text file. Before it was possible to compare only two model runs, now you can supply multiple runs to compare. It can be a list of comma separated run digests (recommended) or run names or run stamps.
UI backend (oms): use ini-file for run description to fix -Description bug
There were a bug in UI and oms
back-end which prevented user to supply model run description started with -dash. It fixed now.
UI: prevent user to leave parameter page if notes edited and not saved
If user were editing parameter notes and did not save it before clicking on other tab in UI then message box appears now prompting user to save the notes.
R: use openM++ models in cloud from local computer RStudio
It was a long standing request from many cloud R users to have an ability to use RStudio on their own Windows desktop computers and run models from R scripts on cloud servers. Now there an R example published in our wiki how to do it: https://github.com/openmpp/openmpp.github.io/wiki/Run-RiskPaths-Model-from-local-PC-R-in-cloud . Please keep in mind that example contains an authentication details which may be different for your cloud, ask your IT support about authentication details for cloud environment.
Download source code and binaries:
- Windows
- Linux: Debian 12, Debian 11, Ubuntu 22.04, Ubuntu 20.04, RedHat 9
- Linux old stable: Debian 10, RedHat 8
- Linux: Debian stable (Debian 12)
- MacOS Arm
- MacOS Intel
Download release documentation archive:
Download cluster version (MPI):
IMPORTANT:
Full version of OpenM++ source code always included into "Download" links above.
Please do NOT use "Source code (zip)" or "Source code (tar.gz)" archives from "Assets" links below.
It is auto-generated by GitHub release tools and contains only half of OpenM++ source code.