<b>cluster example</b>
\verbatim
-<cluster id="my_cluster_1" prefix="" suffix=""
- radical="0-262144" power="1000000000" bw="125000000" lat="5E-5"/>
-<cluster id="my_cluster_1" prefix="c-" suffix=".me"
- radical="0-99" power="1000000000" bw="125000000" lat="5E-5"
- bb_bw="2250000000" bb_lat="5E-4"/>
+<cluster id="my_cluster_1" prefix="" suffix="" radical="0-262144"
+ power="1e9" bw="125e6" lat="5E-5"/>
+
+<cluster id="my_cluster_1" prefix="c-" suffix=".me" radical="0-99"
+ power="1e9" bw="125e6" lat="5E-5"
+ bb_bw="2.25e9" bb_lat="5E-4"/>
\endverbatim
-The second examples creates 100 machines, which names are the following:
+The second examples creates one router and 100 machines, which names
+are the following:
\verbatim
+c-my_cluster_1_router.me
c-0.my_cluster_1.me
c-1.my_cluster_1.me
c-2.my_cluster_1.me
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_sleep(JNIEnv *env, jclass cls, jlong jmillis, jint jnanos)
{
- double time = jmillis / 1000 + jnanos / 1000;
+ double time = ((double)jmillis) / 1000 + ((double)jnanos) / 1000000000;
msg_error_t rv;
rv = MSG_process_sleep(time);
if (rv != MSG_OK) {
}
}
+JNIEXPORT void JNICALL
+Java_org_simgrid_msg_Task_setBound(JNIEnv * env, jobject jtask, jdouble load)
+{
+ msg_task_t task = jtask_to_native_task(jtask, env);
+
+ if (!task) {
+ jxbt_throw_notbound(env, "task", jtask);
+ return;
+ }
+ MSG_task_set_bound(task, load);
+}
+
JNIEXPORT jstring JNICALL
Java_org_simgrid_msg_Task_getName(JNIEnv * env,
jobject jtask) {
* @throws TaskCancelledException
*/
public native void execute() throws HostFailureException,TaskCancelledException;
+ /**
+ * Bound a computation to a certain load
+ *
+ */
+ public native void setBound(double load);
/**
* Cancels a task.
*
/* JNI / Native code */
+
/* get/set property methods are inherited from the Host class. */
/** Returns whether the given VM is currently suspended
*/
public void migrate(Host destination){
this.internalmig(destination);
+ this.currentHost = destination;
}
/** Immediately suspend the execution of all processes within the given VM