Windows Quick Start Developer

From OpenM++
Jump to: navigation, search

Contents

Step by Step

  • Download desktop version zip archive: binary files and source code
  • Extract zip archive to C:\SomeDir\
  • Build the example RiskPaths model and run the Default scenario
    • Open C:\SomeDir\models\RiskPaths\RiskPaths-ompp.sln using Visual Studio 2017
    • 'Rebuild' in Visual Studio 2017 to build the model and run the Default scenario
    • Examine outputs for the Default scenario in C:\SomeDir\models\RiskPaths\output
      • Tabular results in Excel: Default(tbl).xlsx
      • Tabular results in csv format: Files in subdirectory 'Default'
  • (optional) set the OM_ROOT environment variable to enable model development from any directory
    • Open a Command Prompt window
    • type the command setx OM_ROOT C:\SomeDir\models\RiskPaths\
  • How to: create and debug models on Windows

OpenM++ Models: desktop? clusters? MPI?

It is recommended to start from desktop version of openM++.

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.

Build on Windows

Tested platforms:

  • Windows 7 (64 and 32 bits), Windows 10, 2016 (64 bit)
  • Visual Studio 2017, including Community Edition
  • (optional) Microsoft MPI SDK Redistributable Package

Note: It does work on any Windows 7 and above or 2008R2 and above, 32 and 64 bits, we just simply not testing it regualry on every possible Windows version.

Build debug version of the model

You can use any of test models solution, except of modelOne, as starting point to develop your own model. Below we are using NewCaseBased model as example.

To build and run debug version of the model use desktop (non-MPI) version of openM++:

  • download and unzip openM++ Windows desktop binaries into C:\SomeDir\
  • build Debug version of the using solution: C:\SomeDir\models\NewCaseBased\NewCaseBased-ompp.sln

At bottom Output window of Visual Studio you will see something like:

1>Model.vcxproj -> C:\SomeDir\models\NewCaseBased\ompp\bin//NewCaseBasedD.exe
1>2017-06-06 18:21:08.0092 NewCaseBased
1>2017-06-06 18:21:08.0160 Run: 102
1>2017-06-06 18:21:08.0163 Get fixed and missing parameters
1>2017-06-06 18:21:08.0166 Get scenario parameters
1>2017-06-06 18:21:08.0172 Sub-value 0
1>2017-06-06 18:21:08.0175 compute derived parameters
1>2017-06-06 18:21:08.0177 Initialize invariant entity data
1>2017-06-06 18:21:08.0180 Member=0 simulation progress=0%
........
1>2017-06-06 18:21:08.0688 member=0 write output tables - finish
1>2017-06-06 18:21:08.0697 Writing Output Tables Expressions
1>2017-06-06 18:21:08.0727 Done.
1>Done building project "Model.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

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 either "Retarget solution" or install Windows 8.1 SDK and UCRT SDK:

Install Windows 8.1 SDK
Install Windows 8.1 SDK and UCRT SDK

Build cluster version of the model to run on multiple computers over network

Make sure you have latest version of Microsoft MPI SDK and MPI Redistributable installed.

Please notice name of cluster version archive has _mpi_ in it, i.e. openmpp_win_mpi_20180205.zip.

  • use Notepad to open C:\AnyDir\models\models\NewCaseBased\Model.props and make sure you have:
........
  <GRID_COMPUTING>MPI</GRID_COMPUTING>
........
  • open model solution: C:\AnyDir\models\NewCaseBased\NewCaseBased-ompp.sln
  • make sure you Release Configuration selected to build
  • build model solution

Note: you can build Debug version of the model and run it on cluster, but actual debuging on cluster is far from being trivial.

<metadesc>OpenM++: open source microsimulation platform</metadesc>