Once you have installed the WRENCH library, following the instructions on the installation page, you are ready to create a WRENCH simulator. Information on what can be simulated and how to do it are provided in the WRENCH 101 and WRENCH 102 pages. This page is only about the logistics of setting up a simulator project.
Using the WRENCH initialization tool
The wrench-init
tool is a project generator built with WRENCH, which creates a simple project structure as follows:
The simplesimulator.cpp
source file contains the class representing the simulator (either cloud or batch). simplestandardjobscheduler.h
and simplestandardjobscheduler.cpp
contain a simple implementation for a wrench::StandardJobScheduler
; simplewms.h
and simplewms.cpp
denote the implementation of a simple workflow management system. Example platform and workflow files are also generated into the data
folder. These files provide the minimum necessary implementation for a WRENCH-enabled simulator.
The wrench-init
tool only requires a single argument, the name of the folder where the project skeleton will be generated:
Additional options supported by the tool can be found by using the wrench-init --help
command.
Creating a CMakeLists.txt file by hand
Alternately, you can do a manual setup, i.e., create your own Cmake project. Below is an example of a CMakeLists.txt
file that can be used as a basic template:
Example WRENCH simulators
The examples in the examples
directory provide good starting points for developing your own simulators. Typing make
in the top-level directory compiles the examples in the examples
directory.
Let us run the examples/basic-examples/bare-metal-bag-of-tasks
by navigating to that directory and typing:
You should see some output in the terminal. The output in white is produced by the simulator implemented with the WRENCH user API. The output in green is produced by the workflow management system implemented with the WRENCH developer API.
Although you can inspect the codes of the examples on your own, we highly recommend that you go through the WRENCH 101 and WRENCH 102 pages first. These pages make direct references to the examples, a description of which is available in examples/README.md
in the WRENCH distribution.