ChangeLog for SimGrid-java, before its integration into the main source tree.
+SimGrid (3.13) UNRELEASED; urgency=low
+
+ Backwards Compatibility breaks
+ - VM.setBound(int load) is now VM.setBound(double bound) to meet the MSG semantics. Use VM.getSpeed()*load/100 for the legacy behavior.
+
+
SimGrid-java (3.9) stable; urgency=low
-- 2013-01-30 Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
public void setLoad(int load){
if (load >0) {
- this.setBound(load);
+ this.setBound(this.getSpeed()*load/100);
// this.getDaemon().setLoad(load);
daemon.resume();
} else{
}
JNIEXPORT void JNICALL
-Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jint load) {
+Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jdouble bound) {
msg_vm_t vm = jvm_get_native(env,jvm);
- double bound = MSG_get_host_speed(vm) * load / 100;
- MSG_vm_set_bound(vm, bound);
+ MSG_vm_set_bound(vm, bound);
}
JNIEXPORT void JNICALL
* Signature (D)B
*/
JNIEXPORT void JNICALL
-Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jint load);
+Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jdouble bound);
/**
* Class org_simgrid_msg_VM
/**
- * Bound the VM to a certain % of its vcpu capability (e.g. 75% of vm.getSpeed())
- * @param load percentage (between [0,100]
+ * Set a CPU bound for a given VM.
+ * @param bound in flops/s
*/
- public native void setBound(int load);
+ public native void setBound(double bound);
/**
* start the VM