void smpi_bench_begin(void);
void smpi_bench_end(void);
void smpi_barrier(smpi_mpi_communicator_t *comm);
-int smpi_comm_rank(smpi_mpi_communicator_t *comm, smx_host_t host);
int smpi_create_request(void *buf, int count, smpi_mpi_datatype_t *datatype,
int src, int dst, int tag, smpi_mpi_communicator_t *comm, smpi_mpi_request_t **request);
int smpi_isend(smpi_mpi_request_t *request);
}
}
- // wait for senders/receivers to exit...
- SIMIX_mutex_lock(smpi_global->start_stop_mutex);
- if (smpi_global->ready_process_count > 0) {
- SIMIX_cond_wait(smpi_global->start_stop_cond, smpi_global->start_stop_mutex);
- }
- SIMIX_mutex_unlock(smpi_global->start_stop_mutex);
-
SIMIX_mutex_destroy(smpi_mpi_global->mpi_comm_world->simdata->barrier_mutex);
SIMIX_cond_destroy(smpi_mpi_global->mpi_comm_world->simdata->barrier_cond);
xbt_free(smpi_mpi_global->mpi_comm_world->simdata->processes);
xbt_free(smpi_mpi_global->mpi_sum);
xbt_free(smpi_mpi_global);
+
}
}
if (NULL != request) {
SIMIX_mutex_lock(request->simdata->mutex);
if (!request->completed) {
- SIMIX_cond_wait(request->simdata->cond, request->simdata->mutex);
+ // SIMIX_cond_wait(request->simdata->cond, request->simdata->mutex);
}
if (NULL != status) {
status->MPI_SOURCE = request->src;
} else if (NULL == rank) {
retval = MPI_ERR_ARG;
} else {
- *rank = smpi_comm_rank(comm, SIMIX_host_self());
+ *rank = smpi_mpi_comm_rank(comm, SIMIX_host_self());
}
smpi_bench_begin();
} while (0 < running_hosts_count);
- SIMIX_mutex_lock(smpi_global->start_stop_mutex);
- smpi_global->ready_process_count--;
- if (smpi_global->ready_process_count == 0) {
- SIMIX_cond_broadcast(smpi_global->start_stop_cond);
- } else if (smpi_global->ready_process_count < 0) {
- // FIXME: can't happen, abort!
- }
- SIMIX_mutex_unlock(smpi_global->start_stop_mutex);
-
return 0;
}
} while (0 < running_hosts_count);
- SIMIX_mutex_lock(smpi_global->start_stop_mutex);
- smpi_global->ready_process_count--;
- if (smpi_global->ready_process_count == 0) {
- SIMIX_cond_broadcast(smpi_global->start_stop_cond);
- } else if (smpi_global->ready_process_count < 0) {
- // FIXME: can't happen! abort!
- }
- SIMIX_mutex_unlock(smpi_global->start_stop_mutex);
-
return 0;
}
-