endTime = Msg.getClock();
Msg.info(" - End of Migration from host 1 to host 0 (duration:"+(endTime-startTime)+")");
+
Msg.info("\n \n \nRound trip of VM1 (load "+load2+"%)");
vm1.setLoad(load2);
Msg.info(" - Launch migration from host 0 to host 1");
case MSG_HOST_FAILURE:
jxbt_throw_host_failure(env,NULL);
break;
+ case MSG_TASK_CANCELED:
+ jxbt_throw_task_cancelled(env,NULL);
+ break;
default:
- jxbt_throw_native(env,xbt_strdup("communication failed"));
+ jxbt_throw_native(env,xbt_strdup("undefined message failed (please see jmsg_throw_status function in jmsg.c)"));
}
}
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Host_off(JNIEnv *env, jobject jhost) {
msg_host_t host = jhost_get_native(env, jhost);
- MSG_host_off(host);
+ MSG_host_off(host);
}
JNIEXPORT jint JNICALL
System.exit(1);
}
catch(ProcessKilledError pk) {
-
- }
+ }
exit();
}
if (context->iwannadie) {
context->iwannadie = 0;
JNIEnv *env = get_current_thread_env();
+ XBT_DEBUG("Gonnal launch Killed Error");
jxbt_throw_by_name(env, "org/simgrid/msg/ProcessKilledError", xbt_strdup("Process killed :)"));
- THROWF(cancel_error, 0, "process cancelled");
+ // TODO emptty/adsein, comment the following line. This avoid to raise process cancelled exception at the Java level but
+ // it impacts the shutdown of VMs :( see java-cloud example
+ //THROWF(cancel_error, 0, "process cancelled");
} else {
smx_ctx_base_stop(context);
/* detach the thread and kills it */
}
- /* deinstall the current affinity setting */
+ /* deinstall the current affinity setting for the CPU */
simcall_vm_set_affinity(ms->vm, ms->src_pm, 0);
+ /* Update the vm location */
simcall_vm_migrate(ms->vm, ms->dst_pm);
+
+ /* Resume the VM */
simcall_vm_resume(ms->vm);
/* install the affinity setting of the VM on the destination pm */