XML file version remains 4.2 since old files are still compatible.
Fixed bugs:
+ - #132: Java : a process can not shut down its own host
- #261: Document the parameters of parallel execution's constructor
- #300: [s4u] BarrierPtr is missing
- #314: SMPI args internal cleanup
#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/Storage.hpp"
+#include "JavaContext.hpp"
#include "jmsg.hpp"
#include "jmsg_host.h"
#include "jmsg_storage.h"
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);
+ if (not simgrid::kernel::context::StopRequest::try_n_catch([host]() { MSG_host_off(host); }))
+ jxbt_throw_host_failure(env, "");
}
JNIEXPORT jint JNICALL Java_org_simgrid_msg_Host_getCount(JNIEnv * env, jclass cls) {
}
return MSG_host_get_avg_load(host);
-}
\ No newline at end of file
+}
/** Starts the host if it is off */
public native void on();
/** Stops the host if it is on */
- public native void off();
+ public native void off() throws HostFailureException;
/**
* This method returns the speed of the processor of a host (in flops),