-
Notifications
You must be signed in to change notification settings - Fork 0
OpenMpp Quick Start OpenM Developer
- Download: binary files and source code
- Latest source code: openM++ git
- (optional) Go source code: openM++ Go git
- (optional) UI source code: openM++ Go git
- Documentation: this wiki
- Pre-requisits described at: Setup Development Environment.
It is recommended to start from desktop version of openM++, not a cluster (MPI) version.
You need to use cluster version of openM++ to run the model on multiple computers in your network, in cloud or HPC cluster environment. OpenM++ is using MPI to run the models on multiple computers. Please check Model Run: How to Run the Model page for more details.
Tested platforms:
- Debian stable (12) 11 and 10, MX Linux 23, 21 and 19, Ubuntu 22.04, RedHat 9+
- g++ >= 8.3
- (optional) MPI, i.e.: OpenMPI >= 3.1 or MPICH (other MPI implementations expected to work but not tested)
- (optional) OpenMPI >= 4.0 on RedHat >= 8.3 (OpenMPI was broken on RedHat 8.1)
Note: It does work on most of latest Linux distributions, we just not testing regularly on every Linux version.
It is also occasionally tested on openSUSE, Mint, Manjaro, Solus and others.
It is not supported, but may also work on older versions, for example Ubuntu 20.04, Ubuntu 18.04 and RedHat 8.
Check your g++ --version
:
g++ (Debian 8.3.0-6) 8.3.0 # Debian 10 and MX Linux 19
g++ (Debian 10.2.1-6) 10.2.1 20210110 # Debian 11 and MX Linux 21
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 # Ubuntu 20.04
g++ (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5) # RedHat 8, Rocky Linux, AlmaLinux
Note: Above output does not include all possible Linux versions and may be outdated, openM++ supports almost any of modern Linux distribution.
To build debug version of openM++:
git clone https://github.com/openmpp/main.git master
cd master/openm/
make
cd ../models/
make
RedHat 8:
If want to rebuild omc (OpenM++ compiler) then you will need bison
version 3.3+ and flex
2.6+ installed,
see details at: Setup Development Environment.
It is optional and you can avoid it by rebuilding only openM++ run-time libararies:
git clone https://github.com/openmpp/main.git master
cd master/openm/
make libopenm
cd ../models/
make
To build release version of openM++: make RELEASE=1
To build MPI version of openM++: make OM_MSG_USE=MPI
Note: openM++ binary downloads build as: make RELEASE=1 OM_MSG_USE=MPI
RedHat 8: to build and run MPI version of openM++:
module load mpi/openmpi-x86_64
Of course, you can also use 32bit version of OpenMPI or MPICH.
Tested platforms:
- Windows 11, 10, it may also work on Windows 7 (64 and 32 bits), 2016 (64 bit)
- expected to work on any Windows 7 and above or 2008R2 and above, 32 and 64 bits, not regulary tested
- Visual Studio 2022 or 2019 (VS 2017 not supported, but may work), including Community Edition
- (optional) Microsoft MPI SDK Redistributable Package
To build debug version of openM++:
- checkout from openM++ git using your favorite Git client into
C:\SomeDir\
or use command line:
git clone https://github.com/openmpp/main.git SomeDir
-
download and unzip Windows version of bison and flex into
C:\SomeDir\bin\
. -
download and unzip sqlite3.exe into
C:\SomeDir\bin\
. -
use Visual Studio or MSBuild to build
C:\SomeDir\openm\openm.sln
solution. -
to build test model(s), i.e.: NewCaseBased, use Visual Studio or MSBuild:
C:\SomeDir\models\NewCaseBased\NewCaseBased-ompp.sln
.
To build MPI version of openM++:
-
download and install Microsoft MPI SDK and MPI Redistributable.
-
use Notepad to open
C:\SomeDir\openm\openm.build.props
, find and edit the line:
<OM_MSG_USE>MPI</OM_MSG_USE>
- build
C:\SomeDir\openm\openm.sln
solution. - rebuild the model and run it:
- go to menu: Project -> Properties -> Configuration Properties -> OpenM++
- change: Build Options -> Grid computing (MPI) -> MPI-enabled Executable (MPI)
- change: Run Options -> Number of processes to launch -> ....2 or more (depends on your cluster configuration)...
- change: Run Options -> Run the scenario after build -> Yes
- Rebuild Model project
At bottom Output window of Visual Studio you will see something like:
1>Model.vcxproj -> C:\SomeDir\models\RiskPaths\ompp\bin\RiskPaths_mpi.exe
1>2021-06-01 20:57:28.146 RiskPaths
1>2021-06-01 20:57:28.146 RiskPaths
1>2021-06-01 20:57:28.146 RiskPaths
1>2021-06-01 20:57:28.163 RiskPaths
........
1>2021-06-01 20:57:28.366 OpenM++ build : Windows 64 bit Release MPI
1>2021-06-01 20:57:28.367 Parallel run of 4 modeling processes, 1 thread(s) each
........
1>2021-06-01 20:57:28.859 member=3 Simulation progress=100% cases=2000
1>2021-06-01 20:57:28.867 member=3 Simulation summary: cases=2000, events/case=112.9, entities/case=1.0, elapsed=0.453989s
1>2021-06-01 20:57:28.868 member=3 Write output tables - start
1>2021-06-01 20:57:28.873 member=3 Write output tables - finish
1>2021-06-01 20:57:29.233 member=0 Write output tables - finish
1>2021-06-01 20:57:29.919 Writing into aggregated output tables, run: 102
1>2021-06-01 20:57:32.607 Done.
1>2021-06-01 20:57:32.607 Done.
1>2021-06-01 20:57:32.607 Done.
1>2021-06-01 20:57:32.607 Done.
1>Done building project "Model.vcxproj".
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
Note: binary downloads build with Microsoft MPI SDK and MPI Redistributable.
Note: If you getting build error MSB8036:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\Toolset.targets(34,5):
error MSB8036: The Windows SDK version 10.0.14393.0 was not found.
Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".
then do one of the following:
- "Retarget solution"
- use Visual Studio 2019
- start Visual Studio 2017 Installer (VS 2017 not supported but may work)
- Modify
- right column
- check box Windows 8.1 SDK and UCRT SDK
- Tested on MacOS latest, may work starting from Catalina 10.15 and 11.1+ Big Sur
Check your clang, make, bison, SQLite version:
clang --version
....
Apple clang version 11.0.0 (clang-1100.0.33.12)
make --version
....
GNU Make 3.81
bison --version
....
bison (GNU Bison) 3.8.2
sqlite3 --version
....
3.28.0 2019-04-15 14:49:49
To build debug version of openM++:
git clone https://github.com/openmpp/main.git ompp-main
cd ompp-main/openm/
make
cd ../models/
make
To build release version of openM++: make RELEASE=1
You can also use Xcode ~/ompp-main/openm/openm.xcworkspace
.
In order to build omc complier you need to use menu and select Product -> Scheme -> omc
Known issue: Xcode UI does not update check mark on selected scheme To fix it go to Product -> Scheme -> Manage Schemes and use mouse to drag any scheme to move it up or down.
Release version of omc is required in order to build any model other than modelOne.
In order to build and debug modelOne using Xcode please open ~/ompp-main/models/modelOne/modelOne.xcworkspace
- clone from GitHub:
git clone https://github.com/openmpp/R.git ompp-r
- Windows:
cd C:>C:\ompp-r
"C:\Program Files\R\R-3.4.0\bin\R.exe" CMD build openMpp
- Linux and MacOS:
cd ompp-r
R CMD build openMpp
Expected output:
* checking for file ‘openMpp/DESCRIPTION’ ... OK
* preparing ‘openMpp’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘openMpp_0.8.3.tar.gz’
- setup Go envirnment as described at: Setup Development Environment.
- initial checkout:
mkdir $HOME/go-ompp
cd $HOME/go-ompp
export GOPATH=$HOME/go-ompp
git clone https://github.com/openmpp/go ompp-go
- build Go utilities:
cd $HOME/go-ompp/ompp-go
go install -tags sqlite_math_functions,sqlite_omit_load_extension ./dbcopy
go install -tags sqlite_math_functions,sqlite_omit_load_extension ./oms
After initial checkout first go install
command can take ~30 seconds because go needs to get all dependencies.
By default only SQLite model databases supported by dbcopy
and oms
.
If you want to use other databases vendors please compile dbcopy
with ODBC enabled:
go install -tags odbc,sqlite_math_functions,sqlite_omit_load_extension ./dbcopy
Currently supported database vendors are: SQLite (default), Microsoft SQL Server, MySql, PostgreSQL, IBM DB2, Oracle. You can use dbcopy utility to copy model data between any of vendors above, for example copy from MySQL to MSSQL or from PostgeSQL to SQLite.
Instructions below assuming Windows environment and it is very much identical for Linux and MacOS, except of course, back slashes in directory paths.
- setup
node.js
environment as described at: Setup Development Environment. - checkout and build UI:
cd my-openm-plus-plus-dir
git clone https://github.com/openmpp/UI.git ompp-ui
cd ompp-ui
npm install
- make sure you have
models\bin
populated with *.sqlite db files and model executables. - it is recommended to have
my-openm-plus-plus-dir\etc
folder which can be found at openM++ release archive - start oms web-service by invoking:
-
ompp_ui.bat
on Windows -
ompp_ui.sh
on Linux -
ompp_ui.command
on MacOS - or do it in command line:
-
cd my-openmn-plus-plus-dir
bin\oms -oms.HomeDir models -oms.LogRequest
- start UI in debug mode:
cd my-openm-plus-plus-dir\ompp-ui
npm run dev
- open your favorite browser at
http://localhost:8080
- to build UI for production:
cd my-openm-plus-plus-dir\ompp-ui
npm run build
- copy HTML results folder
my-openm-plus-plus-dir\dist\spa\*
intomy-openm-plus-plus-dir\html\
- open your favorite browser at
http://localhost:4040
and refresh (clear browser cache if required)
*Note: UI is beta version and you need to stop oms
web-service in order to update, add or remove model .sqlite db files.
- Windows: Quick Start for Model Users
- Windows: Quick Start for Model Developers
- Linux: Quick Start for Model Users
- Linux: Quick Start for Model Developers
- MacOS: Quick Start for Model Users
- MacOS: Quick Start for Model Developers
- Model Run: How to Run the Model
- MIT License, Copyright and Contribution
- Model Code: Programming a model
- Windows: Create and Debug Models
- Linux: Create and Debug Models
- MacOS: Create and Debug Models
- MacOS: Create and Debug Models using Xcode
- Modgen: Convert case-based model to openM++
- Modgen: Convert time-based model to openM++
- Modgen: Convert Modgen models and usage of C++ in openM++ code
- Model Localization: Translation of model messages
- How To: Set Model Parameters and Get Results
- Model Run: How model finds input parameters
- Model Output Expressions
- Model Run Options and ini-file
- OpenM++ Compiler (omc) Run Options
- OpenM++ ini-file format
- UI: How to start user interface
- UI: openM++ user interface
- UI: Create new or edit scenario
- UI: Upload input scenario or parameters
- UI: Run the Model
- UI: Use ini-files or CSV parameter files
- UI: Compare model run results
- UI: Aggregate and Compare Microdata
- UI: Filter run results by value
- UI: Disk space usage and cleanup
- UI Localization: Translation of openM++
- Authored Model Documentation
- Built-in Attributes
- Censor Event Time
- Create Import Set
- Derived Tables
- Entity Attributes in C++
- Entity Function Hooks
- Entity Member Packing
- Entity Tables
- Enumerations
- Events
- Event Trace
- External Names
- Generated Model Documentation
- Groups
- Illustrative Model
Align1
- Lifecycle Attributes
- Local Random Streams
- Memory Use
- Microdata Output
- Model Code
- Model Documentation
- Model Languages
- Model Localization
- Model Metrics Report
- Model Resource Use
- Model Symbols
- Parameter and Table Display and Content
- Population Size and Scaling
- Screened Tables
- Symbol Labels and Notes
- Tables
- Test Models
- Time-like and Event-like Attributes
- Use Modules
- Weighted Tabulation
- File-based Parameter Values
- Oms: openM++ web-service
- Oms: openM++ web-service API
- Oms: How to prepare model input parameters
- Oms: Cloud and model runs queue
- Use R to save output table into CSV file
- Use R to save output table into Excel
- Run model from R: simple loop in cloud
- Run RiskPaths model from R: advanced run in cloud
- Run RiskPaths model in cloud from local PC
- Run model from R and save results in CSV file
- Run model from R: simple loop over model parameter
- Run RiskPaths model from R: advanced parameters scaling
- Run model from Python: simple loop over model parameter
- Run RiskPaths model from Python: advanced parameters scaling
- Windows: Use Docker to get latest version of OpenM++
- Linux: Use Docker to get latest version of OpenM++
- RedHat 8: Use Docker to get latest version of OpenM++
- Quick Start for OpenM++ Developers
- Setup Development Environment
- 2018, June: OpenM++ HPC cluster: Test Lab
- Development Notes: Defines, UTF-8, Databases, etc.
- 2012, December: OpenM++ Design
- 2012, December: OpenM++ Model Architecture, December 2012
- 2012, December: Roadmap, Phase 1
- 2013, May: Prototype version
- 2013, September: Alpha version
- 2014, March: Project Status, Phase 1 completed
- 2016, December: Task List
- 2017, January: Design Notes. Subsample As Parameter problem. Completed
GET Model Metadata
- GET model list
- GET model list including text (description and notes)
- GET model definition metadata
- GET model metadata including text (description and notes)
- GET model metadata including text in all languages
GET Model Extras
GET Model Run results metadata
- GET list of model runs
- GET list of model runs including text (description and notes)
- GET status of model run
- GET status of model run list
- GET status of first model run
- GET status of last model run
- GET status of last completed model run
- GET model run metadata and status
- GET model run including text (description and notes)
- GET model run including text in all languages
GET Model Workset metadata: set of input parameters
- GET list of model worksets
- GET list of model worksets including text (description and notes)
- GET workset status
- GET model default workset status
- GET workset including text (description and notes)
- GET workset including text in all languages
Read Parameters, Output Tables or Microdata values
- Read parameter values from workset
- Read parameter values from workset (enum id's)
- Read parameter values from model run
- Read parameter values from model run (enum id's)
- Read output table values from model run
- Read output table values from model run (enum id's)
- Read output table calculated values from model run
- Read output table calculated values from model run (enum id's)
- Read output table values and compare model runs
- Read output table values and compare model runs (enun id's)
- Read microdata values from model run
- Read microdata values from model run (enum id's)
- Read aggregated microdata from model run
- Read aggregated microdata from model run (enum id's)
- Read microdata run comparison
- Read microdata run comparison (enum id's)
GET Parameters, Output Tables or Microdata values
- GET parameter values from workset
- GET parameter values from model run
- GET output table expression(s) from model run
- GET output table calculated expression(s) from model run
- GET output table values and compare model runs
- GET output table accumulator(s) from model run
- GET output table all accumulators from model run
- GET microdata values from model run
- GET aggregated microdata from model run
- GET microdata run comparison
GET Parameters, Output Tables or Microdata as CSV
- GET csv parameter values from workset
- GET csv parameter values from workset (enum id's)
- GET csv parameter values from model run
- GET csv parameter values from model run (enum id's)
- GET csv output table expressions from model run
- GET csv output table expressions from model run (enum id's)
- GET csv output table accumulators from model run
- GET csv output table accumulators from model run (enum id's)
- GET csv output table all accumulators from model run
- GET csv output table all accumulators from model run (enum id's)
- GET csv calculated table expressions from model run
- GET csv calculated table expressions from model run (enum id's)
- GET csv model runs comparison table expressions
- GET csv model runs comparison table expressions (enum id's)
- GET csv microdata values from model run
- GET csv microdata values from model run (enum id's)
- GET csv aggregated microdata from model run
- GET csv aggregated microdata from model run (enum id's)
- GET csv microdata run comparison
- GET csv microdata run comparison (enum id's)
GET Modeling Task metadata and task run history
- GET list of modeling tasks
- GET list of modeling tasks including text (description and notes)
- GET modeling task input worksets
- GET modeling task run history
- GET status of modeling task run
- GET status of modeling task run list
- GET status of modeling task first run
- GET status of modeling task last run
- GET status of modeling task last completed run
- GET modeling task including text (description and notes)
- GET modeling task text in all languages
Update Model Profile: set of key-value options
- PATCH create or replace profile
- DELETE profile
- POST create or replace profile option
- DELETE profile option
Update Model Workset: set of input parameters
- POST update workset read-only status
- PUT create new workset
- PUT create or replace workset
- PATCH create or merge workset
- DELETE workset
- POST delete multiple worksets
- DELETE parameter from workset
- PATCH update workset parameter values
- PATCH update workset parameter values (enum id's)
- PATCH update workset parameter(s) value notes
- PUT copy parameter from model run into workset
- PATCH merge parameter from model run into workset
- PUT copy parameter from workset to another
- PATCH merge parameter from workset to another
Update Model Runs
- PATCH update model run text (description and notes)
- DELETE model run
- POST delete model runs
- PATCH update run parameter(s) value notes
Update Modeling Tasks
Run Models: run models and monitor progress
Download model, model run results or input parameters
- GET download log file
- GET model download log files
- GET all download log files
- GET download files tree
- POST initiate entire model download
- POST initiate model run download
- POST initiate model workset download
- DELETE download files
- DELETE all download files
Upload model runs or worksets (input scenarios)
- GET upload log file
- GET all upload log files for the model
- GET all upload log files
- GET upload files tree
- POST initiate model run upload
- POST initiate workset upload
- DELETE upload files
- DELETE all upload files
Download and upload user files
- GET user files tree
- POST upload to user files
- PUT create user files folder
- DELETE file or folder from user files
- DELETE all user files
User: manage user settings
Model run jobs and service state
- GET service configuration
- GET job service state
- GET disk usage state
- POST refresh disk space usage info
- GET state of active model run job
- GET state of model run job from queue
- GET state of model run job from history
- PUT model run job into other queue position
- DELETE state of model run job from history
Administrative: manage web-service state
- POST a request to refresh models catalog
- POST a request to close models catalog
- POST a request to close model database
- POST a request to delete the model
- POST a request to open database file
- POST a request to cleanup database file
- GET the list of database cleanup log(s)
- GET database cleanup log file(s)
- POST a request to pause model run queue
- POST a request to pause all model runs queue
- PUT a request to shutdown web-service