WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
HTCondorNegotiatorService.h
1 
10 #ifndef WRENCH_HTCONDORNEGOTIATORSERVICE_H
11 #define WRENCH_HTCONDORNEGOTIATORSERVICE_H
12 
13 #include "wrench/services/Service.h"
14 #include "wrench/services/compute/ComputeService.h"
15 #include "wrench/services/compute/htcondor/HTCondorCentralManagerServiceMessagePayload.h"
16 #include "wrench/job/Job.h"
17 
18 namespace wrench {
19 
20  /***********************/
22  /***********************/
27  private:
28 WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE default_messagepayload_values = {
32  };
33 
34  public:
35 
37  double startup_overhead,
38  std::set<std::shared_ptr<ComputeService>> &compute_services,
39  std::map<std::shared_ptr<CompoundJob>, std::shared_ptr<ComputeService>> &running_jobs,
40  std::vector<std::tuple<std::shared_ptr<CompoundJob>, std::map<std::string, std::string>>> &pending_jobs,
41  simgrid::s4u::Mailbox *reply_mailbox);
42 
44 
45  private:
46  int main() override;
47 
48  struct JobPriorityComparator {
49  bool operator()(std::tuple<std::shared_ptr<CompoundJob>, std::map<std::string, std::string>> &lhs,
50  std::tuple<std::shared_ptr<CompoundJob>, std::map<std::string, std::string>> &rhs);
51  };
52 
53  std::shared_ptr<ComputeService> pickTargetComputeService(std::shared_ptr<CompoundJob> job, std::map<std::string, std::string> service_specific_arguments);
54  std::shared_ptr<ComputeService> pickTargetComputeServiceGridUniverse(std::shared_ptr<CompoundJob> job, std::map<std::string, std::string> service_specific_arguments);
55  std::shared_ptr<ComputeService> pickTargetComputeServiceNonGridUniverse(std::shared_ptr<CompoundJob> job, std::map<std::string, std::string> service_specific_arguments);
56 
58  double startup_overhead;
60  simgrid::s4u::Mailbox *reply_mailbox;
62  std::set<std::shared_ptr<ComputeService>> compute_services;
64  std::map<std::shared_ptr<CompoundJob>, std::shared_ptr<ComputeService>> running_jobs;
66  std::vector<std::tuple<std::shared_ptr<CompoundJob>, std::map<std::string, std::string>>> pending_jobs;
67  };
68 
69  /***********************/
71  /***********************/
72 }
73 
74 #endif //WRENCH_HTCONDORNEGOTIATORSERVICE_H
wrench::HTCondorNegotiatorService::~HTCondorNegotiatorService
~HTCondorNegotiatorService()
Destructor.
Definition: HTCondorNegotiatorService.cpp:53
wrench::ServiceMessagePayload::DAEMON_STOPPED_MESSAGE_PAYLOAD
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:37
wrench::HTCondorNegotiatorService::HTCondorNegotiatorService
HTCondorNegotiatorService(std::string &hostname, double startup_overhead, std::set< std::shared_ptr< ComputeService >> &compute_services, std::map< std::shared_ptr< CompoundJob >, std::shared_ptr< ComputeService >> &running_jobs, std::vector< std::tuple< std::shared_ptr< CompoundJob >, std::map< std::string, std::string >>> &pending_jobs, simgrid::s4u::Mailbox *reply_mailbox)
Constructor.
Definition: HTCondorNegotiatorService.cpp:36
wrench::HTCondorCentralManagerServiceMessagePayload::HTCONDOR_NEGOTIATOR_DONE_MESSAGE_PAYLOAD
static const std::string HTCONDOR_NEGOTIATOR_DONE_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to state that the negotiator has been c...
Definition: HTCondorCentralManagerServiceMessagePayload.h:27
wrench
Definition: Action.cpp:28
wrench::HTCondorNegotiatorService
A HTCondor negotiator service.
Definition: HTCondorNegotiatorService.h:26
wrench::ServiceMessagePayload::STOP_DAEMON_MESSAGE_PAYLOAD
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:35
wrench::S4U_Daemon::hostname
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:60
wrench::Service
A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:31