- unsigned int cursor = 0, send_index = 0, recv_index = 0;
- mc_comm_pattern_t comm1, comm2;
- unsigned int current_process = 1; /* Process 0 corresponds to maestro */
- unsigned int nb_comms1, nb_comms2;
- xbt_dynar_t process_comms_pattern1, process_comms_pattern2;
-
- while (current_process < simix_process_maxpid) {
- process_comms_pattern1 = (xbt_dynar_t)xbt_dynar_get_as(initial_communications_pattern, current_process, xbt_dynar_t);
- process_comms_pattern2 = (xbt_dynar_t)xbt_dynar_get_as(pattern, current_process, xbt_dynar_t);
- nb_comms1 = xbt_dynar_length(process_comms_pattern1);
- nb_comms2 = xbt_dynar_length(process_comms_pattern2);
- if(!xbt_dynar_is_empty((xbt_dynar_t)xbt_dynar_get_as(incomplete_communications_pattern, current_process, xbt_dynar_t)))
- xbt_die("Damn ! Some communications from the process %u are incomplete (%lu)! That means one or several simcalls are not handle.", current_process, xbt_dynar_length((xbt_dynar_t)xbt_dynar_get_as(incomplete_communications_pattern, current_process, xbt_dynar_t)));
- if (!partial && (nb_comms1 != nb_comms2)) {
- XBT_INFO("The total number of communications is different between the compared patterns for the process %u.\n Communication determinism verification for this process cannot be performed.", current_process);
- initial_global_state->send_deterministic = -1;
- initial_global_state->comm_deterministic = -1;
- } else {
- while (cursor < nb_comms2) {
- comm1 = (mc_comm_pattern_t)xbt_dynar_get_as(process_comms_pattern1, cursor, mc_comm_pattern_t);
- if (comm1->type == SIMIX_COMM_SEND && comm1->src_proc == current_process) {
- comm2 = get_comm_pattern_from_idx(process_comms_pattern2, &send_index, comm1->type, current_process);
- if (compare_comm_pattern(comm1, comm2)) {
- XBT_INFO("The communications pattern of the process %u is different!", current_process);
- initial_global_state->send_deterministic = 0;
- initial_global_state->comm_deterministic = 0;
- return;
- }
- send_index++;
- } else if (comm1->type == SIMIX_COMM_RECEIVE && comm1->dst_proc == current_process) {
- comm2 = get_comm_pattern_from_idx(process_comms_pattern2, &recv_index, comm1->type, current_process);
- if (compare_comm_pattern(comm1, comm2)) {
- initial_global_state->comm_deterministic = 0;
- if (!_sg_mc_send_determinism){
- XBT_INFO("The communications pattern of the process %u is different!", current_process);
- return;
- }
- }
- recv_index++;
- }
- cursor++;
- }
- }
- current_process++;
- cursor = 0;
- send_index = 0;
- recv_index = 0;
+ if(comm->type == SIMIX_COMM_SEND)
+ type = bprintf("The send communications pattern of the process %d is different!", process - 1);
+ else
+ type = bprintf("The recv communications pattern of the process %d is different!", process - 1);
+
+ switch(diff) {
+ case TYPE_DIFF:
+ res = bprintf("%s Different type for communication #%d", type, cursor);
+ break;
+ case RDV_DIFF:
+ res = bprintf("%s Different rdv for communication #%d", type, cursor);
+ break;
+ case TAG_DIFF:
+ res = bprintf("%s Different tag for communication #%d", type, cursor);
+ break;
+ case SRC_PROC_DIFF:
+ res = bprintf("%s Different source for communication #%d", type, cursor);
+ break;
+ case DST_PROC_DIFF:
+ res = bprintf("%s Different destination for communication #%d", type, cursor);
+ break;
+ case DATA_SIZE_DIFF:
+ res = bprintf("%s\n Different data size for communication #%d", type, cursor);
+ break;
+ case DATA_DIFF:
+ res = bprintf("%s\n Different data for communication #%d", type, cursor);
+ break;
+ default:
+ res = NULL;
+ break;