10 #ifndef WRENCH_HTCONDORCENTRALMANAGERSERVICE_H
11 #define WRENCH_HTCONDORCENTRALMANAGERSERVICE_H
15 #include "wrench/services/compute/ComputeService.h"
16 #include "wrench/services/compute/htcondor/HTCondorCentralManagerServiceMessagePayload.h"
25 std::map<std::string, std::string> default_property_values = {};
27 std::map<std::string, double> default_messagepayload_values = {
43 std::set<ComputeService *> compute_resources,
44 std::map<std::string, std::string> property_list = {},
45 std::map<std::string, double> messagepayload_list = {});
52 std::map<std::string, std::string> &service_specific_arguments)
override;
54 void submitPilotJob(
PilotJob *job, std::map<std::string, std::string> &service_specific_arguments)
override;
67 void terminateStandardJob(
StandardJob *job)
override;
69 void terminatePilotJob(
PilotJob *job)
override;
78 bool processNextMessage();
80 void processSubmitStandardJob(
const std::string &answer_mailbox,
StandardJob *job,
81 std::map<std::string, std::string> &service_specific_args);
83 void processSubmitPilotJob(
const std::string &answer_mailbox,
PilotJob *job,
84 std::map<std::string, std::string> &service_specific_args);
86 void processPilotJobStarted(
PilotJob *job);
88 void processPilotJobCompletion(
PilotJob *job);
90 void processStandardJobCompletion(
StandardJob *job);
92 void processNegotiatorCompletion(std::vector<WorkflowJob *> &pending_jobs);
97 std::set<ComputeService *> compute_resources;
99 std::vector<std::tuple<WorkflowJob *, std::map<std::string, std::string>>> pending_jobs;
101 bool dispatching_jobs =
false;
103 bool resources_unavailable =
false;
105 std::map<std::shared_ptr<ComputeService>,
unsigned long> compute_resources_map;
107 std::map<WorkflowJob *, std::shared_ptr<ComputeService>> running_jobs;
112 #endif //WRENCH_HTCONDORCENTRALMANAGERSERVICE_H
static const std::string PILOT_JOB_EXPIRED_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to state that a pilot job has expired.
Definition: ComputeServiceMessagePayload.h:44
static const std::string SUBMIT_STANDARD_JOB_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to submit a standard job.
Definition: ComputeServiceMessagePayload.h:26
static const std::string DAEMON_STOPPED_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to confirm it has terminated.
Definition: ServiceMessagePayload.h:33
static const std::string RESOURCE_DESCRIPTION_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to ask it for information on its resour...
Definition: ComputeServiceMessagePayload.h:56
HTCondorCentralManagerService(const std::string &hostname, std::set< ComputeService * > compute_resources, std::map< std::string, std::string > property_list={}, std::map< std::string, double > messagepayload_list={})
Constructor.
Definition: HTCondorCentralManagerService.cpp:38
The compute service base class.
Definition: ComputeService.h:35
A standard (i.e., non-pilot) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: StandardJob.h:37
void submitStandardJob(StandardJob *job, std::map< std::string, std::string > &service_specific_arguments) override
Submit a standard job to the HTCondor service.
Definition: HTCondorCentralManagerService.cpp:85
static const std::string STANDARD_JOB_DONE_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to state that it has completed a standa...
Definition: ComputeServiceMessagePayload.h:30
static const std::string SUBMIT_PILOT_JOB_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent from the daemon to acknowledge a pilot job submission...
Definition: ComputeServiceMessagePayload.h:40
A HTCondor central manager service implementation.
Definition: HTCondorCentralManagerService.h:23
static const std::string RESOURCE_DESCRIPTION_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to state information on its resources.
Definition: ComputeServiceMessagePayload.h:58
static const std::string STOP_DAEMON_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to terminate it.
Definition: ServiceMessagePayload.h:31
static const std::string PILOT_JOB_STARTED_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to state that a pilot job has started.
Definition: ComputeServiceMessagePayload.h:42
static const std::string SUBMIT_STANDARD_JOB_ANSWER_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to acknowledge a standard job submissio...
Definition: ComputeServiceMessagePayload.h:28
static const std::string SUBMIT_PILOT_JOB_REQUEST_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to submit a pilot job.
Definition: ComputeServiceMessagePayload.h:38
void submitPilotJob(PilotJob *job, std::map< std::string, std::string > &service_specific_arguments) override
Asynchronously submit a pilot job to the cloud service.
Definition: HTCondorCentralManagerService.cpp:134
A pilot (i.e., non-standard) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: PilotJob.h:29