int* index_to_process_data = NULL;
extern double smpi_total_benched_time;
xbt_os_timer_t global_timer;
MPI_Comm MPI_COMM_WORLD = MPI_COMM_UNINITIALIZED;
int* index_to_process_data = NULL;
extern double smpi_total_benched_time;
xbt_os_timer_t global_timer;
MPI_Comm MPI_COMM_WORLD = MPI_COMM_UNINITIALIZED;
proc->context->cleanup_func=SIMIX_process_cleanup;
char* instance_id = (*argv)[1];
int rank = atoi((*argv)[2]);
proc->context->cleanup_func=SIMIX_process_cleanup;
char* instance_id = (*argv)[1];
int rank = atoi((*argv)[2]);
MPI_Comm* temp_comm_world;
xbt_bar_t temp_bar;
smpi_deployment_register_process(instance_id, rank, index, &temp_comm_world ,&temp_bar);
MPI_Comm* temp_comm_world;
xbt_bar_t temp_bar;
smpi_deployment_register_process(instance_id, rank, index, &temp_comm_world ,&temp_bar);
simcall_rdv_set_receiver(data->mailbox_small, proc);
XBT_DEBUG("<%d> New process in the game: %p", index, proc);
simcall_rdv_set_receiver(data->mailbox_small, proc);
XBT_DEBUG("<%d> New process in the game: %p", index, proc);
}
if (smpi_process_data() == NULL)
xbt_die("smpi_process_data() returned NULL. You probably gave a NULL parameter to MPI_Init. Although it's required by MPI-2, this is currently not supported by SMPI.");
}
if (smpi_process_data() == NULL)
xbt_die("smpi_process_data() returned NULL. You probably gave a NULL parameter to MPI_Init. Although it's required by MPI-2, this is currently not supported by SMPI.");
){
XBT_DEBUG("Privatization : We are copying from a zone inside global memory... Saving data to temp buffer !");
smpi_switch_data_segment(((smpi_process_data_t)SIMIX_process_get_data(comm->comm.src_proc))->index);
){
XBT_DEBUG("Privatization : We are copying from a zone inside global memory... Saving data to temp buffer !");
smpi_switch_data_segment(((smpi_process_data_t)SIMIX_process_get_data(comm->comm.src_proc))->index);
- && ((char*)comm->comm.dst_buff >= start_data_exe)
- && ((char*)comm->comm.dst_buff < start_data_exe + size_data_exe )
+ && ((char*)comm->comm.dst_buff >= smpi_start_data_exe)
+ && ((char*)comm->comm.dst_buff < smpi_start_data_exe + smpi_size_data_exe )
){
XBT_DEBUG("Privatization : We are copying to a zone inside global memory - Switch data segment");
smpi_switch_data_segment(((smpi_process_data_t)SIMIX_process_get_data(comm->comm.dst_proc))->index);
){
XBT_DEBUG("Privatization : We are copying to a zone inside global memory - Switch data segment");
smpi_switch_data_segment(((smpi_process_data_t)SIMIX_process_get_data(comm->comm.dst_proc))->index);
process_data = xbt_new0(smpi_process_data_t, process_count);
for (i = 0; i < process_count; i++) {
process_data[i] = xbt_new(s_smpi_process_data_t, 1);
process_data = xbt_new0(smpi_process_data_t, process_count);
for (i = 0; i < process_count; i++) {
process_data[i] = xbt_new(s_smpi_process_data_t, 1);
if(smpirun){
group = smpi_group_new(process_count);
MPI_COMM_WORLD = smpi_comm_new(group, NULL);
if(smpirun){
group = smpi_group_new(process_count);
MPI_COMM_WORLD = smpi_comm_new(group, NULL);
for (i = 0; i < process_count; i++) {
smpi_group_set_mapping(group, i, i);
process_data[i]->finalization_barrier = bar;
for (i = 0; i < process_count; i++) {
smpi_group_set_mapping(group, i, i);
process_data[i]->finalization_barrier = bar;
TRACE_add_end_function(TRACE_smpi_release);
SIMIX_global_init(&argc, argv);
TRACE_add_end_function(TRACE_smpi_release);
SIMIX_global_init(&argc, argv);
xbt_os_walltimer_stop(global_timer);
if (sg_cfg_get_boolean("smpi/display_timing")){
double global_time = xbt_os_timer_elapsed(global_timer);
xbt_os_walltimer_stop(global_timer);
if (sg_cfg_get_boolean("smpi/display_timing")){
double global_time = xbt_os_timer_elapsed(global_timer);
"The simulation took %g seconds (after parsing and platform setup)\n"
"%g seconds were actual computation of the application"
, SIMIX_get_clock(), global_time , smpi_total_benched_time);
"The simulation took %g seconds (after parsing and platform setup)\n"
"%g seconds were actual computation of the application"
, SIMIX_get_clock(), global_time , smpi_total_benched_time);