Linux Quick Start Developer

From OpenM++
Jump to: navigation, search


Where is OpenM++

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 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)

Build debug version of the model

You can use any of test models makefile, 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 unpack openM++
tar xzf openmpp_centos_20180205.tar.gz
  • make debug version of openM++ runtime library
cd openmpp_centos_20180205/openm/
make libopenm
  • build debug version of NewCaseBased model and "publish" it ("publish" do create NewCaseBased.sqlite database with default input data set)
cd ../models/NewCaseBased/
make OUT_PREFIX=. PUBLISH_DIR=bin model publish
  • run the model
cd bin
2017-06-06 19:59:12.0429 NewCaseBased
2017-06-06 19:59:12.0449 Run: 103
2017-06-06 19:59:12.0449 Get fixed and missing parameters
2017-06-06 19:59:12.0449 Get scenario parameters
2017-06-06 19:59:12.0450 Sub-value 0
2017-06-06 19:59:12.0450 compute derived parameters
2017-06-06 19:59:12.0450 Initialize invariant entity data
2017-06-06 19:59:12.0450 Member=0 simulation progress=0%
2017-06-06 19:59:12.0505 member=0 write output tables - finish
2017-06-06 19:59:12.0508 Writing Output Tables Expressions
2017-06-06 19:59:12.0520 Done.

Build release version of the model

Make executable, "publish" and run NewCaseBased test model:

cd openmpp_centos_20180205/models/NewCaseBased/
make OUT_PREFIX=. PUBLISH_DIR=bin RELEASE=1 model publish
cd bin

Rebuild all test models

Make executables, "publish" (create model.sqlite database file) and run all test models:

cd openmpp_centos_20180205/models/
make RELEASE=1 all publish run

results are in openmpp_centos_20180205/models/bin directory

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

Make sure you have MPI installed and configured. For example, on RedHat (CentOS) you may need to load MPI module:module load mpi/openmpi-x86_64

  • download and unpack cluster version of openM++, i.e.:
tar xzf openmpp_centos_mpi_20180205.tar.gz

please notice name of cluster version archive has _mpi_ in it, i.e. openmpp_centos_mpi_20180205.tar.gz

  • make executable and "publish" (create model.sqlite database file) of NewCaseBased test model:
cd openmpp_centos_mpi_20180205/models/NewCaseBased/
  • run 3 instances of NewCaseBased on 3 hosts to compute 16 subsamples using 4 threads
cd bin
mpirun -n 3 -H omm,om1,om2 NewCaseBased_mpi -OpenM.Subvalues 16 -OpenM.Threads 4
2017-06-06 20:15:12.0050 NewCaseBased
2017-06-06 20:15:12.0173 NewCaseBased
2017-06-06 20:15:12.0200 NewCaseBased
2017-06-06 20:15:13.0148 Parallel run of 3 modeling processes, 4 thread(s) each
2017-06-06 20:15:13.0162 Run: 102
2017-06-06 20:15:13.0163 Get fixed and missing parameters
2017-06-06 20:15:13.0163 Get scenario parameters
2017-06-06 20:15:13.0164 compute derived parameters
2017-06-06 20:15:13.0164 Initialize invariant entity data
2017-06-06 20:15:13.0161 Run: 102
2017-06-06 20:15:13.0224 member=0 write output tables - finish
2017-06-06 20:15:13.0354 Done.
2017-06-06 20:15:13.0352 Done.
2017-06-06 20:15:13.0353 Done.

You can use any of test models makefile, except of modelOne, as starting point to develop your own model.

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