Quick Start OpenM Developer

From OpenM++
Jump to: navigation, search

Contents

Where is OpenM++

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.

Build on Linux

Tested platforms:

  • RedHat (CentOS) 7 or Ubuntu 16.04 (64 and 32 bits)
  • g++ >= 4.8
  • (optional) MPI, i.e.: OpenMPI >= 1.6 (other MPI implementations expected to work but not tested)

To build debug version of openM++:

git clone http://git.code.sf.net/p/ompp/git master
cd master/openm/
make
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 / CentOS: 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 even MPICH.

Build on Windows

Tested platforms:

  • Windows 7 (64 and 32 bits), Windows 10, 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 2017, 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 http://git.code.sf.net/p/ompp/git SomeDir
  • 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++:

C:\SomeDir\openm\openm.build.props

  • 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.
  • use Notepad to open C:\SomeDir\models\models\NewCaseBased\Model.props and make sure you have:
........
    <GRID_COMPUTING>MPI</GRID_COMPUTING>
........
  • build model solution, i.e.: C:\SomeDir\models\NewCaseBased\NewCaseBased-ompp.sln

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"
  • start Visual Studio 2017 Installer
    • Modify
    • right column
    • check box Windows 8.1 SDK and UCRT SDK

Build R package

  • Windows:
cd C:>C:\SomeDir\R
"C:\Program Files\R\R-3.4.0\bin\R.exe" CMD build openMpp
  • Linux:
cd master/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.7.3.tar.gz’

Build Go utilities

cd go_ws
svn checkout https://svn.code.sf.net/p/ompp/svn/trunk/ src/go.openmpp.org
go get go.openmpp.org/dbcopy
go install go.openmpp.org/dbcopy
go get go.openmpp.org/oms
go install go.openmpp.org/oms

After initial checkout first go get command can take ~30 seconds because go needs to get all dependencies. You can use

go get -v go.openmpp.org/dbcopy

to see more details.

Build ompp-ui

Instructions below assuming Windows environment and it is very much identical for Linux, except of course, back slashes in directory paths.

  • setup node.js environment as described at: Setup Development Environment.
  • make sure you have models\bin populated with *.sqlite db files and model executables.
  • start oms web-service by invoking ompp_ui.bat (on Windows) or:
cd my-openm-dir
bin\oms -oms.LogRequest
  • start UI in debug mode:
C:\node\nodevars.bat
cd my-openm-dir/ompp-ui
npm run dev
C:\node\nodevars.bat
cd my-openm-dir/ompp-ui
npm run build
copy dist ..\html

Note: UI is alpha version and you need to stop oms web-service in order to update, add or remove model *.sqlite db files.


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