11 #ifndef WRENCH_STANDARDJOB_H
12 #define WRENCH_STANDARDJOB_H
19 #include "WorkflowJob.h"
21 #include "wrench/services/storage/storage_helpers/FileLocation.h"
37 class StandardJob :
public WorkflowJob {
56 std::vector<WorkflowTask *> getTasks();
58 unsigned long getMinimumRequiredNumCores();
60 unsigned long getMinimumRequiredMemory();
62 unsigned long getNumCompletedTasks();
64 unsigned long getNumTasks();
66 StandardJob::State getState();
68 std::map<WorkflowFile *, std::vector<std::shared_ptr<FileLocation>>> getFileLocations();
70 unsigned long getPriority();
74 std::vector<WorkflowTask *> tasks;
79 unsigned long num_completed_tasks;
82 std::map<WorkflowFile *, std::vector<std::shared_ptr<FileLocation>>> file_locations;
85 std::vector<std::tuple<WorkflowFile *, std::shared_ptr<FileLocation> , std::shared_ptr<FileLocation> >> pre_file_copies;
87 std::vector<std::tuple<WorkflowFile *, std::shared_ptr<FileLocation> , std::shared_ptr<FileLocation> >> post_file_copies;
89 std::vector<std::tuple<WorkflowFile *, std::shared_ptr<FileLocation> >> cleanup_file_deletions;
99 double getPreJobOverheadInSeconds();
100 void setPreJobOverheadInSeconds(
double overhead);
101 double getPostJobOverheadInSeconds();
102 void setPostJobOverheadInSeconds(
double overhead);
107 friend class StandardJobExecutor;
108 friend class BareMetalComputeService;
109 void incrementNumCompletedTasks();
111 friend class JobManager;
113 StandardJob(Workflow *workflow,
114 std::vector<WorkflowTask *> tasks, std::map<WorkflowFile *, std::vector<std::shared_ptr<FileLocation>>> &file_locations,
115 std::vector<std::tuple<WorkflowFile *, std::shared_ptr<FileLocation> , std::shared_ptr<FileLocation>>> &pre_file_copies,
116 std::vector<std::tuple<WorkflowFile *, std::shared_ptr<FileLocation> , std::shared_ptr<FileLocation>>> &post_file_copies,
117 std::vector<std::tuple<WorkflowFile *, std::shared_ptr<FileLocation> >> &cleanup_file_deletions);
120 double pre_overhead = 0.0;
121 double post_overhead = 0.0;
131 #endif //WRENCH_MULTITASKJOB_H