Skip to content

Commit

Permalink
(#220) Updated doc service-101 for HTCondor
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Aug 14, 2021
1 parent 3da5832 commit dc35bea
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions doc/service_guide_101/htcondor.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Creating a HTCondor compute service {#guide-101-htcondor}
# Overview # {#guide-htcondor-overview}

[HTCondor](http://htcondor.org) is a workload management framework that supervises
task executions on local and remote resources.
task executions on various sets of resources.
HTCondor is composed of six main service daemons (`startd`, `starter`,
`schedd`, `shadow`, `negotiator`, and `collector`). In addition,
each host on which one or more of these daemons is spawned must also
Expand All @@ -23,40 +23,44 @@ compute service (`wrench::ComputeService`), which is defined by the
service requires the following parameters:

- The name of a host on which to start the service;
- The HTCondor pool name;
- A `std::set` of `wrench::ComputeService` available to the HTCondor pool; and
- A `std::set` of 'child' `wrench::ComputeService` instances available to the HTCondor pool; and
- A `std::map` of properties (`wrench::HTCondorComputeServiceProperty`) and message
payloads (`wrench::HTCondorComputeServiceMessagePayload`).

The set of compute services may represent any computing instance natively
provided by WRENCH (e.g., bare-metal servers, cloud platforms, batch-scheduled
clusters, etc.) or additional services derived from the `wrench::ComputeService`
base class. The example below creates an instance of an HTCondor service
The set of compute services may include compute service instances that are either
`wrench::BareMetalComputeService` or `wrench::BatchComputeService` instances.
The example below creates an instance of an HTCondor service
with a pool of resources containing a [Bare-metal](@ref guide-baremetal) server:

~~~~~~~~~~~~~{.cpp}
// Simulation
wrench::Simulation simulation;
simulation.init(&argc, argv);
// Create bare-metal service
std::set<wrench::ComputeService *> compute_services;
compute_services.insert(new wrench::BareMetalComputeService(
// Create a bare-metal service
auto baremetal_service = simulation.add(
new wrench::BareMetalComputeService(
"execution_hostname",
{std::make_pair(
"execution_hostname",
std::make_tuple(wrench::Simulation::getHostNumCores("execution_hostname"),
wrench::Simulation::getHostMemoryCapacity("execution_hostname")))},
"/scratch/"));
auto compute_service = simulation->add(
std::set<std::shared_ptr<wrench::ComputeService>> compute_services;
compute_services.insert(baremetal_service);
auto htcondor_compute_service = simulation->add(
new wrench::HTCondorComputeService(hostname,
"local",
std::move(compute_services),
{{wrench::HTCondorComputeServiceProperty::SUPPORTS_PILOT_JOBS, "false"}}
));
~~~~~~~~~~~~~

Jobs submitted to the `wrench::HTCondorComputeService` instance will be dispatched to one
of the 'child' compute services available to that instance (only one in the above example).


# Anatomy of the HTCondor Service # {#guide-htcondor-anatomy}

Expand Down

0 comments on commit dc35bea

Please sign in to comment.