10 #ifndef WRENCH_HTCONDORNEGOTIATORSERVICE_H
11 #define WRENCH_HTCONDORNEGOTIATORSERVICE_H
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"
28 WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE default_messagepayload_values = {
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);
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);
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);
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;
74 #endif //WRENCH_HTCONDORNEGOTIATORSERVICE_H