A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f6c9a2b
)
Completely remove channel mecanism with tesh tested examples.
author
navarro
<navarro@caraja.(none)>
Tue, 17 Jan 2012 16:47:48 +0000
(17:47 +0100)
committer
navarro
<navarro@caraja.(none)>
Tue, 17 Jan 2012 16:47:48 +0000
(17:47 +0100)
19 files changed:
examples/msg/chord/chord.c
patch
|
blob
|
history
examples/msg/chord/chord_stateful.c
patch
|
blob
|
history
examples/msg/gtnets/gtnets.c
patch
|
blob
|
history
examples/msg/icomms/peer.c
patch
|
blob
|
history
examples/msg/icomms/peer2.c
patch
|
blob
|
history
examples/msg/icomms/peer3.c
patch
|
blob
|
history
examples/msg/masterslave/masterslave_bypass.c
patch
|
blob
|
history
examples/msg/masterslave/masterslave_cluster.c
patch
|
blob
|
history
examples/msg/masterslave/masterslave_console.c
patch
|
blob
|
history
examples/msg/masterslave/masterslave_failure.c
patch
|
blob
|
history
examples/msg/masterslave/masterslave_forwarder.c
patch
|
blob
|
history
examples/msg/masterslave/masterslave_mailbox.c
patch
|
blob
|
history
examples/msg/parallel_task/parallel_task.c
patch
|
blob
|
history
examples/msg/parallel_task/test_ptask.c
patch
|
blob
|
history
examples/msg/priority/priority.c
patch
|
blob
|
history
examples/msg/sendrecv/sendrecv.c
patch
|
blob
|
history
examples/msg/suspend/suspend.c
patch
|
blob
|
history
examples/msg/token_ring/ring_call.c
patch
|
blob
|
history
teshsuite/msg/get_sender.c
patch
|
blob
|
history
diff --git
a/examples/msg/chord/chord.c
b/examples/msg/chord/chord.c
index
2bfaa48
..
5a18518
100644
(file)
--- a/
examples/msg/chord/chord.c
+++ b/
examples/msg/chord/chord.c
@@
-911,7
+911,6
@@
int main(int argc, char *argv[])
chord_initialize();
chord_initialize();
- MSG_set_channel_number(0);
MSG_create_environment(platform_file);
MSG_function_register("node", node);
MSG_create_environment(platform_file);
MSG_function_register("node", node);
diff --git
a/examples/msg/chord/chord_stateful.c
b/examples/msg/chord/chord_stateful.c
index
481da7a
..
5a1c2cf
100644
(file)
--- a/
examples/msg/chord/chord_stateful.c
+++ b/
examples/msg/chord/chord_stateful.c
@@
-927,7
+927,6
@@
int main(int argc, char *argv[])
chord_initialize();
chord_initialize();
- MSG_set_channel_number(0);
MSG_create_environment(platform_file);
MSG_function_register("node", node);
MSG_create_environment(platform_file);
MSG_function_register("node", node);
diff --git
a/examples/msg/gtnets/gtnets.c
b/examples/msg/gtnets/gtnets.c
index
b60e800
..
11a895e
100644
(file)
--- a/
examples/msg/gtnets/gtnets.c
+++ b/
examples/msg/gtnets/gtnets.c
@@
-21,11
+21,6
@@
MSG_error_t test_all(const char *platform_file,
int timer_start = 1;
int timer_start = 1;
-typedef enum {
- PORT_22 = 0,
- MAX_CHANNEL
-} channel_t;
-
//keep a pointer to all surf running tasks.
#define NTASKS 1500
int bool_printed = 0;
//keep a pointer to all surf running tasks.
#define NTASKS 1500
int bool_printed = 0;
@@
-209,7
+204,6
@@
MSG_error_t test_all(const char *platform_file,
/* MSG_config("workstation/model", "GTNETS"); */
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
/* MSG_config("workstation/model", "GTNETS"); */
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
- MSG_set_channel_number(MAX_CHANNEL);
MSG_create_environment(platform_file);
}
MSG_create_environment(platform_file);
}
diff --git
a/examples/msg/icomms/peer.c
b/examples/msg/icomms/peer.c
index
dff859e
..
a9fa072
100644
(file)
--- a/
examples/msg/icomms/peer.c
+++ b/
examples/msg/icomms/peer.c
@@
-141,7
+141,6
@@
MSG_error_t test_all(const char *platform_file,
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
- MSG_set_channel_number(0);
MSG_create_environment(platform_file);
}
{ /* Application deployment */
MSG_create_environment(platform_file);
}
{ /* Application deployment */
diff --git
a/examples/msg/icomms/peer2.c
b/examples/msg/icomms/peer2.c
index
fde2c5a
..
9e27e9b
100644
(file)
--- a/
examples/msg/icomms/peer2.c
+++ b/
examples/msg/icomms/peer2.c
@@
-100,7
+100,6
@@
MSG_error_t test_all(const char *platform_file,
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
- MSG_set_channel_number(0);
MSG_create_environment(platform_file);
}
{ /* Application deployment */
MSG_create_environment(platform_file);
}
{ /* Application deployment */
diff --git
a/examples/msg/icomms/peer3.c
b/examples/msg/icomms/peer3.c
index
410e0f7
..
a86a0cc
100644
(file)
--- a/
examples/msg/icomms/peer3.c
+++ b/
examples/msg/icomms/peer3.c
@@
-134,7
+134,6
@@
MSG_error_t test_all(const char *platform_file,
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
- MSG_set_channel_number(0);
MSG_create_environment(platform_file);
}
{ /* Application deployment */
MSG_create_environment(platform_file);
}
{ /* Application deployment */
diff --git
a/examples/msg/masterslave/masterslave_bypass.c
b/examples/msg/masterslave/masterslave_bypass.c
index
b35ebe6
..
4c6f2a8
100644
(file)
--- a/
examples/msg/masterslave/masterslave_bypass.c
+++ b/
examples/msg/masterslave/masterslave_bypass.c
@@
-152,11
+152,6
@@
int master(int argc, char *argv[]);
int slave(int argc, char *argv[]);
MSG_error_t test_all(void);
int slave(int argc, char *argv[]);
MSG_error_t test_all(void);
-typedef enum {
- PORT_22 = 0,
- MAX_CHANNEL
-} channel_t;
-
/** Emitter function */
int master(int argc, char *argv[])
{
/** Emitter function */
int master(int argc, char *argv[])
{
@@
-217,15
+212,15
@@
int master(int argc, char *argv[])
if (MSG_host_self() == slaves[i % slaves_count]) {
XBT_INFO("Hey ! It's me ! :)");
}
if (MSG_host_self() == slaves[i % slaves_count]) {
XBT_INFO("Hey ! It's me ! :)");
}
- MSG_task_
put(todo[i], slaves[i % slaves_count], PORT_22
);
+ MSG_task_
send(todo[i], MSG_host_get_name(slaves[i % slaves_count])
);
XBT_INFO("Send completed");
}
XBT_INFO
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++)
XBT_INFO("Send completed");
}
XBT_INFO
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++)
- MSG_task_
put
(MSG_task_create("finalize", 0, 0, FINALIZE),
-
slaves[i], PORT_22
);
+ MSG_task_
send
(MSG_task_create("finalize", 0, 0, FINALIZE),
+
MSG_host_get_name(slaves[i])
);
XBT_INFO("Goodbye now!");
free(slaves);
XBT_INFO("Goodbye now!");
free(slaves);
@@
-240,7
+235,7
@@
int slave(int argc, char *argv[])
while (1) {
m_task_t task = NULL;
int a;
while (1) {
m_task_t task = NULL;
int a;
- a = MSG_task_
get(&(task), PORT_22
);
+ a = MSG_task_
receive(&task, MSG_host_get_name(MSG_host_self())
);
if (a == MSG_OK) {
XBT_INFO("Received \"%s\" ", MSG_task_get_name(task));
if (MSG_task_get_data(task) == FINALIZE) {
if (a == MSG_OK) {
XBT_INFO("Received \"%s\" ", MSG_task_get_name(task));
if (MSG_task_get_data(task) == FINALIZE) {
@@
-266,7
+261,6
@@
MSG_error_t test_all(void)
MSG_error_t res = MSG_OK;
/* Simulation setting */
MSG_error_t res = MSG_OK;
/* Simulation setting */
- MSG_set_channel_number(MAX_CHANNEL);
surf_parse = surf_parse_bypass_platform;
MSG_create_environment(NULL);
surf_parse = surf_parse_bypass_platform;
MSG_create_environment(NULL);
diff --git
a/examples/msg/masterslave/masterslave_cluster.c
b/examples/msg/masterslave/masterslave_cluster.c
index
396b361
..
7676189
100644
(file)
--- a/
examples/msg/masterslave/masterslave_cluster.c
+++ b/
examples/msg/masterslave/masterslave_cluster.c
@@
-22,11
+22,6
@@
MSG_error_t test_all(const char *platform_file);
int master(int argc, char *argv[]);
int slave(int argc, char *argv[]);
int master(int argc, char *argv[]);
int slave(int argc, char *argv[]);
-typedef enum {
- PORT_22 = 0,
- MAX_CHANNEL
-} channel_t;
-
/** Emitter function */
int master(int argc, char *argv[])
{
/** Emitter function */
int master(int argc, char *argv[])
{
@@
-87,15
+82,15
@@
int master(int argc, char *argv[])
if (MSG_host_self() == slaves[i % slaves_count]) {
XBT_INFO("Hey ! It's me ! :)");
}
if (MSG_host_self() == slaves[i % slaves_count]) {
XBT_INFO("Hey ! It's me ! :)");
}
- MSG_task_
put(todo[i], slaves[i % slaves_count], PORT_22
);
+ MSG_task_
send(todo[i], MSG_host_get_name(slaves[i % slaves_count])
);
XBT_INFO("Send completed");
}
XBT_INFO
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++)
XBT_INFO("Send completed");
}
XBT_INFO
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++)
- MSG_task_
put
(MSG_task_create("finalize", 0, 0, FINALIZE),
-
slaves[i], PORT_22
);
+ MSG_task_
send
(MSG_task_create("finalize", 0, 0, FINALIZE),
+
MSG_host_get_name(slaves[i])
);
XBT_INFO("Goodbye now!");
free(slaves);
XBT_INFO("Goodbye now!");
free(slaves);
@@
-110,7
+105,7
@@
int slave(int argc, char *argv[])
while (1) {
m_task_t task = NULL;
int a;
while (1) {
m_task_t task = NULL;
int a;
- a = MSG_task_
get(&(task), PORT_22
);
+ a = MSG_task_
receive(&(task), MSG_host_get_name(MSG_host_self())
);
if (a == MSG_OK) {
XBT_INFO("Received \"%s\" ", MSG_task_get_name(task));
if (MSG_task_get_data(task) == FINALIZE) {
if (a == MSG_OK) {
XBT_INFO("Received \"%s\" ", MSG_task_get_name(task));
if (MSG_task_get_data(task) == FINALIZE) {
@@
-202,7
+197,6
@@
static int bypass_deployment(void)
MSG_error_t test_all(const char *platform_file)
{
MSG_error_t res = MSG_OK;
MSG_error_t test_all(const char *platform_file)
{
MSG_error_t res = MSG_OK;
- MSG_set_channel_number(MAX_CHANNEL);
MSG_create_environment(platform_file);
MSG_function_register("master", master);
MSG_function_register("slave", slave);
MSG_create_environment(platform_file);
MSG_function_register("master", master);
MSG_function_register("slave", slave);
diff --git
a/examples/msg/masterslave/masterslave_console.c
b/examples/msg/masterslave/masterslave_console.c
index
eff5909
..
5b4a1ab
100644
(file)
--- a/
examples/msg/masterslave/masterslave_console.c
+++ b/
examples/msg/masterslave/masterslave_console.c
@@
-18,11
+18,6
@@
int master(int argc, char *argv[]);
int slave(int argc, char *argv[]);
MSG_error_t test_all(const char *);
int slave(int argc, char *argv[]);
MSG_error_t test_all(const char *);
-typedef enum {
- PORT_22 = 0,
- MAX_CHANNEL
-} channel_t;
-
/** Emitter function */
int master(int argc, char *argv[])
{
/** Emitter function */
int master(int argc, char *argv[])
{
@@
-102,8
+97,7
@@
int slave(int argc, char *argv[])
MSG_error_t test_all(const char *file) //(void)
{
MSG_error_t res = MSG_OK;
MSG_error_t test_all(const char *file) //(void)
{
MSG_error_t res = MSG_OK;
- /* Simulation setting */
- MSG_set_channel_number(MAX_CHANNEL);
+
/*start by registering functions before loading script */
MSG_function_register("master", master);
MSG_function_register("slave", slave);
/*start by registering functions before loading script */
MSG_function_register("master", master);
MSG_function_register("slave", slave);
diff --git
a/examples/msg/masterslave/masterslave_failure.c
b/examples/msg/masterslave/masterslave_failure.c
index
f93761e
..
c882244
100644
(file)
--- a/
examples/msg/masterslave/masterslave_failure.c
+++ b/
examples/msg/masterslave/masterslave_failure.c
@@
-20,11
+20,6
@@
int forwarder(int argc, char *argv[]);
MSG_error_t test_all(const char *platform_file,
const char *application_file);
MSG_error_t test_all(const char *platform_file,
const char *application_file);
-typedef enum {
- PORT_22 = 0,
- MAX_CHANNEL
-} channel_t;
-
#define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */
/** Emitter function */
#define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */
/** Emitter function */
@@
-70,8
+65,8
@@
int master(int argc, char *argv[])
int a;
*((double *) task->data) = MSG_get_clock();
int a;
*((double *) task->data) = MSG_get_clock();
- a = MSG_task_
put_with_timeout(task, slaves[i % slaves_count], PORT_22,
- 10.0);
+ a = MSG_task_
send_with_timeout(task,MSG_host_get_name(slaves[i % slaves_count]),10.0);
+
if (a == MSG_OK) {
XBT_INFO("Send completed");
} else if (a == MSG_HOST_FAILURE) {
if (a == MSG_OK) {
XBT_INFO("Send completed");
} else if (a == MSG_HOST_FAILURE) {
@@
-103,7
+98,7
@@
int master(int argc, char *argv[])
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++) {
m_task_t task = MSG_task_create("finalize", 0, 0, FINALIZE);
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++) {
m_task_t task = MSG_task_create("finalize", 0, 0, FINALIZE);
- int a = MSG_task_
put_with_timeout(task, slaves[i], PORT_22,
1.0);
+ int a = MSG_task_
send_with_timeout(task,MSG_host_get_name(slaves[i]),
1.0);
if (a == MSG_OK)
continue;
if (a == MSG_HOST_FAILURE) {
if (a == MSG_OK)
continue;
if (a == MSG_HOST_FAILURE) {
@@
-141,7
+136,7
@@
int slave(int argc, char *argv[])
double time1, time2;
time1 = MSG_get_clock();
double time1, time2;
time1 = MSG_get_clock();
- a = MSG_task_
get(&(task), PORT_22
);
+ a = MSG_task_
receive( &(task), MSG_host_get_name(MSG_host_self())
);
time2 = MSG_get_clock();
if (a == MSG_OK) {
XBT_INFO("Received \"%s\"", MSG_task_get_name(task));
time2 = MSG_get_clock();
if (a == MSG_OK) {
XBT_INFO("Received \"%s\"", MSG_task_get_name(task));
@@
-189,7
+184,6
@@
MSG_error_t test_all(const char *platform_file,
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
- MSG_set_channel_number(MAX_CHANNEL);
MSG_create_environment(platform_file);
}
{ /* Application deployment */
MSG_create_environment(platform_file);
}
{ /* Application deployment */
diff --git
a/examples/msg/masterslave/masterslave_forwarder.c
b/examples/msg/masterslave/masterslave_forwarder.c
index
5978b0e
..
b428b60
100644
(file)
--- a/
examples/msg/masterslave/masterslave_forwarder.c
+++ b/
examples/msg/masterslave/masterslave_forwarder.c
@@
-20,11
+20,6
@@
int forwarder(int argc, char *argv[]);
MSG_error_t test_all(const char *platform_file,
const char *application_file);
MSG_error_t test_all(const char *platform_file,
const char *application_file);
-typedef enum {
- PORT_22 = 0,
- MAX_CHANNEL
-} channel_t;
-
#define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */
/** Emitter function */
#define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */
/** Emitter function */
@@
-82,7
+77,7
@@
int master(int argc, char *argv[])
XBT_INFO("Hey ! It's me ! :)");
}
XBT_INFO("Hey ! It's me ! :)");
}
- MSG_task_
put(todo[i], slaves[i % slaves_count], PORT_22
);
+ MSG_task_
send(todo[i], MSG_host_get_name(slaves[i % slaves_count])
);
XBT_INFO("Sent");
}
XBT_INFO("Sent");
}
@@
-90,7
+85,7
@@
int master(int argc, char *argv[])
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++) {
m_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++) {
m_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
- MSG_task_
put(finalize, slaves[i], PORT_22
);
+ MSG_task_
send(finalize, MSG_host_get_name(slaves[i])
);
}
XBT_INFO("Goodbye now!");
}
XBT_INFO("Goodbye now!");
@@
-105,7
+100,7
@@
int slave(int argc, char *argv[])
m_task_t task = NULL;
_XBT_GNUC_UNUSED int res;
while (1) {
m_task_t task = NULL;
_XBT_GNUC_UNUSED int res;
while (1) {
- res = MSG_task_
get(&(task), PORT_22
);
+ res = MSG_task_
receive(&(task),MSG_host_get_name(MSG_host_self())
);
xbt_assert(res == MSG_OK, "MSG_task_get failed");
XBT_INFO("Received \"%s\"", MSG_task_get_name(task));
xbt_assert(res == MSG_OK, "MSG_task_get failed");
XBT_INFO("Received \"%s\"", MSG_task_get_name(task));
@@
-148,21
+143,21
@@
int forwarder(int argc, char *argv[])
while (1) {
m_task_t task = NULL;
int a;
while (1) {
m_task_t task = NULL;
int a;
- a = MSG_task_
get(&(task), PORT_22
);
+ a = MSG_task_
receive(&(task),MSG_host_get_name(MSG_host_self())
);
if (a == MSG_OK) {
XBT_INFO("Received \"%s\"", MSG_task_get_name(task));
if (MSG_task_get_data(task) == FINALIZE) {
XBT_INFO
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++)
if (a == MSG_OK) {
XBT_INFO("Received \"%s\"", MSG_task_get_name(task));
if (MSG_task_get_data(task) == FINALIZE) {
XBT_INFO
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++)
- MSG_task_
put
(MSG_task_create("finalize", 0, 0, FINALIZE),
-
slaves[i], PORT_22
);
+ MSG_task_
send
(MSG_task_create("finalize", 0, 0, FINALIZE),
+
MSG_host_get_name(slaves[i])
);
MSG_task_destroy(task);
break;
}
XBT_INFO("Sending \"%s\" to \"%s\"",
MSG_task_get_name(task), slaves[i % slaves_count]->name);
MSG_task_destroy(task);
break;
}
XBT_INFO("Sending \"%s\" to \"%s\"",
MSG_task_get_name(task), slaves[i % slaves_count]->name);
- MSG_task_
put(task, slaves[i % slaves_count], PORT_22
);
+ MSG_task_
send(task, MSG_host_get_name(slaves[i % slaves_count])
);
i++;
} else {
XBT_INFO("Hey ?! What's up ? ");
i++;
} else {
XBT_INFO("Hey ?! What's up ? ");
@@
-183,7
+178,6
@@
MSG_error_t test_all(const char *platform_file,
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
- MSG_set_channel_number(MAX_CHANNEL);
MSG_create_environment(platform_file);
}
{ /* Application deployment */
MSG_create_environment(platform_file);
}
{ /* Application deployment */
diff --git
a/examples/msg/masterslave/masterslave_mailbox.c
b/examples/msg/masterslave/masterslave_mailbox.c
index
f789f15
..
551e38b
100644
(file)
--- a/
examples/msg/masterslave/masterslave_mailbox.c
+++ b/
examples/msg/masterslave/masterslave_mailbox.c
@@
-105,7
+105,6
@@
MSG_error_t test_all(const char *platform_file,
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
/* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
- MSG_set_channel_number(0);
MSG_create_environment(platform_file);
}
{ /* Application deployment */
MSG_create_environment(platform_file);
}
{ /* Application deployment */
diff --git
a/examples/msg/parallel_task/parallel_task.c
b/examples/msg/parallel_task/parallel_task.c
index
ced1cf2
..
f546f6c
100644
(file)
--- a/
examples/msg/parallel_task/parallel_task.c
+++ b/
examples/msg/parallel_task/parallel_task.c
@@
-65,7
+65,6
@@
MSG_error_t test_all(const char *platform_file)
m_host_t *hosts;
MSG_config("workstation/model", "ptask_L07");
m_host_t *hosts;
MSG_config("workstation/model", "ptask_L07");
- MSG_set_channel_number(1);
MSG_create_environment(platform_file);
hosts = MSG_get_host_table();
MSG_create_environment(platform_file);
hosts = MSG_get_host_table();
diff --git
a/examples/msg/parallel_task/test_ptask.c
b/examples/msg/parallel_task/test_ptask.c
index
03c5b94
..
4417558
100644
(file)
--- a/
examples/msg/parallel_task/test_ptask.c
+++ b/
examples/msg/parallel_task/test_ptask.c
@@
-20,11
+20,6
@@
int redistribute(int argc, char *argv[]);
MSG_error_t test_all(const char *platform_file,
const char *application_file);
MSG_error_t test_all(const char *platform_file,
const char *application_file);
-typedef enum {
- PORT_22 = 0,
- MAX_CHANNEL
-} channel_t;
-
int execute(int argc, char *argv[])
{
int execute(int argc, char *argv[])
{
@@
-145,7
+140,6
@@
MSG_error_t test_all(const char *platform_file,
MSG_config("workstation/model", "ptask_L07");
/* Simulation setting */
MSG_config("workstation/model", "ptask_L07");
/* Simulation setting */
- MSG_set_channel_number(MAX_CHANNEL);
MSG_create_environment(platform_file);
/* Application deployment */
MSG_create_environment(platform_file);
/* Application deployment */
diff --git
a/examples/msg/priority/priority.c
b/examples/msg/priority/priority.c
index
48aaeaf
..
e4686cb
100644
(file)
--- a/
examples/msg/priority/priority.c
+++ b/
examples/msg/priority/priority.c
@@
-43,7
+43,6
@@
static MSG_error_t test_all(const char *platform_file,
MSG_error_t res = MSG_OK;
{ /* Simulation setting */
MSG_error_t res = MSG_OK;
{ /* Simulation setting */
- MSG_set_channel_number(1);
MSG_create_environment(platform_file);
}
{ /* Application deployment */
MSG_create_environment(platform_file);
}
{ /* Application deployment */
diff --git
a/examples/msg/sendrecv/sendrecv.c
b/examples/msg/sendrecv/sendrecv.c
index
cd5ea88
..
56bd375
100644
(file)
--- a/
examples/msg/sendrecv/sendrecv.c
+++ b/
examples/msg/sendrecv/sendrecv.c
@@
-22,11
+22,6
@@
int receiver(int argc, char *argv[]);
MSG_error_t test_all(const char *platform_file,
const char *application_file);
MSG_error_t test_all(const char *platform_file,
const char *application_file);
-typedef enum {
- PORT_22 = 0,
- MAX_CHANNEL
-} channel_t;
-
double task_comm_size_lat = 10e0;
double task_comm_size_bw = 10e8;
double task_comm_size_lat = 10e0;
double task_comm_size_bw = 10e8;
@@
-61,7
+56,7
@@
int sender(int argc, char *argv[])
task_la->data = xbt_new(double, 1);
*(double *) task_la->data = time;
XBT_INFO("task_la->data = %le", *((double *) task_la->data));
task_la->data = xbt_new(double, 1);
*(double *) task_la->data = time;
XBT_INFO("task_la->data = %le", *((double *) task_la->data));
- MSG_task_
put(task_la, host, PORT_22
);
+ MSG_task_
send(task_la, argv[1]
);
/* Bandwidth */
time = MSG_get_clock();
/* Bandwidth */
time = MSG_get_clock();
@@
-71,7
+66,7
@@
int sender(int argc, char *argv[])
task_bw->data = xbt_new(double, 1);
*(double *) task_bw->data = time;
XBT_INFO("task_bw->data = %le", *((double *) task_bw->data));
task_bw->data = xbt_new(double, 1);
*(double *) task_bw->data = time;
XBT_INFO("task_bw->data = %le", *((double *) task_bw->data));
- MSG_task_
put(task_bw, host, PORT_22
);
+ MSG_task_
send(task_bw, argv[1]
);
return 0;
} /* end_of_client */
return 0;
} /* end_of_client */
@@
-90,7
+85,7
@@
int receiver(int argc, char *argv[])
time = MSG_get_clock();
/* Get Latency */
time = MSG_get_clock();
/* Get Latency */
- a = MSG_task_
get(&task_la, PORT_22
);
+ a = MSG_task_
receive(&task_la,MSG_host_get_name(MSG_host_self())
);
if (a == MSG_OK) {
time1 = MSG_get_clock();
sender_time = *((double *) (task_la->data));
if (a == MSG_OK) {
time1 = MSG_get_clock();
sender_time = *((double *) (task_la->data));
@@
-107,7
+102,7
@@
int receiver(int argc, char *argv[])
/* Get Bandwidth */
/* Get Bandwidth */
- a = MSG_task_
get(&task_bw, PORT_22
);
+ a = MSG_task_
receive(&task_bw,MSG_host_get_name(MSG_host_self())
);
if (a == MSG_OK) {
time1 = MSG_get_clock();
sender_time = *((double *) (task_bw->data));
if (a == MSG_OK) {
time1 = MSG_get_clock();
sender_time = *((double *) (task_bw->data));
@@
-139,7
+134,6
@@
MSG_error_t test_all(const char *platform_file,
XBT_INFO("test_all");
/* Simulation setting */
XBT_INFO("test_all");
/* Simulation setting */
- MSG_set_channel_number(MAX_CHANNEL);
MSG_create_environment(platform_file);
/* Application deployment */
MSG_create_environment(platform_file);
/* Application deployment */
diff --git
a/examples/msg/suspend/suspend.c
b/examples/msg/suspend/suspend.c
index
2dc8304
..
e1e2ba8
100644
(file)
--- a/
examples/msg/suspend/suspend.c
+++ b/
examples/msg/suspend/suspend.c
@@
-12,11
+12,6
@@
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
"Messages specific for this msg example");
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
"Messages specific for this msg example");
-typedef enum {
- PORT_22 = 0,
- MAX_CHANNEL
-} channel_t;
-
/** Lazy guy function. This process suspends itself asap. */
static int lazy_guy(int argc, char *argv[])
/** Lazy guy function. This process suspends itself asap. */
static int lazy_guy(int argc, char *argv[])
@@
-51,7
+46,6
@@
static MSG_error_t test_all(const char *platform_file,
MSG_error_t res = MSG_OK;
{ /* Simulation setting */
MSG_error_t res = MSG_OK;
{ /* Simulation setting */
- MSG_set_channel_number(MAX_CHANNEL);
MSG_create_environment(platform_file);
}
{ /* Application deployment */
MSG_create_environment(platform_file);
}
{ /* Application deployment */
diff --git
a/examples/msg/token_ring/ring_call.c
b/examples/msg/token_ring/ring_call.c
index
8cdf4e9
..
be67d1c
100644
(file)
--- a/
examples/msg/token_ring/ring_call.c
+++ b/
examples/msg/token_ring/ring_call.c
@@
-50,16
+50,10
@@
int host(int argc, char *argv[])
return 0;
}
return 0;
}
-typedef enum {
- PORT_22 = 20,
- MAX_CHANNEL
-} channel_t;
-
int main(int argc, char **argv)
{
int i,res;
MSG_global_init(&argc, argv);
int main(int argc, char **argv)
{
int i,res;
MSG_global_init(&argc, argv);
- MSG_set_channel_number(MAX_CHANNEL);
MSG_create_environment(argv[1]);
m_host_t *host_table = MSG_get_host_table();
number_of_hosts = MSG_get_host_number();
MSG_create_environment(argv[1]);
m_host_t *host_table = MSG_get_host_table();
number_of_hosts = MSG_get_host_number();
diff --git
a/teshsuite/msg/get_sender.c
b/teshsuite/msg/get_sender.c
index
aecfda8
..
6a766c5
100644
(file)
--- a/
teshsuite/msg/get_sender.c
+++ b/
teshsuite/msg/get_sender.c
@@
-14,8
+14,7
@@
XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Messages specific to this example");
static int send(int argc, char *argv[])
{
XBT_INFO("Sending");
static int send(int argc, char *argv[])
{
XBT_INFO("Sending");
- MSG_task_put(MSG_task_create("Blah", 0.0, 0.0, NULL), MSG_host_self(),
- 0);
+ MSG_task_send(MSG_task_create("Blah", 0.0, 0.0, NULL), MSG_host_get_name(MSG_host_self()));
MSG_process_sleep(1.); /* FIXME: if the sender exits before the receiver calls get_sender(), bad thing happens */
XBT_INFO("Exiting");
return 0;
MSG_process_sleep(1.); /* FIXME: if the sender exits before the receiver calls get_sender(), bad thing happens */
XBT_INFO("Exiting");
return 0;
@@
-25,7
+24,7
@@
static int receive(int argc, char *argv[])
{
XBT_INFO("Receiving");
m_task_t task = NULL;
{
XBT_INFO("Receiving");
m_task_t task = NULL;
- MSG_task_
get_with_timeout(&task, 0
, DBL_MAX);
+ MSG_task_
receive_with_timeout(&task, MSG_host_get_name(MSG_host_self())
, DBL_MAX);
xbt_assert(MSG_task_get_sender(task), "No sender received");
XBT_INFO("Got a message sent by '%s'",
MSG_process_get_name(MSG_task_get_sender(task)));
xbt_assert(MSG_task_get_sender(task), "No sender received");
XBT_INFO("Got a message sent by '%s'",
MSG_process_get_name(MSG_task_get_sender(task)));
@@
-38,7
+37,6
@@
int main(int argc, char *argv[])
MSG_error_t res = MSG_OK;
MSG_global_init(&argc, argv);
MSG_error_t res = MSG_OK;
MSG_global_init(&argc, argv);
- MSG_set_channel_number(100);
/* Application deployment */
MSG_function_register("send", &send);
/* Application deployment */
MSG_function_register("send", &send);