- } else {
-
- // make sure root is done before own initialization
- SIMIX_mutex_lock(smpi_global->start_stop_mutex);
- while (!smpi_global->root_ready) {
- SIMIX_cond_wait(smpi_global->start_stop_cond,
- smpi_global->start_stop_mutex);
- }
- SIMIX_mutex_unlock(smpi_global->start_stop_mutex);
-
- }
-
- // wait for all nodes to signal initializatin complete
- SIMIX_mutex_lock(smpi_global->start_stop_mutex);
- smpi_global->ready_process_count++;
- if (smpi_global->ready_process_count >= 3 * smpi_global->host_count) {
- SIMIX_cond_broadcast(smpi_global->start_stop_cond);
- }
- while (smpi_global->ready_process_count < 3 * smpi_global->host_count) {
- SIMIX_cond_wait(smpi_global->start_stop_cond,
- smpi_global->start_stop_mutex);
- }
- SIMIX_mutex_unlock(smpi_global->start_stop_mutex);
+ hdata->main = SIMIX_process_self();
+ hdata->sender = SIMIX_process_create("smpi_sender",
+ smpi_sender, hdata,
+ SIMIX_host_get_name(SIMIX_host_self()), 0, NULL,
+ /*props */ NULL);
+ hdata->receiver = SIMIX_process_create("smpi_receiver",
+ smpi_receiver, hdata,
+ SIMIX_host_get_name(SIMIX_host_self()), 0, NULL,
+ /*props */ NULL);