Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.com/wrench-project/wrench

  • Loading branch information...
henricasanova committed Dec 18, 2018
2 parents 6dc7a10 + 7cc85ed commit 6f46ba77e94416196943335bbc91e4d57ad155db
@@ -315,3 +315,6 @@ include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Examples.cmake)

# build documentation
include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Documentation.cmake)

# build tools
include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Tools.cmake)
@@ -114,8 +114,7 @@ int main(int argc, char **argv) {
wrench::WMS *wms = simulation.add(
new wrench::SimpleWMS(std::unique_ptr<wrench::BatchStandardJobScheduler>(
new wrench::BatchStandardJobScheduler(storage_service)),
nullptr,
compute_services, storage_services, wms_host));
nullptr, compute_services, storage_services, wms_host));

wms->addWorkflow(&workflow);

@@ -73,7 +73,8 @@ int main(int argc, char **argv) {
*/
std::string storage_host = hostname_list[(hostname_list.size() > 2) ? 2 : 1];
std::cerr << "Instantiating a SimpleStorageService on " << storage_host << "..." << std::endl;
wrench::StorageService *storage_service = simulation.add(new wrench::SimpleStorageService(storage_host, 10000000000000.0));
wrench::StorageService *storage_service = simulation.add(
new wrench::SimpleStorageService(storage_host, 10000000000000.0));

/* Construct a list of hosts (in the example only one host) on which the
* cloud service will be able to run tasks
@@ -122,9 +123,9 @@ int main(int argc, char **argv) {
*/
std::cerr << "Instantiating a WMS on " << wms_host << "..." << std::endl;
wrench::WMS *wms = simulation.add(
new wrench::SimpleWMS(std::unique_ptr<wrench::CloudStandardJobScheduler>(
new wrench::CloudStandardJobScheduler(storage_service)),
nullptr, compute_services, storage_services, wms_host));
new wrench::SimpleWMS(std::unique_ptr<wrench::CloudStandardJobScheduler>(
new wrench::CloudStandardJobScheduler(storage_service)),
nullptr, compute_services, storage_services, wms_host));

wms->addWorkflow(&workflow);

@@ -134,17 +135,17 @@ int main(int argc, char **argv) {
*/
std::string file_registry_service_host = hostname_list[(hostname_list.size() > 2) ? 1 : 0];
std::cerr << "Instantiating a FileRegistryService on " << file_registry_service_host << "..." << std::endl;
wrench::FileRegistryService * file_registry_service =
wrench::FileRegistryService *file_registry_service =
new wrench::FileRegistryService(file_registry_service_host);
simulation.add(file_registry_service);

// TRYING NETWORK PROXIMITY SERVICE WITH VIVALDI....
std::vector<std::string> hostname_list_copy(hostname_list);
std::string hostname_copy(hostname_list[0]);
wrench::NetworkProximityService *NPS = new wrench::NetworkProximityService(hostname_copy, hostname_list_copy, {
{wrench::NetworkProximityServiceProperty::NETWORK_PROXIMITY_SERVICE_TYPE, "alltoall"},
{wrench::NetworkProximityServiceProperty::NETWORK_DAEMON_COMMUNICATION_COVERAGE, "1.0"},
{wrench::NetworkProximityServiceProperty::NETWORK_PROXIMITY_MEASUREMENT_PERIOD, "600"},
{wrench::NetworkProximityServiceProperty::NETWORK_PROXIMITY_SERVICE_TYPE, "alltoall"},
{wrench::NetworkProximityServiceProperty::NETWORK_DAEMON_COMMUNICATION_COVERAGE, "1.0"},
{wrench::NetworkProximityServiceProperty::NETWORK_PROXIMITY_MEASUREMENT_PERIOD, "600"},
{wrench::NetworkProximityServiceProperty::NETWORK_PROXIMITY_MEASUREMENT_PERIOD_MAX_NOISE, "10"}});

simulation.add(NPS);
@@ -57,7 +57,6 @@ namespace wrench {
WRENCH_INFO("About to execute a workflow with %lu tasks", this->getWorkflow()->getNumberOfTasks());

// Create a job manager

this->job_manager = this->createJobManager();

// Create a data movement manager
@@ -82,18 +81,15 @@ namespace wrench {
// Submit pilot jobs
if (this->getPilotJobScheduler()) {
WRENCH_INFO("Scheduling pilot jobs...");
this->getPilotJobScheduler()->schedulePilotJobs(
this->getAvailableComputeServices());
this->getPilotJobScheduler()->schedulePilotJobs(this->getAvailableComputeServices());
}

// Perform dynamic optimizations
runDynamicOptimizations();

// Run ready tasks with defined scheduler implementation
WRENCH_INFO("Scheduling tasks...");
this->getStandardJobScheduler()->scheduleTasks(
this->getAvailableComputeServices(),
ready_tasks);
this->getStandardJobScheduler()->scheduleTasks(this->getAvailableComputeServices(), ready_tasks);

// Wait for a workflow execution event, and process it
try {
@@ -11,7 +11,6 @@
#ifndef WRENCH_BATCHSCHEDULER_H
#define WRENCH_BATCHSCHEDULER_H


#include <wrench-dev.h>

namespace wrench {
@@ -23,17 +22,16 @@ namespace wrench {

public:

BatchStandardJobScheduler(StorageService *default_storage_service) :
default_storage_service(default_storage_service) {}

/***********************/
/** \cond DEVELOPER */
/***********************/

void scheduleTasks(const std::set<ComputeService *> &compute_services,
const std::vector<WorkflowTask *> &tasks);


BatchStandardJobScheduler(StorageService *default_storage_service) :
StandardJobScheduler(), default_storage_service(default_storage_service) {}

/***********************/
/** \endcond */
/***********************/
@@ -9,8 +9,8 @@
*/

#include "CloudStandardJobScheduler.h"
#include <climits>
#include <numeric>
//#include <climits>
//#include <numeric>

XBT_LOG_NEW_DEFAULT_CATEGORY(cloud_scheduler, "Log category for Cloud Scheduler");

@@ -15,8 +15,6 @@

namespace wrench {

class Simulation;

/**
* @brief A cloud Scheduler
*/
@@ -31,17 +29,15 @@ namespace wrench {
/** \cond DEVELOPER */
/***********************/

void scheduleTasks(const std::set<wrench::ComputeService *> &compute_services,
const std::vector<wrench::WorkflowTask *> &tasks);
void scheduleTasks(const std::set<ComputeService *> &compute_services,
const std::vector<WorkflowTask *> &tasks);

/***********************/
/** \endcond */
/***********************/

private:
std::vector<std::string> execution_hosts;
std::map<std::string, std::vector<std::string>> vm_list;
Simulation *simulation;
StorageService *default_storage_service;
};
}
@@ -0,0 +1,4 @@
# install wrench-init tool
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tools/wrench/wrench-init
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

0 comments on commit 6f46ba7

Please sign in to comment.
You can’t perform that action at this time.