WRENCH
1.11
Cyberinfrastructure Simulation Workbench
|
Overview | Installation | Getting Started | WRENCH 101 | WRENCH 102 |
A wrench::StandardJob
can be submitted to a bare-metal compute service via a job manager. For instance:
In the above, the bare-metal service will make all decisions for deciding how to allocate compute resources (i.e., cores) to tasks. In fact, several properties (see class wrench::BareMetalComputeServiceProperty
) can be set to change the algorithms used by the service to determine resource allocations.
In some cases, the execution controller may want to influence or enforce resource allocations for the tasks in the jobs. For this purpose, the wrench::JobManager::submitJob()
method takes an optional service-specific argument. This argument is a std::map<std::string, std::string>
of key-value pairs. The key is a task ID, and the value is the service-specific argument for that task.
For each task, an optional argument can be provided as a string formatted as "hostname:num_cores", "hostname", or "num_cores", where "hostname" is the name of one of the service's compute hosts and "num_cores" is an integer (e.g., "host1:10", "host1", "10"):
In the above example, for instance, the job submission could be done as:
If the service-specific arguments are invalid (e.g., invalid hostname, unknown task, number of cores too large), the wrench::JobManager::submitJob()
method throws a wrench::ExecutionException
.
See the execution controller implementation in examples/basic-examples/bare-metal-bag-of-tasks/TwoTasksAtATimeWMS.cpp
for a more complete example.