WRENCH
1.11
Cyberinfrastructure Simulation Workbench
|
Overview | Installation | Getting Started | WRENCH 101 | WRENCH 102 |
A wrench::HTCondorComputeService
instance is essentially a front-end to several "child" compute services. As such, one can submit jobs to it, just like one would do to any compute service, but it then "decides" to which service these jobs will be delegated. In fact, an execution controller can even add new child compute services to be used by HTCondor dynamically. Which child service is used is dictated/influenced by service-specific arguments passed or not passed to the wrench::JobManager::submitJob()
method.
The examples code fragments below showcase the creation of a wrench::HTCondorComputeService
instance and its use by an execution controller. Let's start with the creation (in main). Note that arguments to service constructors are omitted for brevity (see the execution controller implementation in examples/condor-grid-example/CondorWMS.cp
for a complete and working example).
Let's now say that an execution controller was created that has access to all 5 above services, but will choose to submit all jobs via HTCondor. The first thing to do, so as to make the use of the cloud service possible, is to create a few VM instances and add them as child services to the HTCondor service:
So, at this point, HTCondor has access to 3 bare-metal compute services (2 of which are running inside VMs), and 2 batch compute services.
Let's consider an execution controller that will submit wrench::StandardJob
instances to HTCondor. These jobs can be of two kinds or, in HTCondor parlance, belong to one of two universes: grid jobs and non-grid jobs. By default a job is considered to be in the non-grid universe. But if the service-specific arguments passed to wrench::JobManager::submitJob()
include a "universe":"grid" key:value pair, then the submitted job is in the grid universe. HTCondor handles both kinds of jobs differently:
In the example below, we show both kinds of job submissions:
The above covers the essentials. See the API documnetation for more options, and the code in the examples/condor-grid-example/
directory for working/usable code.
The in-simulation implementation of HTCondor in WRENCH is simplified in terms of its functionality and design when compared to the actual implementation of HTCondor. The wrench::HTCondorComputeService
spawns two additional services during execution, wrench::HTCondorCentralManagerService
and wrench::HTCondorNegotiatorService
, both of which loosely correspond to actual HTCondor daemons (collector
, negotiator
, schedd
). Their use is fully automated and transparent to the WRENCH developer.