Commit b82824c0 authored by Neil McGlohon's avatar Neil McGlohon

Fixup: move mapping context switch statement to correct scope

parent 66c3a27a
...@@ -2937,54 +2937,54 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv ) ...@@ -2937,54 +2937,54 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
} }
if(enable_msg_tracking) if(enable_msg_tracking)
{ {
char log_name[512]; char log_name[512];
sprintf(log_name, "%s/mpi-msg-sz-logs-%s-syn-sz-%d-mean-%f-%d", sprintf(log_name, "%s/mpi-msg-sz-logs-%s-syn-sz-%d-mean-%f-%d",
mpi_msg_dir, mpi_msg_dir,
file_name_of_job[0], file_name_of_job[0],
payload_sz, payload_sz,
mean_interval, mean_interval,
rand()); rand());
msg_size_log = fopen(log_name, "w+"); msg_size_log = fopen(log_name, "w+");
if(!msg_size_log) if(!msg_size_log)
{ {
printf("\n Error logging MPI operations... quitting "); printf("\n Error logging MPI operations... quitting ");
MPI_Finalize(); MPI_Finalize();
return -1; return -1;
} }
char agg_log_name[512]; char agg_log_name[512];
sprintf(agg_log_name, "%s/mpi-aggregate-logs-%d.bin", sampling_dir, rank); sprintf(agg_log_name, "%s/mpi-aggregate-logs-%d.bin", sampling_dir, rank);
workload_agg_log = fopen(agg_log_name, "w+"); workload_agg_log = fopen(agg_log_name, "w+");
workload_meta_log = fopen("mpi-workload-meta-log", "w+"); workload_meta_log = fopen("mpi-workload-meta-log", "w+");
switch(map_ctxt) if(!workload_agg_log || !workload_meta_log)
{ {
case GROUP_RATIO: printf("\n Error logging MPI operations... quitting ");
MPI_Finalize();
return -1;
}
}
switch(map_ctxt)
{
case GROUP_RATIO:
mapping_context = codes_mctx_set_group_ratio(NULL, true); mapping_context = codes_mctx_set_group_ratio(NULL, true);
break; break;
case GROUP_RATIO_REVERSE: case GROUP_RATIO_REVERSE:
mapping_context = codes_mctx_set_group_ratio_reverse(NULL, true); mapping_context = codes_mctx_set_group_ratio_reverse(NULL, true);
break; break;
case GROUP_DIRECT: case GROUP_DIRECT:
mapping_context = codes_mctx_set_group_direct(1,NULL, true); mapping_context = codes_mctx_set_group_direct(1,NULL, true);
break; break;
case GROUP_MODULO: case GROUP_MODULO:
mapping_context = codes_mctx_set_group_modulo(NULL, true); mapping_context = codes_mctx_set_group_modulo(NULL, true);
break; break;
case GROUP_MODULO_REVERSE: case GROUP_MODULO_REVERSE:
mapping_context = codes_mctx_set_group_modulo_reverse(NULL, true); mapping_context = codes_mctx_set_group_modulo_reverse(NULL, true);
break; break;
} }
if(!workload_agg_log || !workload_meta_log)
{
printf("\n Error logging MPI operations... quitting ");
MPI_Finalize();
return -1;
}
}
if(enable_sampling) if(enable_sampling)
model_net_enable_sampling(sampling_interval, sampling_end_time); model_net_enable_sampling(sampling_interval, sampling_end_time);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment