} channel_t;
//keep a pointer to all surf running tasks.
-#define NTASKS 150
+#define NTASKS 1500
int bool_printed=0;
double start_time, end_time, elapsed_time;
double gl_data_size[NTASKS];
/* time measurement */
start_time = MSG_get_clock();
- //MSG_task_put(todo, slave, PORT_22);
MSG_task_send(todo, id_alias);
end_time = MSG_get_clock();
id = atoi(argv[1]);
sprintf(id_alias, "%d",id);
-
- //a = MSG_task_get(&(task), PORT_22);
- a = MSG_task_receive(&(task), id_alias );
-
+ a = MSG_task_receive(&(task), id_alias );
if (a != MSG_OK) {
INFO0("Hey?! What's up?");
bool_printed=1;
for(id=0; id<NTASKS; id++){
if(gl_task_array[id] == NULL){
-
}else if(gl_task_array[id] == task){
INFO5("===> Estimated Bw of FLOW[%d] : %f ; message from %s to %s with remaining : %f", id, gl_data_size[id]/elapsed_time, masternames[id], slavenames[id], 0.0);
}else{
exit(0);
}
- MSG_task_destroy(task);
-
+ for(id=0; id<NTASKS; id++){
+ if(gl_task_array[id] == task){
+ MSG_task_destroy(task);
+ gl_task_array[id] = NULL;
+ return 0;
+ }
+ }
return 0;
} /* end_of_slave */