Open Traffic Models - MPI communication: This a parallized version of the OTM simulation engine that uses Message Passing Interface (MPI) for multi-core communication on high performance computing (HPC) systems. It can exploit parallel computation and HPC power to significantly speed up large-scale traffic simulations.
- Download open-mpi 3.1.
- Install Metis. Two methods:
- metis-5.1.0.tar.gz. Follow the instructions in Install.txt. To build METIS you will need to have cmake.
- Ubuntu: sudo apt install metis
git clone git@github.com:ggomes/otm-sim.git
cp otm-sim/settings.xml ~/.m2
cd otm-sim
git checkout remotes/origin/ctmrefac
mvn clean install -DskipTests
Alternatively you can download the otm-sim jar here
- IntelliJ > Import project > otm-mpi > create project from existing sources ...
- Add otm-sim and json jar files
Files > Project Structure > Project Settings > Modules
> Dependencies > + JARs or directories
> otm-sim/target/otm-sim-1.0-SNAPSHOT-jar-with-dependencies.jar
check "Export" for otm-sim
> otm-mpi/lib/json-simple-1.1.1.jar
> Sources > Add Content Root
> openmpi-3.1.0/ompi/mpi/java
Edit Root Properties > Package prefix : mpi
- Run test.tests.XMLSplitterTest.main()
export OTMSIMJAR=<path to otm-sim jar>
export OTMMPIHOME=<path to otm-mpi folder>
chmod u+x $OTMMPIHOME/scripts/*.sh
- ./run_splitter.sh : Test offline scenario splitting with a small network.
- ./compile_mpi.sh : Compile the program using mpijavac.
- ./compare_veh.sh : Run small example with 2 processes, and compare result to single-process run.
- ./run_mpi.sh : Run small example with 4 processes.