Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wrench-project/wrench
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Nov 29, 2017
2 parents bed8630 + 46ceacd commit 652c1c7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions examples/simple-wms/SimpleWMSCloud.cpp
Expand Up @@ -45,7 +45,7 @@ int main(int argc, char **argv) {

/* The first argument is the platform description file, written in XML following the SimGrid-defined DTD */
char *platform_file = argv[1];
/* The second argument id the workflow description file, written in XML using the DAX DTD */
/* The second argument is the workflow description file, written in XML using the DAX DTD */
char *workflow_file = argv[2];

/* Reading and parsing the workflow description file to create a wrench::Workflow object */
Expand All @@ -55,15 +55,15 @@ int main(int argc, char **argv) {
std::cerr << "The workflow has " << workflow.getNumberOfTasks() << " tasks " << std::endl;
std::cerr.flush();

/* Reading an parsing the platform description file to instantiate a simulated platform */
/* Reading and parsing the platform description file to instantiate a simulated platform */
std::cerr << "Instantiating SimGrid platform..." << std::endl;
simulation.instantiatePlatform(platform_file);

/* Get a vector of all the hosts in the simulated platform */
std::vector<std::string> hostname_list = simulation.getHostnameList();

/* Instantiate a storage service, to be stated on some host in the simulated platform,
* and adding it to the simulation. A StorageService is an abstraction of a service on
* and adding it to the simulation. A wrench::StorageService is an abstraction of a service on
* which files can be written and read. This particular storage service has a capacity
* of 10,000,000,000,000 bytes, and is a SimpleStorageService instance. The SimpleStorageService
* is a barebone storage service implementation provided by WRENCH.
Expand All @@ -76,14 +76,14 @@ int main(int argc, char **argv) {
new wrench::SimpleStorageService(storage_host, 10000000000000.0)));

/* Instantiate a cloud service, to be started on some host in the simulation platform.
* A cloud service is an abstraction of a compute service that corrresponds to a
* A cloud service is an abstraction of a compute service that corresponds to a
* Cloud platform that provides access to virtualized compute resources.
* In this example, this particular cloud service supports both standard jobs and pilot jobs.
* Unless otherwise specified, tasks running on the service will read/write workflow files
* from the storage service instantiated above. Finally, the last argument to the constructor
* shows how to configure particular simulated behaviors of the compute service via a property
* list. In this example, one specified that the message that will be send to the service to
* terminate it will by 1024 bytes. See the documentation to find out all availavle
* terminate it will by 1024 bytes. See the documentation to find out all available
* configurable properties for each kind of service.
*/
std::string wms_host = hostname_list[0];
Expand All @@ -107,7 +107,7 @@ int main(int argc, char **argv) {
std::vector<std::string> execution_hosts = {executor_host};

/* Instantiate a WMS, to be stated on some host (wms_host), which is responsible
* for executing the worklow, and uses a scheduler (CloudScheduler). That scheduler
* for executing the workflow, and uses a scheduler (CloudScheduler). That scheduler
* is instantiated with the cloud service, the list of hosts available for running
* tasks, and also provided a pointer to the simulation object.
*
Expand All @@ -134,7 +134,7 @@ int main(int argc, char **argv) {
simulation.setFileRegistryService(std::move(file_registry_service));

/* It is necessary to store, or "stage", input files for the first task(s) of the workflow on some storage
* service, so that workflow execution can be initiated. The getInputFiles() method of the Worflow class
* service, so that workflow execution can be initiated. The getInputFiles() method of the Workflow class
* returns the set of all workflow files that are not generated by workflow tasks, and thus are only input files.
* These files are then staged on the storage service.
*/
Expand All @@ -158,8 +158,8 @@ int main(int argc, char **argv) {
std::cerr << "Simulation done!" << std::endl;

/* Simulation results can be examined via simulation.output, which provides access to traces
* of events. In the code below we retrueve the trace of all task completion events, print how
* many such events thereare, and print some information for the first such event
* of events. In the code below, we retrieve the trace of all task completion events, print how
* many such events there are, and print some information for the first such event.
*/
std::vector<wrench::SimulationTimestamp<wrench::SimulationTimestampTaskCompletion> *> trace;
trace = simulation.output.getTrace<wrench::SimulationTimestampTaskCompletion>();
Expand Down

0 comments on commit 652c1c7

Please sign in to comment.