Skip to content

Commit

Permalink
Merge branch 'master' into storalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
MONNIOT Julien committed Oct 16, 2023
2 parents 18831a3 + 2f5cb4f commit 9d45803
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 288 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,8 @@ namespace wrench {
src_location->toString().c_str(),
dst_location->toString().c_str());

auto src_host = simgrid::s4u::Host::by_name(src_location->getStorageService()->getHostname());
auto dst_host = simgrid::s4u::Host::by_name(dst_location->getStorageService()->getHostname());
auto src_host = src_location->getStorageService()->getHost();
auto dst_host = dst_location->getStorageService()->getHost();

auto src_disk = src_location->getDiskOrNull();
if (src_disk == nullptr) {
Expand Down Expand Up @@ -577,8 +577,8 @@ namespace wrench {
dst_location->toString().c_str());

// TODO: This code is duplicated with the IAmNotTheSource version of this method
auto src_host = simgrid::s4u::Host::by_name(src_location->getStorageService()->getHostname());
auto dst_host = simgrid::s4u::Host::by_name(dst_location->getStorageService()->getHostname());
auto src_host = src_location->getStorageService()->getHost();
auto dst_host = dst_location->getStorageService()->getHost();

auto src_disk = src_location->getDiskOrNull();
if (src_disk == nullptr) {
Expand Down
27 changes: 4 additions & 23 deletions tools/wrench/wrench-daemon/include/SimulationController.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ namespace wrench {
json getVMComputeService(json data);

private:
template<class T>
json startService(T *s);

// Thread-safe key value stores
KeyValueStore<std::shared_ptr<wrench::StandardJob>> job_registry;
KeyValueStore<std::shared_ptr<ComputeService>> compute_service_registry;
Expand All @@ -126,31 +129,9 @@ namespace wrench {
// Thread-safe queues for the server thread and the simulation thread to communicate
BlockingQueue<std::pair<double, std::shared_ptr<wrench::ExecutionEvent>>> event_queue;

BlockingQueue<wrench::ComputeService *> compute_services_to_start;
BlockingQueue<wrench::StorageService *> storage_services_to_start;
BlockingQueue<wrench::FileRegistryService *> file_service_to_start;
BlockingQueue<std::tuple<std::shared_ptr<StandardJob>, std::shared_ptr<ComputeService>, std::map<std::string, std::string>>> submissions_to_do;

BlockingQueue<std::pair<std::tuple<unsigned long, double, WRENCH_PROPERTY_COLLECTION_TYPE, WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE>, std::shared_ptr<ComputeService>>> vm_to_create;
BlockingQueue<std::pair<bool, std::string>> vm_created;

BlockingQueue<std::pair<std::string, std::shared_ptr<ComputeService>>> vm_to_start;
BlockingQueue<std::pair<bool, std::string>> vm_started;

BlockingQueue<std::pair<std::string, std::shared_ptr<ComputeService>>> vm_to_shutdown;
BlockingQueue<std::pair<bool, std::string>> vm_shutdown;

BlockingQueue<std::pair<std::string, std::shared_ptr<ComputeService>>> vm_to_destroy;
BlockingQueue<std::pair<bool, std::string>> vm_destroyed;

BlockingQueue<std::pair<std::shared_ptr<DataFile>, std::shared_ptr<StorageService>>> file_to_lookup;
BlockingQueue<std::tuple<bool, bool, std::string>> file_looked_up;

BlockingQueue<std::pair<std::string, std::shared_ptr<ComputeService>>> vm_to_suspend;
BlockingQueue<std::pair<bool, std::string>> vm_suspended;

BlockingQueue<std::pair<std::string, std::shared_ptr<ComputeService>>> vm_to_resume;
BlockingQueue<std::pair<bool, std::string>> vm_resumed;
BlockingQueue<std::function<void()>> things_to_do;

// The two managers
std::shared_ptr<JobManager> job_manager;
Expand Down
Loading

0 comments on commit 9d45803

Please sign in to comment.