xbt_dynar_foreach(cmds, cursor, cmd) {
int *p = xbt_dict_get_or_null(pals_int, cmd->who);
if (!p) {
xbt_dynar_foreach(cmds, cursor, cmd) {
int *p = xbt_dict_get_or_null(pals_int, cmd->who);
if (!p) {
/* friends, we're ready. Come and play */
XBT_INFO("Wait for peers for a while. I need %d peers",
/* friends, we're ready. Come and play */
XBT_INFO("Wait for peers for a while. I need %d peers",
xbt_dynar_foreach(peers, cursor, peer) {
xbt_dict_remove(pals_int, peer->name);
}
xbt_dynar_foreach(peers, cursor, peer) {
xbt_dict_remove(pals_int, peer->name);
}
gras_socket_t pal;
xbt_dynar_foreach(peers, cursor, peer) {
//XBT_INFO("%s is here",peer->name);
gras_socket_t pal;
xbt_dynar_foreach(peers, cursor, peer) {
//XBT_INFO("%s is here",peer->name);
TRY {
gras_msg_wait(1000000, "chunk", NULL, &chunk);
}
TRY {
gras_msg_wait(1000000, "chunk", NULL, &chunk);
}
SIMIX_display_process_status();
RETHROWF("Exception while waiting for %f bytes from %s: %s",
cmd->d_arg, cmd->str_arg);
SIMIX_display_process_status();
RETHROWF("Exception while waiting for %f bytes from %s: %s",
cmd->d_arg, cmd->str_arg);
switch (cmd->action) {
case XBT_WORKLOAD_COMPUTE:
/* If any communication were queued, do them in parallel */
switch (cmd->action) {
case XBT_WORKLOAD_COMPUTE:
/* If any communication were queued, do them in parallel */
TRY {
xbt_dynar_dopar(cmd_to_go, do_command);
xbt_dynar_reset(cmd_to_go);
}
CATCH(e) {
SIMIX_display_process_status();
TRY {
xbt_dynar_dopar(cmd_to_go, do_command);
xbt_dynar_reset(cmd_to_go);
}
CATCH(e) {
SIMIX_display_process_status();
/* do in parallel any communication still queued */
XBT_INFO("Do %ld pending communications after end of TODO list",
xbt_dynar_length(cmd_to_go));
/* do in parallel any communication still queued */
XBT_INFO("Do %ld pending communications after end of TODO list",
xbt_dynar_length(cmd_to_go));
xbt_dynar_dopar(cmd_to_go, do_command);
xbt_dynar_reset(cmd_to_go);
}
xbt_dynar_dopar(cmd_to_go, do_command);
xbt_dynar_reset(cmd_to_go);
}