- smx_req_t req = SIMIX_req_mine();
-
- req->call = REQ_HOST_PARALLEL_EXECUTE;
- req->host_parallel_execute.name = name;
- req->host_parallel_execute.host_nb = host_nb;
- req->host_parallel_execute.host_list = host_list;
- req->host_parallel_execute.computation_amount = computation_amount;
- req->host_parallel_execute.communication_amount = communication_amount;
- req->host_parallel_execute.amount = amount;
- req->host_parallel_execute.rate = rate;
- SIMIX_request_push();
- return req->host_parallel_execute.result;
+ int i,j;
+ /* checking for infinite values */
+ for (i = 0 ; i < host_nb ; ++i) {
+ xbt_assert(isfinite(computation_amount[i]), "computation_amount[%d] is not finite!", i);
+ for (j = 0 ; j < host_nb ; ++j) {
+ xbt_assert(isfinite(communication_amount[i + host_nb * j]),
+ "communication_amount[%d+%d*%d] is not finite!", i, host_nb, j);
+ }
+ }
+
+ xbt_assert(isfinite(amount), "amount is not finite!");
+ xbt_assert(isfinite(rate), "rate is not finite!");
+
+ smx_simcall_t simcall = SIMIX_simcall_mine();
+
+ simcall->call = SIMCALL_HOST_PARALLEL_EXECUTE;
+ simcall->host_parallel_execute.name = name;
+ simcall->host_parallel_execute.host_nb = host_nb;
+ simcall->host_parallel_execute.host_list = host_list;
+ simcall->host_parallel_execute.computation_amount = computation_amount;
+ simcall->host_parallel_execute.communication_amount = communication_amount;
+ simcall->host_parallel_execute.amount = amount;
+ simcall->host_parallel_execute.rate = rate;
+ if(MC_is_active()) /* Initialize result to NULL for snapshot comparison done during simcall */
+ simcall->host_parallel_execute.result = NULL;
+ SIMIX_simcall_push(simcall->issuer);
+ return simcall->host_parallel_execute.result;