ADD_TEST(msg-trace ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg trace/trace.tesh)
ADD_TEST(msg-masterslave_cpu_ti ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti.tesh)
ADD_TEST(msg_icomms ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg/icomms peer.tesh)
+ADD_TEST(msg_icomms_waitany ${PROJECT_DIRECTORY}/examples/msg/icomms/peer3
+ ${PROJECT_DIRECTORY}/examples/msg/icomms/small_platform.xml
+ ${PROJECT_DIRECTORY}/examples/msg/icomms/deployment_peer05.xml)
IF(HAVE_TRACING)
ADD_TEST(tracing-ms ${CMAKE_BINARY_DIR}/bin/tesh --cd ${PROJECT_DIRECTORY}/examples/msg tracing/ms.tesh)
{
sprintf(mailbox,"receiver-%ld",(i % receivers_count));
sprintf(sprintf_buffer, "Task_%d", i);
- task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size/pow(10,i), NULL);
+ task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL);
comm[i] = MSG_task_isend(task, mailbox);
MSG_task_refcount_dec(task);
xbt_dynar_push_as(d, msg_comm_t, comm[i]);
- INFO3("Send to receiver-%ld %s comm_size %f",i % receivers_count,sprintf_buffer,task_comm_size/pow(10,i));
+ INFO3("Send to receiver-%ld %s comm_size %f",i % receivers_count,sprintf_buffer,task_comm_size);
}
/* Here we are waiting for the completion of all communications*/
res_irecv = MSG_task_irecv(&(task), mailbox);
xbt_assert0(MSG_comm_wait(res_irecv,-1) == MSG_OK, "MSG_task_get failed");
MSG_task_destroy(task);
- MSG_comm_destroy(res_irecv);
}
INFO0("Goodbye now!");
/* Here we tell to sender that all tasks are done*/
sprintf(mailbox,"finalize");
- res_irecv = MSG_task_isend(MSG_task_create("end", 0, 0, NULL), mailbox);
-
+ res_irecv = MSG_task_isend(MSG_task_create(NULL, 0, 0, NULL), mailbox);
+ MSG_comm_wait(res_irecv,-1);
INFO0("I'm done. See you!");
return 0;
} /* end_of_receiver */