summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-08-16 19:08:06 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-08-16 19:08:06 +0000
commitb75c606c6d0dc425d6d25ab2d1186c63e39c2744 (patch)
treecd01a8c83aae5747f3b59d6b87c632131dba659a
parent8f7575aa4f40dc6f691aff0379cf3a830f7777bd (diff)
downloadATCD-b75c606c6d0dc425d6d25ab2d1186c63e39c2744.tar.gz
-rw-r--r--DAnCE/ExecutionManager/Execution_Manager_Impl.cpp2
-rw-r--r--DAnCE/Plan_Launcher/Plan_Launcher.cpp16
-rw-r--r--DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.cpp38
-rw-r--r--DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.h3
-rw-r--r--DAnCE/Plan_Launcher/Plan_Launcher_Impl.cpp6
-rw-r--r--DAnCE/Plan_Launcher/Plan_Launcher_Impl.h10
6 files changed, 55 insertions, 20 deletions
diff --git a/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp b/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
index b6bcb1ff2aa..bfb2e8ca0b5 100644
--- a/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
+++ b/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
@@ -455,7 +455,7 @@ dump_connections (const ::Deployment::Connections & connections)
"Execution_Manage::passivate shared components.\n"));
// Find the NodeApplication hosting the component, and then call
- // <finishLaunch> on it
+ // <passivate_component> on it
try
{
Deployment::NodeApplication_var
diff --git a/DAnCE/Plan_Launcher/Plan_Launcher.cpp b/DAnCE/Plan_Launcher/Plan_Launcher.cpp
index 38763b6d544..db92d2df84d 100644
--- a/DAnCE/Plan_Launcher/Plan_Launcher.cpp
+++ b/DAnCE/Plan_Launcher/Plan_Launcher.cpp
@@ -31,6 +31,10 @@ namespace CIAO
size_t niterations = 0;
size_t nthreads = 1;
CORBA::Short priority = 0;
+
+ /* For benchmarking purpose only */
+ size_t total_nodes = 1;
+ size_t total_components = 1;
enum mode_type {
pl_mode_start,
@@ -74,7 +78,7 @@ namespace CIAO
{
ACE_Get_Opt get_opt (argc,
argv,
- ACE_TEXT ("a:b:c:e:p:nk:l:v:t:o:i:r:z:h"));
+ ACE_TEXT ("a:b:c:e:p:nk:l:v:t:o:i:r:x:y:z:h"));
int c;
while ((c = get_opt ()) != EOF)
@@ -130,6 +134,12 @@ namespace CIAO
new_deployment_plan_url = get_opt.opt_arg ();
mode = pl_mode_redeployment;
break;
+ case 'x':
+ total_nodes = ACE_OS::atoi (get_opt.opt_arg ());
+ break;
+ case 'y':
+ total_components = ACE_OS::atoi (get_opt.opt_arg ());
+ break;
case 'z':
priority = ACE_OS::atoi (get_opt.opt_arg ());
break;
@@ -222,7 +232,9 @@ namespace CIAO
rm_use_naming ? repoman_name_ : rm_ior_file,
priority,
niterations,
- nthreads))
+ nthreads,
+ total_nodes,
+ total_components))
{
ACE_ERROR ((LM_ERROR, "(%P|%t) Plan_Launcher: Error initializing the EM.\n"));
return -1;
diff --git a/DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.cpp b/DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.cpp
index f35cee8adbd..58d1dbc2873 100644
--- a/DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.cpp
+++ b/DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.cpp
@@ -85,18 +85,32 @@ namespace CIAO
DAnCE_Utils::remove_instance (tmp_plan,
"Hello-Sender-idd");
- char trailing[256];
- ACE_OS::itoa (i, trailing, 10);
- ACE_CString inst_name ("Sender");
- inst_name += trailing;
- DAnCE_Utils::add_instances (100,
- tmp_plan,
- inst_name.c_str (),
- "SenderNode",
- "Hello-Sender-mdd",
- 0);
-
-
+ /* Modify the deployment plan. For each thread, we must
+ give different component instance name to avoid
+ confusing DAnCE to treat them as shared components */
+
+ // Instance name starts with thread_id (i.e., task_id).
+ char thread_id[256];
+ ACE_OS::itoa (i, thread_id, 10);
+ ACE_CString inst_name ("Task_");
+ inst_name += thread_id;
+ inst_name += "_";
+
+ // Now we add component instances into the plan
+ for (size_t j = 0; j < this->total_nodes_; ++j)
+ {
+ char node_id[256];
+ ACE_OS::itoa (j, node_id, 10);
+ ACE_CString node_name ("node");
+ inst_name += node_id;
+
+ DAnCE_Utils::add_instances (this->total_components_,
+ tmp_plan,
+ inst_name.c_str (),
+ node_id,
+ "Hello-Sender-mdd",
+ 0);
+ }
Task * task;
diff --git a/DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.h b/DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.h
index 43ab34f261d..133ae6be4d6 100644
--- a/DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.h
+++ b/DAnCE/Plan_Launcher/Plan_Launcher_Benchmark_Impl.h
@@ -35,9 +35,6 @@ namespace CIAO
virtual const char * launch_plan (const ::Deployment::DeploymentPlan &plan);
const char * launch_plan_i (const ::Deployment::DeploymentPlan &plan);
-
- protected:
-
};
}
diff --git a/DAnCE/Plan_Launcher/Plan_Launcher_Impl.cpp b/DAnCE/Plan_Launcher/Plan_Launcher_Impl.cpp
index c16731db560..849e52e8df0 100644
--- a/DAnCE/Plan_Launcher/Plan_Launcher_Impl.cpp
+++ b/DAnCE/Plan_Launcher/Plan_Launcher_Impl.cpp
@@ -51,12 +51,16 @@ namespace CIAO
const char *rm_name,
CORBA::Short priority,
size_t niterations,
- size_t nthreads)
+ size_t nthreads,
+ size_t total_nodes,
+ size_t total_components)
{
this->orb_ = CORBA::ORB::_duplicate (orb);
this->niterations_ = niterations;
this->nthreads_ = nthreads;
this->desired_priority_ = priority;
+ this->total_nodes_ = total_nodes;
+ this->total_components_ = total_components;
CORBA::Object_var obj;
diff --git a/DAnCE/Plan_Launcher/Plan_Launcher_Impl.h b/DAnCE/Plan_Launcher/Plan_Launcher_Impl.h
index af843c33d1a..6c1eaaf9ba9 100644
--- a/DAnCE/Plan_Launcher/Plan_Launcher_Impl.h
+++ b/DAnCE/Plan_Launcher/Plan_Launcher_Impl.h
@@ -47,7 +47,9 @@ namespace CIAO
const char *rm_name = 0,
CORBA::Short priority = 0,
size_t niterations = 0,
- size_t nthreads = 1);
+ size_t nthreads = 1,
+ size_t total_nodes = 1,
+ size_t total_components = 1);
/**
* @brief Launch a plan, given a deployment plan URI
@@ -113,6 +115,12 @@ namespace CIAO
/// Total number of threads to spawn inside plan_launcher
size_t nthreads_;
+ /// Total number of nodes
+ size_t total_nodes_;
+
+ /// Total number of components
+ size_t total_components_;
+
};
}