Algorithmique Numérique Distribuée Public GIT Repository
 author Martin Quinson Sat, 6 Feb 2016 09:22:20 +0000 (10:22 +0100) committer Martin Quinson Sat, 6 Feb 2016 09:22:20 +0000 (10:22 +0100)
167 files changed:

index 2d44af8..c5d7877 100644 (file)
@@ -70,13 +70,13 @@ int master(int argc, char *argv[])

for (i = 0; i < workers_count; i++)
if(host_self == workers[i]) {

for (i = 0; i < workers_count; i++)
if(host_self == workers[i]) {
-       workers[i] = workers[workers_count-1];
-       workers_count--;
-       break;
+  workers[i] = workers[workers_count-1];
+  workers_count--;
+  break;
}

for (i = 0; i < workers_count; i++)
}

for (i = 0; i < workers_count; i++)
-       MSG_process_create("worker", worker, master_name, workers[i]);
+  MSG_process_create("worker", worker, master_name, workers[i]);
}

XBT_INFO("Got %d workers and %d tasks to process", workers_count,
}

XBT_INFO("Got %d workers and %d tasks to process", workers_count,
@@ -84,7 +84,7 @@ int master(int argc, char *argv[])

for (i = 0; i < number_of_tasks; i++) {
build_channel_name(channel,master_name,

for (i = 0; i < number_of_tasks; i++) {
build_channel_name(channel,master_name,
-                      MSG_host_get_name(workers[i % workers_count]));
+           MSG_host_get_name(workers[i % workers_count]));

XBT_INFO("Sending \"%s\" to channel \"%s\"", todo[i]->name, channel);

XBT_INFO("Sending \"%s\" to channel \"%s\"", todo[i]->name, channel);

@@ -97,7 +97,7 @@ int master(int argc, char *argv[])
for (i = 0; i < workers_count; i++) {
for (i = 0; i < workers_count; i++) {
-                   MSG_host_get_name(workers[i % workers_count])));
+        MSG_host_get_name(workers[i % workers_count])));
}

XBT_INFO("Goodbye now!");
}

XBT_INFO("Goodbye now!");
@@ -114,7 +114,7 @@ int worker(int argc, char *argv[])
char channel[1024];

build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
char channel[1024];

build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
-                    MSG_host_get_name(MSG_host_self()));
+         MSG_host_get_name(MSG_host_self()));

XBT_INFO("Receiving on channel \"%s\"", channel);

XBT_INFO("Receiving on channel \"%s\"", channel);

index 4ac7469..e3c2826 100644 (file)
@@ -57,17 +57,17 @@ int master(int argc, char *argv[])

for (i = 0; i < workers_count; i++)
if(host_self == workers[i]) {

for (i = 0; i < workers_count; i++)
if(host_self == workers[i]) {
-       workers[i] = workers[workers_count-1];
-       workers_count--;
-       break;
+  workers[i] = workers[workers_count-1];
+  workers_count--;
+  break;
}

for (i = 0; i < workers_count; i++)
}

for (i = 0; i < workers_count; i++)
-       MSG_process_create("worker", worker, master_name, workers[i]);
+  MSG_process_create("worker", worker, master_name, workers[i]);
}

XBT_INFO("Got %d workers and will send tasks for %g seconds!",
}

XBT_INFO("Got %d workers and will send tasks for %g seconds!",
-          workers_count, timeout);
+     workers_count, timeout);

for (i = 0; 1; i++) {
char sprintf_buffer[64];

for (i = 0; 1; i++) {
char sprintf_buffer[64];
@@ -77,10 +77,10 @@ int master(int argc, char *argv[])

-                          NULL);
+         NULL);

build_channel_name(channel,master_name,

build_channel_name(channel,master_name,
-                      MSG_host_get_name(workers[i % workers_count]));
+           MSG_host_get_name(workers[i % workers_count]));

XBT_DEBUG("Sending \"%s\" to channel \"%s\"", task->name, channel);

XBT_DEBUG("Sending \"%s\" to channel \"%s\"", task->name, channel);
@@ -94,7 +94,7 @@ int master(int argc, char *argv[])
for (i = 0; i < workers_count; i++) {
for (i = 0; i < workers_count; i++) {
-                   MSG_host_get_name(workers[i % workers_count])));
+        MSG_host_get_name(workers[i % workers_count])));
}

}

@@ -111,7 +111,7 @@ int worker(int argc, char *argv[])
char channel[1024];

build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
char channel[1024];

build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
-                    MSG_host_get_name(MSG_host_self()));
+         MSG_host_get_name(MSG_host_self()));

XBT_DEBUG("Receiving on channel \"%s\"", channel);

XBT_DEBUG("Receiving on channel \"%s\"", channel);

index 75f351d..e5e9726 100644 (file)
@@ -59,17 +59,17 @@ int master(int argc, char *argv[])

for (i = 0; i < workers_count; i++)
if(host_self == workers[i]) {

for (i = 0; i < workers_count; i++)
if(host_self == workers[i]) {
-       workers[i] = workers[workers_count-1];
-       workers_count--;
-       break;
+  workers[i] = workers[workers_count-1];
+  workers_count--;
+  break;
}

for (i = 0; i < workers_count; i++)
}

for (i = 0; i < workers_count; i++)
-       MSG_process_create("worker", worker, master_name, workers[i]);
+  MSG_process_create("worker", worker, master_name, workers[i]);
}

XBT_INFO("Got %d workers and will send tasks for %g seconds!",
}

XBT_INFO("Got %d workers and will send tasks for %g seconds!",
-          workers_count, timeout);
+     workers_count, timeout);

for (i = 0; 1; i++) {
char sprintf_buffer[64];

for (i = 0; 1; i++) {
char sprintf_buffer[64];
@@ -79,11 +79,11 @@ int master(int argc, char *argv[])

-                          NULL);
+         NULL);

build_channel_name(channel,master_name,

build_channel_name(channel,master_name,
-                      MSG_host_get_name(workers[i % workers_count]));
+           MSG_host_get_name(workers[i % workers_count]));

XBT_DEBUG("Sending \"%s\" to channel \"%s\"", task->name, channel);

XBT_DEBUG("Sending \"%s\" to channel \"%s\"", task->name, channel);
@@ -97,7 +97,7 @@ int master(int argc, char *argv[])
for (i = 0; i < workers_count; i++) {
for (i = 0; i < workers_count; i++) {
-                   MSG_host_get_name(workers[i % workers_count])));
+        MSG_host_get_name(workers[i % workers_count])));
}

}

@@ -114,7 +114,7 @@ int worker(int argc, char *argv[])
char channel[1024];

build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
char channel[1024];

build_channel_name(channel,MSG_process_get_data(MSG_process_self()),
-                    MSG_host_get_name(MSG_host_self()));
+         MSG_host_get_name(MSG_host_self()));

XBT_DEBUG("Receiving on channel \"%s\"", channel);

XBT_DEBUG("Receiving on channel \"%s\"", channel);

index c50a067..029ceb9 100644 (file)
@@ -59,17 +59,17 @@ int master(int argc, char *argv[])

for (i = 0; i < workers_count; i++)
if(host_self == workers[i]) {

for (i = 0; i < workers_count; i++)
if(host_self == workers[i]) {
-       workers[i] = workers[workers_count-1];
-       workers_count--;
-       break;
+  workers[i] = workers[workers_count-1];
+  workers_count--;
+  break;
}

for (i = 0; i < workers_count; i++)
}

for (i = 0; i < workers_count; i++)
-       MSG_process_create("worker", worker, master_name, workers[i]);
+  MSG_process_create("worker", worker, master_name, workers[i]);
}

XBT_INFO("Got %d workers and will send tasks for %g seconds!",
}

XBT_INFO("Got %d workers and will send tasks for %g seconds!",
-          workers_count, timeout);
+     workers_count, timeout);
xbt_dynar_t idle_hosts = xbt_dynar_new(sizeof(msg_host_t), NULL);
msg_host_t request_host = NULL;

xbt_dynar_t idle_hosts = xbt_dynar_new(sizeof(msg_host_t), NULL);
msg_host_t request_host = NULL;

@@ -90,8 +90,8 @@ int master(int argc, char *argv[])
if(MSG_get_clock()>timeout) {
if(xbt_dynar_length(idle_hosts) == workers_count) break;
else {
if(MSG_get_clock()>timeout) {
if(xbt_dynar_length(idle_hosts) == workers_count) break;
else {
-       MSG_process_sleep(.1);
-       continue;
+  MSG_process_sleep(.1);
+  continue;
}
}

}
}

@@ -103,7 +103,7 @@ int master(int argc, char *argv[])

-                          NULL);
+         NULL);

xbt_dynar_shift(idle_hosts, &request_host);

xbt_dynar_shift(idle_hosts, &request_host);
@@ -123,7 +123,7 @@ int master(int argc, char *argv[])
for (i = 0; i < workers_count; i++) {
for (i = 0; i < workers_count; i++) {
-                   MSG_host_get_name(workers[i % workers_count])));
+        MSG_host_get_name(workers[i % workers_count])));
}

}

index e43c1d4..81ef04e 100644 (file)
@@ -482,17 +482,17 @@ int main(int argc, char *argv[])
MSG_action_init();

xbt_assert(argc > 2,
MSG_action_init();

xbt_assert(argc > 2,
-            "Usage: %s platform_file deployment_file [action_files]\n"
-            "\t# if all actions are in the same file\n"
-            "\tExample: %s msg_platform.xml msg_deployment.xml actions\n"
-            "\t# if actions are in separate files, specified in deployment\n"
-            "\tExample: %s msg_platform.xml msg_deployment.xml ",
-            argv[0],argv[0],argv[0]);
+       "Usage: %s platform_file deployment_file [action_files]\n"
+       "\t# if all actions are in the same file\n"
+       "\tExample: %s msg_platform.xml msg_deployment.xml actions\n"
+       "\t# if actions are in separate files, specified in deployment\n"
+       "\tExample: %s msg_platform.xml msg_deployment.xml ",
+       argv[0],argv[0],argv[0]);

printf("WARNING: THIS BINARY IS KINDA DEPRECATED\n"

printf("WARNING: THIS BINARY IS KINDA DEPRECATED\n"
-        "This example is still relevant if you want to learn about MSG-based trace replay, "
-        "but if you want to simulate MPI-like traces, you should use the newer version "
-        "that is in the examples/smpi/replay directory instead.\n");
+   "This example is still relevant if you want to learn about MSG-based trace replay, "
+   "but if you want to simulate MPI-like traces, you should use the newer version "
+   "that is in the examples/smpi/replay directory instead.\n");

/*  Simulation setting */
MSG_create_environment(argv[1]);

/*  Simulation setting */
MSG_create_environment(argv[1]);
index 17758e4..aa1ef5b 100644 (file)
@@ -58,7 +58,7 @@ static void action_open(const char *const *action) {
double clock = MSG_get_clock();       /* this "call" is free thanks to inlining */

sprintf(full_name, "%s:%s", MSG_process_get_name(MSG_process_self()),
double clock = MSG_get_clock();       /* this "call" is free thanks to inlining */

sprintf(full_name, "%s:%s", MSG_process_get_name(MSG_process_self()),
-         file_name);
+    file_name);

ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
file = MSG_file_open(file_name, NULL);

ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
file = MSG_file_open(file_name, NULL);
index 21c6a8c..8de01ef 100644 (file)
@@ -714,19 +714,19 @@ static int remote_find_successor(node_t node, int ask_to, int id)

-       // Once upon a time, our code assumed that here, task_received != task_sent all the time
-       //
-       // This assumption is wrong (as messages from differing round can interleave), leading to a bug in our code.
-       // We failed to find this bug directly, as it only occured on large platforms, leading to hardly usable traces.
-       // Instead, we used the model-checker to track down the issue by adding the following test here in the code:
-       //   if (MC_is_active()) {
+  // Once upon a time, our code assumed that here, task_received != task_sent all the time
+  //
+  // This assumption is wrong (as messages from differing round can interleave), leading to a bug in our code.
+  // We failed to find this bug directly, as it only occured on large platforms, leading to hardly usable traces.
+  // Instead, we used the model-checker to track down the issue by adding the following test here in the code:
+  //   if (MC_is_active()) {
//   }
//   }
-       // That explained the bug in a snap, with a very cool example and everything.
-       //
-       // This MC_assert is now desactivated as the case is now properly handled in our code and we don't want the
-       //   MC to fail any further under that condition, but this comment is here to as a memorial for this first
-       //   brillant victory of the model-checking in the SimGrid community :)
+  // That explained the bug in a snap, with a very cool example and everything.
+  //
+  // This MC_assert is now desactivated as the case is now properly handled in our code and we don't want the
+  //   MC to fail any further under that condition, but this comment is here to as a memorial for this first
+  //   brillant victory of the model-checking in the SimGrid community :)

@@ -1027,9 +1027,9 @@ int main(int argc, char *argv[])
{
MSG_init(&argc, argv);
xbt_assert(argc > 2,
{
MSG_init(&argc, argv);
xbt_assert(argc > 2,
-            "Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n"
-            "\tExample: %s ../msg_platform.xml chord.xml\n",
-            argv[0], argv[0]);
+       "Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n"
+       "\tExample: %s ../msg_platform.xml chord.xml\n",
+       argv[0], argv[0]);

char **options = &argv[1];
while (!strncmp(options[0], "-", 1)) {

char **options = &argv[1];
while (!strncmp(options[0], "-", 1)) {
index 853400b..3eaed07 100644 (file)
@@ -23,8 +23,8 @@ static void vm_migrate(msg_vm_t vm, msg_host_t dst_pm)
double mig_end = MSG_get_clock();

XBT_INFO("%s migrated: %s->%s in %g s", MSG_vm_get_name(vm),
double mig_end = MSG_get_clock();

XBT_INFO("%s migrated: %s->%s in %g s", MSG_vm_get_name(vm),
-                 MSG_host_get_name(src_pm), MSG_host_get_name(dst_pm),
-                 mig_end - mig_sta);
+      MSG_host_get_name(src_pm), MSG_host_get_name(dst_pm),
+      mig_end - mig_sta);
}

static int migration_worker_main(int argc, char *argv[])
}

static int migration_worker_main(int argc, char *argv[])
index ea56aba..c6bd09f 100644 (file)
@@ -29,9 +29,9 @@ static int worker_main(int argc, char *argv[])

-       double prev_computation_amount;
-       double prev_clock;
+  double prev_computation_amount;
+  double prev_clock;
};

};

index 338b75f..1c45b8c 100644 (file)
@@ -24,14 +24,14 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
**/

static double time_precise(void) {
**/

static double time_precise(void) {
-       struct timeval tv;
-       int ret = gettimeofday(&tv, NULL);
+  struct timeval tv;
+  int ret = gettimeofday(&tv, NULL);
if (ret < 0)
xbt_die("gettimeofday");

if (ret < 0)
xbt_die("gettimeofday");

-       double now = (double) tv.tv_sec + tv.tv_usec * 0.001 * 0.001;
+  double now = (double) tv.tv_sec + tv.tv_usec * 0.001 * 0.001;

-       return now;
+  return now;
}

static int computation_fun(int argc, char *argv[]) {
}

static int computation_fun(int argc, char *argv[]) {
@@ -67,33 +67,33 @@ static int master_main(int argc, char *argv[])

int i = 0;
for (i = 0; i < npm; i++) {

int i = 0;
for (i = 0; i < npm; i++) {
-         pm[i] = xbt_dynar_get_as(hosts_dynar, i, msg_host_t);
+    pm[i] = xbt_dynar_get_as(hosts_dynar, i, msg_host_t);
}

for (i = 0; i < nvm; i++) {
}

for (i = 0; i < nvm; i++) {
-         int pm_index = i % npm;
-         char *vm_name = bprintf("vm%d", i);
-         vm[i] = MSG_vm_create_core(pm[pm_index], vm_name);
-         MSG_vm_start(vm[i]);
+    int pm_index = i % npm;
+    char *vm_name = bprintf("vm%d", i);
+    vm[i] = MSG_vm_create_core(pm[pm_index], vm_name);
+    MSG_vm_start(vm[i]);

launch_computation_worker(vm[i]);

launch_computation_worker(vm[i]);

-         xbt_free(vm_name);
+    xbt_free(vm_name);
}

XBT_INFO("## Test (start)");

for (i = 0; i < 10; i++) {
}

XBT_INFO("## Test (start)");

for (i = 0; i < 10; i++) {
-         double clock_sta = time_precise();
-         MSG_process_sleep(1);
-         double clock_end = time_precise();
-         XBT_INFO("duration %f", clock_end - clock_sta);
+    double clock_sta = time_precise();
+    MSG_process_sleep(1);
+    double clock_end = time_precise();
+    XBT_INFO("duration %f", clock_end - clock_sta);
}

for (i = 0; i < nvm; i++) {
}

for (i = 0; i < nvm; i++) {
-         MSG_vm_destroy(vm[i]);
+    MSG_vm_destroy(vm[i]);
}

XBT_INFO("## Test (ended)");
}

XBT_INFO("## Test (ended)");
index 6a0dd2c..d2e8263 100644 (file)
@@ -70,9 +70,9 @@ static int master_main(int argc, char *argv[])
launch_computation_worker(vm0);

while(MSG_get_clock()<100) {
launch_computation_worker(vm0);

while(MSG_get_clock()<100) {
-       MSG_process_sleep(1);
+  MSG_process_sleep(1);
}

MSG_process_sleep(10000);
}

MSG_process_sleep(10000);
index f919a12..092515d 100644 (file)
@@ -28,16 +28,16 @@ int dvfs(int argc, char *argv[])

XBT_INFO("Energetic profile: %s",

XBT_INFO("Energetic profile: %s",
-                 MSG_host_get_property_value(host,"watt_per_state"));
+      MSG_host_get_property_value(host,"watt_per_state"));
XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J",
XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J",
-                 MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));
+      MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));

double start = MSG_get_clock();
XBT_INFO("Sleep for 10 seconds");
MSG_process_sleep(10);
XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E; Energy dissipated=%.2f J",

double start = MSG_get_clock();
XBT_INFO("Sleep for 10 seconds");
MSG_process_sleep(10);
XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E; Energy dissipated=%.2f J",
-                 MSG_get_clock()-start,
-                 MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));
+      MSG_get_clock()-start,
+      MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));

start = MSG_get_clock();

start = MSG_get_clock();
@@ -46,18 +46,18 @@ int dvfs(int argc, char *argv[])
XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Current consumption: from %.0fW to %.0fW depending on load; Energy dissipated=%.0f J",
XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Current consumption: from %.0fW to %.0fW depending on load; Energy dissipated=%.0f J",
-                 MSG_get_clock()-start,
-                 MSG_host_get_current_power_peak(host), sg_host_get_wattmin_at(host,MSG_host_get_pstate(host)),
-                 sg_host_get_wattmax_at(host,MSG_host_get_pstate(host)),
-                 sg_host_get_consumed_energy(host));
+      MSG_get_clock()-start,
+      MSG_host_get_current_power_peak(host), sg_host_get_wattmin_at(host,MSG_host_get_pstate(host)),
+      sg_host_get_wattmax_at(host,MSG_host_get_pstate(host)),
+      sg_host_get_consumed_energy(host));

// ========= Change power peak =========
int pstate=2;
MSG_host_set_pstate(host, pstate);
XBT_INFO("========= Requesting pstate %d (speed should be of %.0E flop/s and is of %.0E flop/s)",

// ========= Change power peak =========
int pstate=2;
MSG_host_set_pstate(host, pstate);
XBT_INFO("========= Requesting pstate %d (speed should be of %.0E flop/s and is of %.0E flop/s)",
-                 pstate,
-                 MSG_host_get_power_peak_at(host, pstate),
-                 MSG_host_get_current_power_peak(host));
+      pstate,
+      MSG_host_get_power_peak_at(host, pstate),
+      MSG_host_get_current_power_peak(host));

start = MSG_get_clock();

start = MSG_get_clock();
@@ -66,25 +66,25 @@ int dvfs(int argc, char *argv[])
XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-                 MSG_get_clock()-start,
-                 MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));
+      MSG_get_clock()-start,
+      MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));

start = MSG_get_clock();
XBT_INFO("Sleep for 4 seconds");
MSG_process_sleep(4);
XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",

start = MSG_get_clock();
XBT_INFO("Sleep for 4 seconds");
MSG_process_sleep(4);
XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-                 MSG_get_clock()-start,
-                 MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));
+      MSG_get_clock()-start,
+      MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));

// =========== Turn the other host off ==========
XBT_INFO("Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 dissipated %.0f J so far.",

// =========== Turn the other host off ==========
XBT_INFO("Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 dissipated %.0f J so far.",
-                 sg_host_get_consumed_energy(MSG_host_by_name("MyHost2")) );
+      sg_host_get_consumed_energy(MSG_host_by_name("MyHost2")) );
MSG_host_off(MSG_host_by_name("MyHost2"));
start = MSG_get_clock();
MSG_process_sleep(10);
XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
MSG_host_off(MSG_host_by_name("MyHost2"));
start = MSG_get_clock();
MSG_process_sleep(10);
XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-                 MSG_get_clock()-start,
-                 MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));
+      MSG_get_clock()-start,
+      MSG_host_get_current_power_peak(host), sg_host_get_consumed_energy(host));
return 0;
}

return 0;
}

@@ -95,8 +95,8 @@ int main(int argc, char *argv[])
MSG_init(&argc, argv);

xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
MSG_init(&argc, argv);

xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+            argv[0], argv[0]);

MSG_create_environment(argv[1]);

MSG_create_environment(argv[1]);

index f06d512..4f0b927 100644 (file)
@@ -15,7 +15,7 @@
#include "xbt/asserts.h"

XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
#include "xbt/asserts.h"

XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
-                            "Messages specific for this msg example");
+           "Messages specific for this msg example");

static void simulate_bootup(msg_host_t host) {

static void simulate_bootup(msg_host_t host) {

@@ -68,27 +68,27 @@ static int onoff(int argc, char *argv[]) {
msg_host_t host1 = MSG_host_by_name("MyHost1");

XBT_INFO("Energetic profile: %s",
msg_host_t host1 = MSG_host_by_name("MyHost1");

XBT_INFO("Energetic profile: %s",
-          MSG_host_get_property_value(host1,"watt_per_state"));
+     MSG_host_get_property_value(host1,"watt_per_state"));
XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J",
XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J",
-          MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));
+     MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));

XBT_INFO("Sleep for 10 seconds");
MSG_process_sleep(10);
XBT_INFO("Done sleeping. Current peak speed=%.0E; Energy dissipated=%.2f J",

XBT_INFO("Sleep for 10 seconds");
MSG_process_sleep(10);
XBT_INFO("Done sleeping. Current peak speed=%.0E; Energy dissipated=%.2f J",
-          MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));
+     MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));

simulate_shutdown(host1);
XBT_INFO("Host1 is now OFF. Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",

simulate_shutdown(host1);
XBT_INFO("Host1 is now OFF. Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-          MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));
+     MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));

XBT_INFO("Sleep for 10 seconds");
MSG_process_sleep(10);
XBT_INFO("Done sleeping. Current peak speed=%.0E; Energy dissipated=%.2f J",

XBT_INFO("Sleep for 10 seconds");
MSG_process_sleep(10);
XBT_INFO("Done sleeping. Current peak speed=%.0E; Energy dissipated=%.2f J",
-          MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));
+     MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));

simulate_bootup(host1);
XBT_INFO("Host1 is now ON again. Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",

simulate_bootup(host1);
XBT_INFO("Host1 is now ON again. Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-          MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));
+     MSG_host_get_current_power_peak(host1), sg_host_get_consumed_energy(host1));

return 0;

return 0;
@@ -101,8 +101,8 @@ int main(int argc, char *argv[])
MSG_init(&argc, argv);

xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
MSG_init(&argc, argv);

xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-            "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-            argv[0], argv[0]);
+       "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+       argv[0], argv[0]);

MSG_create_environment(argv[1]);

MSG_create_environment(argv[1]);

index 3e07790..cd37f4d 100644 (file)
*
* - <b>energy/e1/e1.c</b> Shows how a set of pstates can be defined
*
* - <b>energy/e1/e1.c</b> Shows how a set of pstates can be defined
- *             for a host and how the current pstate can be accessed/changed
- *             with @ref MSG_get_host_current_power_peak and @ref
- *             MSG_set_host_pstate.
- *             Make sure to read the platform XML file for details on how
- *             to declare the CPU capacity for each pstate.
+ *     for a host and how the current pstate can be accessed/changed
+ *     with @ref MSG_get_host_current_power_peak and @ref
+ *     MSG_set_host_pstate.
+ *     Make sure to read the platform XML file for details on how
+ *     to declare the CPU capacity for each pstate.
*
*/

*
*/

@@ -54,10 +54,10 @@ int dvfs(int argc, char *argv[])

// Change power peak
if ((new_peak_index >= nb) || (new_peak_index < 0))

// Change power peak
if ((new_peak_index >= nb) || (new_peak_index < 0))
-         {
-         XBT_INFO("Cannot set pstate %d, host supports only %d pstates", new_peak_index, nb);
-         return 0;
-         }
+    {
+    XBT_INFO("Cannot set pstate %d, host supports only %d pstates", new_peak_index, nb);
+    return 0;
+    }

double peak_at = MSG_host_get_power_peak_at(host, new_peak_index);
XBT_INFO("Changing power peak value to %f (at index %d)", peak_at, new_peak_index);

double peak_at = MSG_host_get_power_peak_at(host, new_peak_index);
XBT_INFO("Changing power peak value to %f (at index %d)", peak_at, new_peak_index);
@@ -93,8 +93,8 @@ int main(int argc, char *argv[])
MSG_init(&argc, argv);

xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
MSG_init(&argc, argv);

xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+            argv[0], argv[0]);

MSG_create_environment(argv[1]);

MSG_create_environment(argv[1]);

index 943cc6c..14a41d6 100644 (file)
@@ -68,8 +68,8 @@ int main(int argc, char *argv[])
MSG_init(&argc, argv);

xbt_assert(argc > 1, "Usage: %s platform_file\n"
MSG_init(&argc, argv);

xbt_assert(argc > 1, "Usage: %s platform_file\n"
-            "\tExample: %s msg_platform.xml\n",
-            argv[0], argv[0]);
+       "\tExample: %s msg_platform.xml\n",
+       argv[0], argv[0]);

MSG_create_environment(argv[1]);

MSG_create_environment(argv[1]);

index 7d8af4a..18d5c10 100644 (file)
@@ -22,7 +22,7 @@ static int victim(int argc, char *argv[]) {
msg_error_t res = MSG_OK;

XBT_INFO("Let's work.");
msg_error_t res = MSG_OK;

XBT_INFO("Let's work.");
-  TRY {
+  TRY {
if (res != MSG_OK) {
XBT_INFO("The MSG_task_execute caught the exception for me and returned %d)",res);
if (res != MSG_OK) {
XBT_INFO("The MSG_task_execute caught the exception for me and returned %d)",res);
@@ -115,8 +115,8 @@ int main(int argc, char *argv[]) {

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                argv[0], argv[0]);
+           "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+           argv[0], argv[0]);

MSG_function_register("terrorist", terrorist);
MSG_create_environment(argv[1]);

MSG_function_register("terrorist", terrorist);
MSG_create_environment(argv[1]);
index 839d4a7..a2bed8d 100644 (file)
@@ -194,8 +194,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s platform.xml deployment.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s platform.xml deployment.xml\n",
+            argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);

index d36b412..a94c91e 100644 (file)
@@ -172,8 +172,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                argv[0], argv[0]);
+           "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+           argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);

index ddd51ca..b5b4b5b 100644 (file)
@@ -128,8 +128,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                argv[0], argv[0]);
+           "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+           argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);

index 9952786..5ba1285 100644 (file)
@@ -474,8 +474,8 @@ int main(int argc, char *argv[])

/* Check the arguments */
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

/* Check the arguments */
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-            "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-            argv[0], argv[0]);
+       "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+       argv[0], argv[0]);

const char *platform_file = argv[1];
const char *deployment_file = argv[2];

const char *platform_file = argv[1];
const char *deployment_file = argv[2];
index 5e1be97..ecaafac 100644 (file)
@@ -90,8 +90,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 3, "Usage: %s platform_file number_of_jobs number_of_slaves\n"

MSG_init(&argc, argv);
xbt_assert(argc > 3, "Usage: %s platform_file number_of_jobs number_of_slaves\n"
-                 "\tExample: %s msg_platform.xml 10 5\n",
-                 argv[0], argv[0]);
+            "\tExample: %s msg_platform.xml 10 5\n",
+            argv[0], argv[0]);

MSG_function_register("master", master);
MSG_function_register("slave", slave);

MSG_function_register("master", master);
MSG_function_register("slave", slave);
index 8acbc13..2b1b372 100644 (file)
@@ -205,8 +205,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+            argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);

index 6e01b3b..8628584 100644 (file)
@@ -208,8 +208,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+            argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);

index 316516e..91e9914 100644 (file)
@@ -67,8 +67,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s msg_platform.xml msg_deployment_suspend.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s msg_platform.xml msg_deployment_suspend.xml\n",
+            argv[0], argv[0]);

test_all(argv[1], argv[2]);

test_all(argv[1], argv[2]);

index ed1a0a7..7737722 100644 (file)
@@ -103,8 +103,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+            argv[0], argv[0]);

platform_file = argv[1];
application_file = argv[2];

platform_file = argv[1];
application_file = argv[2];
index 8a6bd75..9a6bd21 100644 (file)
@@ -77,8 +77,8 @@ int main(int argc, char *argv[])
/* Argument checking */
MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
/* Argument checking */
MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s msg_platform.xml msg_deployment_suspend.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s msg_platform.xml msg_deployment_suspend.xml\n",
+            argv[0], argv[0]);

/* Simulation setting */
MSG_create_environment(argv[1]);

/* Simulation setting */
MSG_create_environment(argv[1]);
index 2338f16..fecc41c 100644 (file)
@@ -210,8 +210,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s platform.xml deployment.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s platform.xml deployment.xml\n",
+            argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);
index 51a5b23..7035cba 100644 (file)
@@ -96,7 +96,7 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 1, "Usage: %s platform_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 1, "Usage: %s platform_file\n"
-            "\tExample: %s msg_platform.xml", argv[0], argv[0]);
+       "\tExample: %s msg_platform.xml", argv[0], argv[0]);
res = test_all(argv[1]);

return res != MSG_OK;
res = test_all(argv[1]);

return res != MSG_OK;
index 245990e..7bf64aa 100644 (file)
@@ -159,8 +159,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-            "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-            argv[0], argv[0]);
+       "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+       argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);

index 131e8e7..bc85c04 100644 (file)
@@ -141,11 +141,11 @@ static int closest_in_namespace_set(node_t node, int dest) {
int i, dist;
for (i=0; i<NAMESPACE_SIZE; i++) {
if (node->namespace_set[i]!=-1) {
int i, dist;
for (i=0; i<NAMESPACE_SIZE; i++) {
if (node->namespace_set[i]!=-1) {
-       dist = abs(node->namespace_set[i] - dest);
-       if (dist<best_dist) {
-         best_dist = dist;
-          res = node->namespace_set[i];
-       }
+  dist = abs(node->namespace_set[i] - dest);
+  if (dist<best_dist) {
+    best_dist = dist;
+          res = node->namespace_set[i];
+  }
}
}
}
}
}
}
if (next!=node->id) {
get_mailbox(next, mailbox);
if (next!=node->id) {
get_mailbox(next, mailbox);

// if first node touched reply, copy its neighborood set

// if first node touched reply, copy its neighborood set
for (i=1; i<NEIGHBORHOOD_SIZE; i++)
}
for (i=1; i<NEIGHBORHOOD_SIZE; i++)
}
for (i=min;i<max;i++) {
d = domain(node->id, i);
for (j=0; j<LEVEL_SIZE; j++)
for (i=min;i<max;i++) {
d = domain(node->id, i);
for (j=0; j<LEVEL_SIZE; j++)
-         if (d!=j)
+    if (d!=j)
}

}

-       for (i=0; i<NAMESPACE_SIZE; i++) {
+  for (i=0; i<NAMESPACE_SIZE; i++) {
j = node->namespace_set[i];
if (j!=-1) {
XBT_DEBUG("Send update to %i", j);
get_mailbox(j, mailbox);
j = node->namespace_set[i];
if (j!=-1) {
XBT_DEBUG("Send update to %i", j);
get_mailbox(j, mailbox);
-
+
req_data->steps = 0;
req_data->steps = 0;
i=0;
for (; i<NAMESPACE_SIZE/2; i++){
curr_namespace_set[i] = node->namespace_set[i];
i=0;
for (; i<NAMESPACE_SIZE/2; i++){
curr_namespace_set[i] = node->namespace_set[i];
}
for (; i<NAMESPACE_SIZE; i++){
}
for (; i<NAMESPACE_SIZE; i++){
-        curr_namespace_set[i] = node->namespace_set[i];
+        curr_namespace_set[i] = node->namespace_set[i];
}

// get the index of values before and after node->id in task_namespace
min = -1;
max = -1;
for (i=0; i<=NAMESPACE_SIZE; i++) {
}

// get the index of values before and after node->id in task_namespace
min = -1;
max = -1;
for (i=0; i<=NAMESPACE_SIZE; i++) {
if (i<NAMESPACE_SIZE)
if (i<NAMESPACE_SIZE)
-         printf("%08x %08x | ", j, curr_namespace_set[i]);
-       if (j != -1 && j < node->id) min = i;
-       if (j != -1 && max == -1 && j > node->id) max = i;
+    printf("%08x %08x | ", j, curr_namespace_set[i]);
+  if (j != -1 && j < node->id) min = i;
+  if (j != -1 && max == -1 && j > node->id) max = i;
}
printf("\n");

j = NAMESPACE_SIZE/2-1;
for (i=NAMESPACE_SIZE/2-1; i>=0; i--) {
}
printf("\n");

j = NAMESPACE_SIZE/2-1;
for (i=NAMESPACE_SIZE/2-1; i>=0; i--) {
if (min<0) {
if (min<0) {
-         node->namespace_set[i] = curr_namespace_set[j];
-         j--;
-       } else if (curr_namespace_set[j] == task_namespace_set[min]) {
-         node->namespace_set[i] = curr_namespace_set[j];
-         j--; min--;
-       } else if (curr_namespace_set[j] > task_namespace_set[min]) {
+    node->namespace_set[i] = curr_namespace_set[j];
+    j--;
+  } else if (curr_namespace_set[j] == task_namespace_set[min]) {
+    node->namespace_set[i] = curr_namespace_set[j];
+    j--; min--;
+  } else if (curr_namespace_set[j] > task_namespace_set[min]) {
node->namespace_set[i] = curr_namespace_set[j];
node->namespace_set[i] = curr_namespace_set[j];
-         j--;
-       } else {
+    j--;
+  } else {
-         min--;
-       }
+    min--;
+  }
}

j = NAMESPACE_SIZE/2;
for (i=NAMESPACE_SIZE/2; i<NAMESPACE_SIZE; i++) {
}

j = NAMESPACE_SIZE/2;
for (i=NAMESPACE_SIZE/2; i<NAMESPACE_SIZE; i++) {
if (min<0 || max>=NAMESPACE_SIZE) {
if (min<0 || max>=NAMESPACE_SIZE) {
-         node->namespace_set[i] = curr_namespace_set[j];
-         j++;
-       } else if (curr_namespace_set[j] == -1) {
-         max++;
-       } else if (curr_namespace_set[j] == task_namespace_set[max]) {
-         node->namespace_set[i] = curr_namespace_set[j];
-         j++; max++;
-       } else if (curr_namespace_set[j] < task_namespace_set[max]) {
+    node->namespace_set[i] = curr_namespace_set[j];
+    j++;
+  } else if (curr_namespace_set[j] == -1) {
+    max++;
+  } else if (curr_namespace_set[j] == task_namespace_set[max]) {
+    node->namespace_set[i] = curr_namespace_set[j];
+    j++; max++;
+  } else if (curr_namespace_set[j] < task_namespace_set[max]) {
node->namespace_set[i] = curr_namespace_set[j];
node->namespace_set[i] = curr_namespace_set[j];
-         j++;
-       } else {
+    j++;
+  } else {
-         max++;
-       }
+    max++;
+  }
}
print_node_namespace_set(node);

}
print_node_namespace_set(node);

}
}
}
}
-  }
+  }
}

/**
}

/**
@@ -437,7 +437,7 @@ static void print_node(node_t node) {
* Print the node id
*/
static void print_node_id(node_t node) {
* Print the node id
*/
static void print_node_id(node_t node) {
-  int i;
+  int i;
printf(" id: %i '%08x' ", node->id, node->id);
for (i=0;i<LEVELS_COUNT;i++)
printf(" %x", domain(node->id, i));
printf(" id: %i '%08x' ", node->id, node->id);
for (i=0;i<LEVELS_COUNT;i++)
printf(" %x", domain(node->id, i));
@@ -448,7 +448,7 @@ static void print_node_id(node_t node) {
* Print the node neighborood set
*/
static void print_node_neighborood_set(node_t node) {
* Print the node neighborood set
*/
static void print_node_neighborood_set(node_t node) {
-  int i;
+  int i;
printf(" neighborood:\n");
for (i=0; i<NEIGHBORHOOD_SIZE; i++)
printf("  %08x\n", node->neighborhood_set[i]);
printf(" neighborood:\n");
for (i=0; i<NEIGHBORHOOD_SIZE; i++)
printf("  %08x\n", node->neighborhood_set[i]);
@@ -458,7 +458,7 @@ static void print_node_neighborood_set(node_t node) {
* Print the routing table
*/
static void print_node_routing_table(node_t node) {
* Print the routing table
*/
static void print_node_routing_table(node_t node) {
-  int i,j;
+  int i,j;
printf(" routing table:\n");
for (i=0; i<LEVELS_COUNT; i++){
printf("  ");
printf(" routing table:\n");
for (i=0; i<LEVELS_COUNT; i++){
printf("  ");
@@ -484,7 +484,7 @@ static void print_node_namespace_set(node_t node) {
* Get the corresponding state of a node
*/
static state_t node_get_state(node_t node) {
* Get the corresponding state of a node
*/
static state_t node_get_state(node_t node) {
-  int i,j;
+  int i,j;
state_t state = xbt_new0(s_state_t,1);
state->id = node->id;
for (i=0; i<NEIGHBORHOOD_SIZE; i++)
state_t state = xbt_new0(s_state_t,1);
state->id = node->id;
for (i=0; i<NEIGHBORHOOD_SIZE; i++)
@@ -614,9 +614,9 @@ int main(int argc, char *argv[])
{
MSG_init(&argc, argv);
xbt_assert(argc > 2,
{
MSG_init(&argc, argv);
xbt_assert(argc > 2,
-            "Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n"
-            "\tExample: %s ../msg_platform.xml pastry10.xml\n",
-            argv[0], argv[0]);
+       "Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n"
+       "\tExample: %s ../msg_platform.xml pastry10.xml\n",
+       argv[0], argv[0]);

char **options = &argv[1];
while (!strncmp(options[0], "-", 1)) {

char **options = &argv[1];
while (!strncmp(options[0], "-", 1)) {
index 6cc0b81..b184bf5 100644 (file)
@@ -75,8 +75,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                argv[0], argv[0]);
+           "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+           argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);

index 9417692..15d2ee0 100644 (file)
@@ -157,8 +157,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                argv[0], argv[0]);
+           "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+           argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);

index aed1405..f64e726 100644 (file)
@@ -72,9 +72,9 @@ int main(int argc, char* argv[]) {

MSG_process_create_with_arguments(xbt_strdup("Alice"), peer, NULL,

MSG_process_create_with_arguments(xbt_strdup("Alice"), peer, NULL,
-                                   h, 8, aliceTimes);
+            h, 8, aliceTimes);
MSG_process_create_with_arguments(xbt_strdup("Bob"), peer, NULL,
MSG_process_create_with_arguments(xbt_strdup("Bob"), peer, NULL,
-                                   h, 8, bobTimes);
+            h, 8, bobTimes);

msg_error_t res = MSG_main();
printf("Finished\n");

msg_error_t res = MSG_main();
printf("Finished\n");
index ca12844..fbff386 100644 (file)
@@ -156,7 +156,7 @@ int main(int argc, char *argv[])
MSG_init(&argc, argv);

xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
MSG_init(&argc, argv);

xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-            "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
+       "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);

res = test_all(argv[1], argv[2]);

res = test_all(argv[1], argv[2]);

index 014059b..00dfcbb 100644 (file)
@@ -51,8 +51,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                "\tExample: %s msg_platform.xml msg_deployment.xml\n",
-                argv[0], argv[0]);
+           "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+           argv[0], argv[0]);

test_all(argv[1], argv[2]);

test_all(argv[1], argv[2]);

index 19e5b84..a36254a 100644 (file)
@@ -102,8 +102,8 @@ int main(int argc, char *argv[])

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"

MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                 "\tExample: %s msg_platform.xml msg_deployment_suspend.xml\n",
-                 argv[0], argv[0]);
+            "\tExample: %s msg_platform.xml msg_deployment_suspend.xml\n",
+            argv[0], argv[0]);

test_all(argv[1], argv[2]);

test_all(argv[1], argv[2]);

index c1e3ca5..0a7c018 100644 (file)
@@ -11,41 +11,41 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "a sample log category");

class Worker : simgrid::s4u::Actor {
public:

class Worker : simgrid::s4u::Actor {
public:
-       Worker(const char*procname, simgrid::s4u::Host *host,int argc, char **argv)
-                       : simgrid::s4u::Actor(procname,host,argc,argv){}
+  Worker(const char*procname, simgrid::s4u::Host *host,int argc, char **argv)
+      : simgrid::s4u::Actor(procname,host,argc,argv){}

-       int main(int argc, char **argv) {
-               XBT_INFO("Hello s4u, I'm ready to serve");
+  int main(int argc, char **argv) {
+    XBT_INFO("Hello s4u, I'm ready to serve");

-               char *msg = (char*)recv(*simgrid::s4u::Mailbox::byName("worker"));
-               XBT_INFO("I'm done. See you.");
-               return 1;
-       }
+    char *msg = (char*)recv(*simgrid::s4u::Mailbox::byName("worker"));
+    XBT_INFO("I'm done. See you.");
+    return 1;
+  }
};

class Master : simgrid::s4u::Actor {
public:
};

class Master : simgrid::s4u::Actor {
public:
-       Master(const char*procname, simgrid::s4u::Host *host,int argc, char **argv)
-                       : Actor(procname,host,argc,argv){}
+  Master(const char*procname, simgrid::s4u::Host *host,int argc, char **argv)
+      : Actor(procname,host,argc,argv){}

-       int main(int argc, char **argv) {
-               const char *msg = "GaBuZoMeu";
-               XBT_INFO("Hello s4u, I have something to send");
-               send(*simgrid::s4u::Mailbox::byName("worker"), xbt_strdup(msg), strlen(msg));
+  int main(int argc, char **argv) {
+    const char *msg = "GaBuZoMeu";
+    XBT_INFO("Hello s4u, I have something to send");
+    send(*simgrid::s4u::Mailbox::byName("worker"), xbt_strdup(msg), strlen(msg));

-               XBT_INFO("I'm done. See you.");
-               return 1;
-       }
+    XBT_INFO("I'm done. See you.");
+    return 1;
+  }
};

int main(int argc, char **argv) {
};

int main(int argc, char **argv) {
-       simgrid::s4u::Engine *e = new simgrid::s4u::Engine(&argc,argv);
+  simgrid::s4u::Engine *e = new simgrid::s4u::Engine(&argc,argv);

-       new Worker("worker", simgrid::s4u::Host::by_name("host0"), 0, NULL);
-       new Master("master", simgrid::s4u::Host::by_name("host1"), 0, NULL);
-       e->run();
-       return 0;
+  new Worker("worker", simgrid::s4u::Host::by_name("host0"), 0, NULL);
+  new Master("master", simgrid::s4u::Host::by_name("host1"), 0, NULL);
+  e->run();
+  return 0;
}
}
index c2e9757..789a8f4 100644 (file)
@@ -13,103 +13,103 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "a sample log category");

class myHost : simgrid::s4u::Actor {
public:

class myHost : simgrid::s4u::Actor {
public:
-       myHost(const char*procname, simgrid::s4u::Host *host,int argc, char **argv)
+  myHost(const char*procname, simgrid::s4u::Host *host,int argc, char **argv)
: simgrid::s4u::Actor(procname,host,argc,argv){}

: simgrid::s4u::Actor(procname,host,argc,argv){}

-       void show_info(boost::unordered_map <std::string, simgrid::s4u::Storage*> const&mounts) {
-               XBT_INFO("Storage info on %s:",
-                       simgrid::s4u::Host::current()->name().c_str());
-
-               for (const auto&kv : mounts) {
-                       const char* mountpoint = kv.first.c_str();
-                       simgrid::s4u::Storage &storage = *kv.second;
-
-                       // Retrieve disk's information
-                       sg_size_t free_size = storage.size_free();
-                       sg_size_t used_size = storage.size_used();
-                       sg_size_t size = storage.size();
-
-                       XBT_INFO("    %s (%s) Used: %llu; Free: %llu; Total: %llu.",
-                                       storage.name(), mountpoint, used_size, free_size, size);
-               }
-       }
-
-       int main(int argc, char **argv) {
-               boost::unordered_map <std::string, simgrid::s4u::Storage *> const& mounts =
-                       simgrid::s4u::Host::current()->mounted_storages();
-
-               show_info(mounts);
-
-               // Open an non-existing file to create it
-               const char *filename = "/home/tmp/data.txt";
-               simgrid::s4u::File *file = new simgrid::s4u::File(filename, NULL);
-
-               write = file->write(200000);  // Write 200,000 bytes
-               XBT_INFO("Create a %llu bytes file named '%s' on /sd1", write, filename);
-
-               // check that sizes have changed
-               show_info(mounts);
-
-               // Now retrieve the size of created file and read it completely
-               file_size = file->size();
-               file->seek(0);
-
-               // Now write 100,000 bytes in tmp/data.txt
-               write = file->write(100000);  // Write 100,000 bytes
-               XBT_INFO("Write %llu bytes on %s", write, filename);
-
-               simgrid::s4u::Storage &storage = simgrid::s4u::Storage::byName("Disk4");
-
-               // Now rename file from ./tmp/data.txt to ./tmp/simgrid.readme
-               const char *newpath = "/home/tmp/simgrid.readme";
-               XBT_INFO("Move '%s' to '%s'", file->path(), newpath);
-               file->move(newpath);
-
-               // Test attaching some user data to the file
-               file->set_userdata(xbt_strdup("777"));
-               XBT_INFO("User data attached to the file: %s", (char*)file->userdata());
-
-               // Close the file
-               delete file;
-
-               // Now attach some user data to disk1
-               XBT_INFO("Get/set data for storage element: %s",storage.name());
-               XBT_INFO("    Uninitialized storage data: '%s'", (char*)storage.userdata());
-
-               storage.set_userdata(xbt_strdup("Some user data"));
-               XBT_INFO("    Set and get data: '%s'", (char*)storage.userdata());
-
-               /*
-                 // Dump disks contents
-                 XBT_INFO("*** Dump content of %s ***",Host::current()->name());
-                 xbt_dict_t contents = NULL;
-                 contents = MSG_host_get_storage_content(MSG_host_self()); // contents is a dict of dicts
-                 xbt_dict_cursor_t curs, curs2 = NULL;
-                 char* mountname;
-                 xbt_dict_t content;
-                 char* path;
-                 sg_size_t *size;
-                 xbt_dict_foreach(contents, curs, mountname, content){
-                   XBT_INFO("Print the content of mount point: %s",mountname);
-                   xbt_dict_foreach(content,curs2,path,size){
-                      XBT_INFO("%s size: %llu bytes", path,*((sg_size_t*)size));
-                   }
-                 xbt_dict_free(&content);
-                 }
-                 xbt_dict_free(&contents);
-                */
-               return 0;
-       }
+  void show_info(boost::unordered_map <std::string, simgrid::s4u::Storage*> const&mounts) {
+    XBT_INFO("Storage info on %s:",
+      simgrid::s4u::Host::current()->name().c_str());
+
+    for (const auto&kv : mounts) {
+      const char* mountpoint = kv.first.c_str();
+      simgrid::s4u::Storage &storage = *kv.second;
+
+      // Retrieve disk's information
+      sg_size_t free_size = storage.size_free();
+      sg_size_t used_size = storage.size_used();
+      sg_size_t size = storage.size();
+
+      XBT_INFO("    %s (%s) Used: %llu; Free: %llu; Total: %llu.",
+          storage.name(), mountpoint, used_size, free_size, size);
+    }
+  }
+
+  int main(int argc, char **argv) {
+    boost::unordered_map <std::string, simgrid::s4u::Storage *> const& mounts =
+      simgrid::s4u::Host::current()->mounted_storages();
+
+    show_info(mounts);
+
+    // Open an non-existing file to create it
+    const char *filename = "/home/tmp/data.txt";
+    simgrid::s4u::File *file = new simgrid::s4u::File(filename, NULL);
+
+    write = file->write(200000);  // Write 200,000 bytes
+    XBT_INFO("Create a %llu bytes file named '%s' on /sd1", write, filename);
+
+    // check that sizes have changed
+    show_info(mounts);
+
+    // Now retrieve the size of created file and read it completely
+    file_size = file->size();
+    file->seek(0);
+
+    // Now write 100,000 bytes in tmp/data.txt
+    write = file->write(100000);  // Write 100,000 bytes
+    XBT_INFO("Write %llu bytes on %s", write, filename);
+
+    simgrid::s4u::Storage &storage = simgrid::s4u::Storage::byName("Disk4");
+
+    // Now rename file from ./tmp/data.txt to ./tmp/simgrid.readme
+    const char *newpath = "/home/tmp/simgrid.readme";
+    XBT_INFO("Move '%s' to '%s'", file->path(), newpath);
+    file->move(newpath);
+
+    // Test attaching some user data to the file
+    file->set_userdata(xbt_strdup("777"));
+    XBT_INFO("User data attached to the file: %s", (char*)file->userdata());
+
+    // Close the file
+    delete file;
+
+    // Now attach some user data to disk1
+    XBT_INFO("Get/set data for storage element: %s",storage.name());
+    XBT_INFO("    Uninitialized storage data: '%s'", (char*)storage.userdata());
+
+    storage.set_userdata(xbt_strdup("Some user data"));
+    XBT_INFO("    Set and get data: '%s'", (char*)storage.userdata());
+
+    /*
+      // Dump disks contents
+      XBT_INFO("*** Dump content of %s ***",Host::current()->name());
+      xbt_dict_t contents = NULL;
+      contents = MSG_host_get_storage_content(MSG_host_self()); // contents is a dict of dicts
+      xbt_dict_cursor_t curs, curs2 = NULL;
+      char* mountname;
+      xbt_dict_t content;
+      char* path;
+      sg_size_t *size;
+      xbt_dict_foreach(contents, curs, mountname, content){
+        XBT_INFO("Print the content of mount point: %s",mountname);
+        xbt_dict_foreach(content,curs2,path,size){
+           XBT_INFO("%s size: %llu bytes", path,*((sg_size_t*)size));
+        }
+      xbt_dict_free(&content);
+      }
+      xbt_dict_free(&contents);
+     */
+    return 0;
+  }
};

int main(int argc, char **argv) {
};

int main(int argc, char **argv) {
-       simgrid::s4u::Engine *e = new simgrid::s4u::Engine(&argc,argv);
+  simgrid::s4u::Engine *e = new simgrid::s4u::Engine(&argc,argv);

-       new myHost("host", simgrid::s4u::Host::by_name("denise"), 0, NULL);
-       e->run();
-       return 0;
+  new myHost("host", simgrid::s4u::Host::by_name("denise"), 0, NULL);
+  e->run();
+  return 0;
}
}
index 024c00d..3d68e1b 100644 (file)
@@ -35,13 +35,13 @@ int main(int argc, char **argv)

/* Check our arguments */
xbt_assert(argc > 2, "Usage: %s platform_file dax_file [jedule_file]\n"

/* Check our arguments */
xbt_assert(argc > 2, "Usage: %s platform_file dax_file [jedule_file]\n"
-            "\tExample: %s simulacrum_7_hosts.xml Montage_25.xml Montage_25.jed",
-            argv[0], argv[0]);
+       "\tExample: %s simulacrum_7_hosts.xml Montage_25.xml Montage_25.jed",
+       argv[0], argv[0]);

char *last = strrchr(argv[2], '.');
char * tracefilename = bprintf("%.*s.trace",(int) (last == NULL ?

char *last = strrchr(argv[2], '.');
char * tracefilename = bprintf("%.*s.trace",(int) (last == NULL ?
-                                                  strlen(argv[2]) :
-                                                  last - argv[2]), argv[2]);
+               strlen(argv[2]) :
+               last - argv[2]), argv[2]);
if (argc == 4)
tracefilename = xbt_strdup(argv[3]);

if (argc == 4)
tracefilename = xbt_strdup(argv[3]);

@@ -30,8 +30,8 @@ int main(int argc, char **argv)
/* SD initialization */
SD_init(&argc, argv);
xbt_assert(argc > 1,
/* SD initialization */
SD_init(&argc, argv);
xbt_assert(argc > 1,
-            "Usage: %s platform_file\n\tExample: %s ../two_hosts.xml",
-            argv[0], argv[0]);
+       "Usage: %s platform_file\n\tExample: %s ../two_hosts.xml",
+       argv[0], argv[0]);

SD_create_environment(argv[1]);

SD_create_environment(argv[1]);

index 8ecf2d5..8e672a9 100644 (file)

xbt_assert(xbt_dynar_length(grand_parents) <2,

xbt_assert(xbt_dynar_length(grand_parents) <2,
-                  "Error: transfer %s has 2 parents",
+       "Error: transfer %s has 2 parents",

xbt_dynar_get_cpy(grand_parents, 0, &grand_parent);

xbt_dynar_get_cpy(grand_parents, 0, &grand_parent);

index 1265710..8bbcf95 100644 (file)
@@ -27,7 +27,7 @@ int main(int argc, char **argv)
/*  xbt_log_control_set("sd.thres=debug"); */

xbt_assert(argc > 1, "Usage: %s platform_file\n"
/*  xbt_log_control_set("sd.thres=debug"); */

xbt_assert(argc > 1, "Usage: %s platform_file\n"
-            "\nExample: %s two_clusters.xml", argv[0], argv[0]);
+       "\nExample: %s two_clusters.xml", argv[0], argv[0]);

/* creation of the environment */
platform_file = argv[1];

/* creation of the environment */
platform_file = argv[1];
index 2f236a6..5acc969 100644 (file)
@@ -43,7 +43,7 @@ int main(int argc, char **argv)
/*  xbt_log_control_set("sd.thres=debug"); */

xbt_assert(argc > 1, "Usage: %s platform_file\n"
/*  xbt_log_control_set("sd.thres=debug"); */

xbt_assert(argc > 1, "Usage: %s platform_file\n"
-            "\nExample: %s two_clusters.xml", argv[0], argv[0]);
+       "\nExample: %s two_clusters.xml", argv[0], argv[0]);

/* creation of the environment */
platform_file = argv[1];

/* creation of the environment */
platform_file = argv[1];
index d589e33..ce4f739 100644 (file)
@@ -61,8 +61,8 @@ int main(int argc, char **argv)

/* creation of the environment */
xbt_assert(strstr(argv[1],".xml"),

/* creation of the environment */
xbt_assert(strstr(argv[1],".xml"),
-            "Unsupported platform description style (not XML): %s",
-            argv[1]);
+       "Unsupported platform description style (not XML): %s",
+       argv[1]);
SD_create_environment(argv[1]);

/* getting platform infos */
SD_create_environment(argv[1]);

/* getting platform infos */
index 4e29f2c..632ca94 100644 (file)
@@ -33,7 +33,7 @@ int main(int argc, char **argv)
/*  xbt_log_control_set("sd.thres=debug"); */

xbt_assert(argc > 1, "Usage: %s platform_file\n"
/*  xbt_log_control_set("sd.thres=debug"); */

xbt_assert(argc > 1, "Usage: %s platform_file\n"
-            "\nExample: %s two_clusters.xml", argv[0], argv[0]);
+       "\nExample: %s two_clusters.xml", argv[0], argv[0]);

/* creation of the environment */
platform_file = argv[1];

/* creation of the environment */
platform_file = argv[1];
index 871f83e..6767ba4 100644 (file)
@@ -81,16 +81,16 @@ int main(int argc, char ** argv)
case 'h':
XBT_INFO(
"Usage: mxm_cblas_test [options]\n"
case 'h':
XBT_INFO(
"Usage: mxm_cblas_test [options]\n"
-                    "  -M I    M size (default: %zu)\n"
-                    "  -N I    N size (default: %zu)\n"
-                    "  -K I    K size (default: %zu)\n"
-                    "  -B I    Block size on the k dimension(default: %zu)\n"
-                    "  -G I    Number of processor groups(default: %zu)\n"
-                    "  -g I    group index(default: %zu)\n"
-                    "  -k I    group rank(default: %zu)\n"
-                    "  -r I    processor row size (default: %zu)\n"
-                    "  -c I    processor col size (default: %zu)\n"
-                    "  -h      help\n",
+                    "  -M I  M size (default: %zu)\n"
+                    "  -N I  N size (default: %zu)\n"
+                    "  -K I  K size (default: %zu)\n"
+                    "  -B I  Block size on the k dimension(default: %zu)\n"
+                    "  -G I  Number of processor groups(default: %zu)\n"
+                    "  -g I  group index(default: %zu)\n"
+                    "  -k I  group rank(default: %zu)\n"
+                    "  -r I  processor row size (default: %zu)\n"
+                    "  -c I  processor col size (default: %zu)\n"
+                    "  -h  help\n",
m, n, k, Block_size, NB_groups, group, key, row, col);
return 0;
case 'M':
m, n, k, Block_size, NB_groups, group, key, row, col);
return 0;
case 'M':
index c992b24..5d6a829 100644 (file)
@@ -6,7 +6,7 @@ int x = 20;

int main(int argc, char **argv) {

int main(int argc, char **argv) {

-       int recv_x = 1, size, rank;
+  int recv_x = 1, size, rank;
MPI_Status status;

MPI_Init(&argc, &argv);
MPI_Status status;

MPI_Init(&argc, &argv);
@@ -35,5 +35,5 @@ int main(int argc, char **argv) {

MPI_Finalize();

MPI_Finalize();

-       return 0;
+  return 0;
}
}
index bb06949..03ec4b4 100644 (file)
#include "xbt/asserts.h"
#include "smpi/smpi.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
#include "xbt/asserts.h"
#include "smpi/smpi.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
-               "Messages specific for this msg example");
+    "Messages specific for this msg example");

static int smpi_replay(int argc, char *argv[]) {

static int smpi_replay(int argc, char *argv[]) {
-       smpi_replay_run(&argc, &argv);
-       return 0;
+  smpi_replay_run(&argc, &argv);
+  return 0;
}

int main(int argc, char *argv[]){
}

int main(int argc, char *argv[]){
-       msg_error_t res;
-       const char *platform_file;
-       const char *application_file;
-       const char *description_file;
-
-       MSG_init(&argc, argv);
-
-       if (argc < 4) {
-               printf("Usage: %s description_file platform_file deployment_file\n", argv[0]);
-               printf("example: %s smpi_multiple_apps msg_platform.xml msg_deployment.xml\n", argv[0]);
-               exit(1);
-       }
-       description_file = argv[1];
-       platform_file = argv[2];
-       application_file = argv[3];
-
-
-       /*  Simulation setting */
-       MSG_create_environment(platform_file);
-
-       /*   Application deployment: read the description file in order to identify instances to launch */
-       FILE* fp = fopen(description_file, "r");
-       if (fp == NULL)
-               xbt_die("Cannot open %s", description_file);
-       char     *line = NULL;
-       size_t n         = 0;
-       int instance_size = 0;
-       const char* instance_id = NULL;
-       while ((read = xbt_getline(&line, &n, fp)) != -1 ){
-               xbt_dynar_t elems = xbt_str_split_quoted_in_place(line);
-               if(xbt_dynar_length(elems)<3){
-                       xbt_die ("Not enough elements in the line");
-               }
-
-               const char** line_char= xbt_dynar_to_array(elems);
-               instance_id = line_char[0];
-               instance_size = atoi(line_char[2]);
-
-               XBT_INFO("Initializing instance %s of size %d", instance_id, instance_size);
-               SMPI_app_instance_register(instance_id, smpi_replay,instance_size);
-
-               xbt_free(line_char);
-       }
-
-       MSG_launch_application(application_file);
-       SMPI_init();
-
-       res = MSG_main();
-
-       XBT_INFO("Simulation time %g", MSG_get_clock());
-
-       SMPI_finalize();
-       if (res == MSG_OK)
-               return 0;
-       else
-               return 1;
+  msg_error_t res;
+  const char *platform_file;
+  const char *application_file;
+  const char *description_file;
+
+  MSG_init(&argc, argv);
+
+  if (argc < 4) {
+    printf("Usage: %s description_file platform_file deployment_file\n", argv[0]);
+    printf("example: %s smpi_multiple_apps msg_platform.xml msg_deployment.xml\n", argv[0]);
+    exit(1);
+  }
+  description_file = argv[1];
+  platform_file = argv[2];
+  application_file = argv[3];
+
+
+  /*  Simulation setting */
+  MSG_create_environment(platform_file);
+
+  /*   Application deployment: read the description file in order to identify instances to launch */
+  FILE* fp = fopen(description_file, "r");
+  if (fp == NULL)
+    xbt_die("Cannot open %s", description_file);
+  char   *line = NULL;
+  size_t n   = 0;
+  int instance_size = 0;
+  const char* instance_id = NULL;
+  while ((read = xbt_getline(&line, &n, fp)) != -1 ){
+    xbt_dynar_t elems = xbt_str_split_quoted_in_place(line);
+    if(xbt_dynar_length(elems)<3){
+      xbt_die ("Not enough elements in the line");
+    }
+
+    const char** line_char= xbt_dynar_to_array(elems);
+    instance_id = line_char[0];
+    instance_size = atoi(line_char[2]);
+
+    XBT_INFO("Initializing instance %s of size %d", instance_id, instance_size);
+    SMPI_app_instance_register(instance_id, smpi_replay,instance_size);
+
+    xbt_free(line_char);
+  }
+
+  MSG_launch_application(application_file);
+  SMPI_init();
+
+  res = MSG_main();
+
+  XBT_INFO("Simulation time %g", MSG_get_clock());
+
+  SMPI_finalize();
+  if (res == MSG_OK)
+    return 0;
+  else
+    return 1;

}

}
index 0e03906..93b9539 100644 (file)
@@ -208,7 +208,7 @@ XBT_PUBLIC(void) MSG_config(const char *key, const char *value);
*  We allow to link against compiled versions that differ in the patch level.
*/
#define MSG_init(argc,argv)  do {                                                          \
*  We allow to link against compiled versions that differ in the patch level.
*/
#define MSG_init(argc,argv)  do {                                                          \
-       sg_version_check(SIMGRID_VERSION_MAJOR,SIMGRID_VERSION_MINOR,SIMGRID_VERSION_PATCH);\
+  sg_version_check(SIMGRID_VERSION_MAJOR,SIMGRID_VERSION_MINOR,SIMGRID_VERSION_PATCH);\
MSG_init_nocheck(argc,argv);                                                        \
} while (0)

MSG_init_nocheck(argc,argv);                                                        \
} while (0)

index f807407..696da86 100644 (file)
@@ -30,74 +30,74 @@ namespace s4u {
*
* class Worker : simgrid::s4u::Actor {
*
*
* class Worker : simgrid::s4u::Actor {
*
- *       int main(int argc, char **argv) {
- *             printf("Hello s4u");
- *       }
+ *     int main(int argc, char **argv) {
+ *    printf("Hello s4u");
+ *    }
* };
* \endverbatim
*
*/
XBT_PUBLIC_CLASS Actor {
* };
* \endverbatim
*
*/
XBT_PUBLIC_CLASS Actor {
-       friend Comm;
-       Actor(smx_process_t smx_proc);
+  friend Comm;
+  Actor(smx_process_t smx_proc);
public:
public:
-       Actor(const char*name, s4u::Host *host, int argc, char **argv);
-       Actor(const char*name, s4u::Host *host, int argc, char **argv, double killTime);
-       virtual ~Actor() {}
-
-       /** The main method of your agent */
-       virtual int main(int argc, char **argv);
-
-       /** The Actor that is currently running */
-       static Actor *current();
-       /** Retrieves the actor that have the given PID (or NULL if not existing) */
-       static Actor *byPid(int pid);
-
-       /** Retrieves the name of that actor */
-       const char*getName();
-       /** Retrieves the host on which that actor is running */
-       s4u::Host *getHost();
-       /** Retrieves the PID of that actor */
-       int getPid();
-
-       /** If set to true, the actor will automatically restart when its host reboots */
-       void setAutoRestart(bool autorestart);
-       /** Sets the time at which that actor should be killed */
-       void setKillTime(double time);
-       /** Retrieves the time at which that actor will be killed (or -1 if not set) */
-       double getKillTime();
-
-       /** Ask kindly to all actors to die. Only the issuer will survive. */
-       static void killAll();
-       /** Ask the actor to die.
-        *
-        * It will only notice your request when doing a simcall next time (a communication or similar).
-        * SimGrid sometimes have issues when you kill actors that are currently communicating and such. We are working on it to fix the issues.
-        */
-       void kill();
-
-       /** Block the actor sleeping for that amount of seconds (may throws hostFailure) */
-       void sleep(double duration);
-
-       /** Block the actor, computing the given amount of flops */
-       e_smx_state_t execute(double flop);
-
-       /** Block the actor until it gets a message from the given mailbox.
-        *
-        * See \ref Comm for the full communication API (including non blocking communications).
-        */
-       void *recv(Mailbox &chan);
-
-       /** Block the actor until it delivers a message of the given simulated size to the given mailbox
-        *
-        * See \ref Comm for the full communication API (including non blocking communications).
-       */
-       void send(Mailbox &chan, void*payload, size_t simulatedSize);
+  Actor(const char*name, s4u::Host *host, int argc, char **argv);
+  Actor(const char*name, s4u::Host *host, int argc, char **argv, double killTime);
+  virtual ~Actor() {}
+
+  /** The main method of your agent */
+  virtual int main(int argc, char **argv);
+
+  /** The Actor that is currently running */
+  static Actor *current();
+  /** Retrieves the actor that have the given PID (or NULL if not existing) */
+  static Actor *byPid(int pid);
+
+  /** Retrieves the name of that actor */
+  const char*getName();
+  /** Retrieves the host on which that actor is running */
+  s4u::Host *getHost();
+  /** Retrieves the PID of that actor */
+  int getPid();
+
+  /** If set to true, the actor will automatically restart when its host reboots */
+  void setAutoRestart(bool autorestart);
+  /** Sets the time at which that actor should be killed */
+  void setKillTime(double time);
+  /** Retrieves the time at which that actor will be killed (or -1 if not set) */
+  double getKillTime();
+
+  /** Ask kindly to all actors to die. Only the issuer will survive. */
+  static void killAll();
+  /** Ask the actor to die.
+   *
+   * It will only notice your request when doing a simcall next time (a communication or similar).
+   * SimGrid sometimes have issues when you kill actors that are currently communicating and such. We are working on it to fix the issues.
+   */
+  void kill();
+
+  /** Block the actor sleeping for that amount of seconds (may throws hostFailure) */
+  void sleep(double duration);
+
+  /** Block the actor, computing the given amount of flops */
+  e_smx_state_t execute(double flop);
+
+  /** Block the actor until it gets a message from the given mailbox.
+   *
+   * See \ref Comm for the full communication API (including non blocking communications).
+   */
+  void *recv(Mailbox &chan);
+
+  /** Block the actor until it delivers a message of the given simulated size to the given mailbox
+   *
+   * See \ref Comm for the full communication API (including non blocking communications).
+  */
+  void send(Mailbox &chan, void*payload, size_t simulatedSize);

protected:

protected:
-       smx_process_t getInferior() {return p_smx_process;}
+  smx_process_t getInferior() {return p_smx_process;}
private:
private:
-       smx_process_t p_smx_process;
+  smx_process_t p_smx_process;
};
}} // namespace simgrid::s4u

};
}} // namespace simgrid::s4u

@@ -106,34 +106,34 @@ private:
#if 0

public abstract class Actor implements Runnable {
#if 0

public abstract class Actor implements Runnable {
-       /** Suspends the process. See {@link #resume()} to resume it afterward */
-       public native void suspend();
-       /** Resume a process that was suspended by {@link #suspend()}. */
-       public native void resume();
-       /** Tests if a process is suspended. */
-       public native boolean isSuspended();
-
-       /**
-        * Returns the value of a given process property.
-        */
-       public native String getProperty(String name);
-
-
-       /**
-        * Migrates a process to another host.
-        *
-        * @param host                  The host where to migrate the process.
-        *
-        */
-       public native void migrate(Host host);
-
-       public native void exit();
-       /**
-        * This static method returns the current amount of processes running
-        *
-        * @return                      The count of the running processes
-        */
-       public native static int getCount();
+  /** Suspends the process. See {@link #resume()} to resume it afterward */
+  public native void suspend();
+  /** Resume a process that was suspended by {@link #suspend()}. */
+  public native void resume();
+  /** Tests if a process is suspended. */
+  public native boolean isSuspended();
+
+  /**
+   * Returns the value of a given process property.
+   */
+  public native String getProperty(String name);
+
+
+  /**
+   * Migrates a process to another host.
+   *
+   * @param host      The host where to migrate the process.
+   *
+   */
+  public native void migrate(Host host);
+
+  public native void exit();
+  /**
+   * This static method returns the current amount of processes running
+   *
+   * @return      The count of the running processes
+   */
+  public native static int getCount();

}
#endif

}
#endif
index 37bd4e1..6500b79 100644 (file)
@@ -15,7 +15,7 @@

SG_BEGIN_DECL();
typedef enum {

SG_BEGIN_DECL();
typedef enum {
-       inited, started, finished
+  inited, started, finished
} e_s4u_async_state_t;
SG_END_DECL();

} e_s4u_async_state_t;
SG_END_DECL();

@@ -27,51 +27,51 @@ namespace s4u {
* This class is the ancestor of every asynchronous actions, that is, of actions that do take time in the simulated world.
*/
XBT_PUBLIC_CLASS Async {
* This class is the ancestor of every asynchronous actions, that is, of actions that do take time in the simulated world.
*/
XBT_PUBLIC_CLASS Async {
-       friend Comm;
+  friend Comm;
protected:
protected:
-       Async();
-       virtual ~Async();
-
+  Async();
+  virtual ~Async();
+
private:
private:
-       struct s_smx_synchro *p_inferior = NULL;
+  struct s_smx_synchro *p_inferior = NULL;

private:

private:
-       e_s4u_async_state_t p_state = inited;
+  e_s4u_async_state_t p_state = inited;
public:
public:
-       /** Starts a previously created async.
-        *
-        * This function is optional: you can call wait() even if you didn't call start()
-        */
-       virtual void start()=0;
-       /** Tests whether the given async is terminated yet */
-       //virtual bool test()=0;
-       /** Blocks until the async is terminated */
-       virtual void wait()=0;
-       /** Blocks until the async is terminated, or until the timeout is elapsed
-        *  Raises: timeout exception.*/
-       virtual void wait(double timeout)=0;
-       /** Cancel that async */
-       //virtual void cancel();
-       /** Retrieve the current state of the async */
-       e_s4u_async_state_t getState() {return p_state;}
+  /** Starts a previously created async.
+   *
+   * This function is optional: you can call wait() even if you didn't call start()
+   */
+  virtual void start()=0;
+  /** Tests whether the given async is terminated yet */
+  //virtual bool test()=0;
+  /** Blocks until the async is terminated */
+  virtual void wait()=0;
+  /** Blocks until the async is terminated, or until the timeout is elapsed
+   *  Raises: timeout exception.*/
+  virtual void wait(double timeout)=0;
+  /** Cancel that async */
+  //virtual void cancel();
+  /** Retrieve the current state of the async */
+  e_s4u_async_state_t getState() {return p_state;}

private:

private:
-       double p_remains = 0;
+  double p_remains = 0;
public:
public:
-       /** Get the remaining amount of work that this Async entails. When it's 0, it's done. */
-       double getRemains();
-       /** Set the [remaining] amount of work that this Async will entail
-        *
-        * It is forbidden to change the amount of work once the Async is started */
-       void setRemains(double remains);
+  /** Get the remaining amount of work that this Async entails. When it's 0, it's done. */
+  double getRemains();
+  /** Set the [remaining] amount of work that this Async will entail
+   *
+   * It is forbidden to change the amount of work once the Async is started */
+  void setRemains(double remains);

private:

private:
-       void *p_userData = NULL;
+  void *p_userData = NULL;
public:
public:
-       /** Put some user data onto the Async */
-       void setUserData(void *data) {p_userData=data;}
-       /** Retrieve the user data of the Async */
-       void *getUserData() { return p_userData; }
+  /** Put some user data onto the Async */
+  void setUserData(void *data) {p_userData=data;}
+  /** Retrieve the user data of the Async */
+  void *getUserData() { return p_userData; }
}; // class

}}; // Namespace simgrid::s4u
}; // class

}}; // Namespace simgrid::s4u
index fa6b064..ded1496 100644 (file)
@@ -20,61 +20,61 @@ namespace s4u {
* Represents all asynchronous communications, that you can test or wait onto.
*/
XBT_PUBLIC_CLASS Comm : public Async {
* Represents all asynchronous communications, that you can test or wait onto.
*/
XBT_PUBLIC_CLASS Comm : public Async {
-       Comm() : Async() {}
+  Comm() : Async() {}
public:
public:
-       virtual ~Comm();
+  virtual ~Comm();

public:

public:
-       /** Creates (but don't start) an async send to the mailbox #dest */
-       static Comm &send_init(Actor *sender, Mailbox &dest);
-       /** Creates and start an async send to the mailbox #dest */
-       static Comm &send_async(s4u::Actor *sender, Mailbox &dest, void *data, int simulatedByteAmount);
+  /** Creates (but don't start) an async send to the mailbox #dest */
+  static Comm &send_init(Actor *sender, Mailbox &dest);
+  /** Creates and start an async send to the mailbox #dest */
+  static Comm &send_async(s4u::Actor *sender, Mailbox &dest, void *data, int simulatedByteAmount);
/** Creates (but don't start) an async recv onto the mailbox #from */
/** Creates (but don't start) an async recv onto the mailbox #from */
-       static Comm &recv_init(s4u::Actor *receiver, Mailbox &from);
-       /** Creates and start an async recv to the mailbox #from */
-       static Comm &recv_async(s4u::Actor *receiver, Mailbox &from, void **data);
+  static Comm &recv_init(s4u::Actor *receiver, Mailbox &from);
+  /** Creates and start an async recv to the mailbox #from */
+  static Comm &recv_async(s4u::Actor *receiver, Mailbox &from, void **data);

-       void start() override;
-       void wait() override;
-       void wait(double timeout) override;
+  void start() override;
+  void wait() override;
+  void wait(double timeout) override;

private:

private:
-       double p_rate=-1;
+  double p_rate=-1;
public:
public:
-       /** Sets the maximal communication rate (in byte/sec). Must be done before start */
-       void setRate(double rate);
+  /** Sets the maximal communication rate (in byte/sec). Must be done before start */
+  void setRate(double rate);

private:

private:
-       void *p_dstBuff = NULL;
-       size_t p_dstBuffSize = 0;
-       void *p_srcBuff = NULL;
-       size_t p_srcBuffSize = sizeof(void*);
+  void *p_dstBuff = NULL;
+  size_t p_dstBuffSize = 0;
+  void *p_srcBuff = NULL;
+  size_t p_srcBuffSize = sizeof(void*);
public:
public:
-       /** Specify the data to send */
-       void setSrcData(void * buff);
-       /** Specify the size of the data to send */
-       void setSrcDataSize(size_t size);
-       /** Specify the data to send and its size */
-       void setSrcData(void * buff, size_t size);
+  /** Specify the data to send */
+  void setSrcData(void * buff);
+  /** Specify the size of the data to send */
+  void setSrcDataSize(size_t size);
+  /** Specify the data to send and its size */
+  void setSrcData(void * buff, size_t size);

-       /** Specify where to receive the data */
-       void setDstData(void ** buff);
-       /** Specify the buffer in which the data should be received */
-       void setDstData(void ** buff, size_t size);
-       /** Retrieve the size of the received data */
-       size_t getDstDataSize();
+  /** Specify where to receive the data */
+  void setDstData(void ** buff);
+  /** Specify the buffer in which the data should be received */
+  void setDstData(void ** buff, size_t size);
+  /** Retrieve the size of the received data */
+  size_t getDstDataSize();

private: /* FIXME: expose these elements in the API */

private: /* FIXME: expose these elements in the API */
-       int p_detached = 0;
+  int p_detached = 0;
int (*p_matchFunction)(void *, void *, smx_synchro_t) = NULL;
void (*p_cleanFunction)(void *) = NULL;
void (*p_copyDataFunction)(smx_synchro_t, void*, size_t) = NULL;

private:
int (*p_matchFunction)(void *, void *, smx_synchro_t) = NULL;
void (*p_cleanFunction)(void *) = NULL;
void (*p_copyDataFunction)(smx_synchro_t, void*, size_t) = NULL;

private:
-       Actor *p_sender = NULL;
-       Mailbox *p_mailbox = NULL;
+  Actor *p_sender = NULL;
+  Mailbox *p_mailbox = NULL;
};

}} // namespace simgrid::s4u
};

}} // namespace simgrid::s4u
index da1d33a..e5bc4d2 100644 (file)
@@ -18,35 +18,35 @@ namespace s4u {
*/
XBT_PUBLIC_CLASS Engine {
public:
*/
XBT_PUBLIC_CLASS Engine {
public:
-       /** Constructor, taking the command line parameters of your main function */
-       Engine(int *argc, char **argv);
-
-       /** @brief Load a platform file describing the environment
-        *
-        * The environment is either a XML file following the simgrid.dtd formalism, or a lua file.
-        * Some examples can be found in the directory examples/platforms.
-        */
-
-       /** Registers the main function of an actor that will be launched from the deployment file */
-       void register_function(const char*name, int (*code)(int,char**));
-
-       /** Registers a function as the default main function of actors
-        *
-        * It will be used as fallback when the function requested from the deployment file was not registered.
-        * It is used for trace-based simulations (see examples/msg/actions).
-        */
-       void register_default(int (*code)(int,char**));
-
-       /** @brief Load a deployment file and launch the actors that it contains */
-
-       /** @brief Run the simulation */
-       void run();
-
-       /** @brief Retrieve the simulation time */
-       static double getClock();
-
+  /** Constructor, taking the command line parameters of your main function */
+  Engine(int *argc, char **argv);
+
+  /** @brief Load a platform file describing the environment
+   *
+   * The environment is either a XML file following the simgrid.dtd formalism, or a lua file.
+   * Some examples can be found in the directory examples/platforms.
+   */
+
+  /** Registers the main function of an actor that will be launched from the deployment file */
+  void register_function(const char*name, int (*code)(int,char**));
+
+  /** Registers a function as the default main function of actors
+   *
+   * It will be used as fallback when the function requested from the deployment file was not registered.
+   * It is used for trace-based simulations (see examples/msg/actions).
+   */
+  void register_default(int (*code)(int,char**));
+
+  /** @brief Load a deployment file and launch the actors that it contains */
+
+  /** @brief Run the simulation */
+  void run();
+
+  /** @brief Retrieve the simulation time */
+  static double getClock();
+
};
}} // namespace simgrid::sgo

};
}} // namespace simgrid::sgo

index 6c4ccd0..f2182a3 100644 (file)
@@ -27,56 +27,56 @@ class Storage;
*/
XBT_PUBLIC_CLASS File {
public:
*/
XBT_PUBLIC_CLASS File {
public:
-       File(const char *fullpath, void* userdata);
-       ~File();
+  File(const char *fullpath, void* userdata);
+  ~File();
private:
private:
-       smx_file_t p_inferior;
-       const char *p_path;
+  smx_file_t p_inferior;
+  const char *p_path;

public:

public:
-       /** Retrieves the path to the file */
-       const char *path() { return p_path;}
+  /** Retrieves the path to the file */
+  const char *path() { return p_path;}
public:
public:
-       /** Simulates a read action. Returns the size of data actually read
-        *
-        *  FIXME: reading from a remotely mounted disk is not implemented yet. Any storage is considered as local, and no network communication ever occur.
-        */
-       /** Simulates a write action. Returns the size of data actually written.
-        *
-        *  FIXME: reading from a remotely mounted disk is not implemented yet. Any storage is considered as local, and no network communication ever occur.
-        */
-       sg_size_t write(sg_size_t size);
-
-       /** Allows to store user data on that host */
-       void set_userdata(void *data) {p_userdata = data;}
-       /** Retrieves the previously stored data */
-       void* userdata() {return p_userdata;}
+  /** Simulates a read action. Returns the size of data actually read
+   *
+   *  FIXME: reading from a remotely mounted disk is not implemented yet. Any storage is considered as local, and no network communication ever occur.
+   */
+  /** Simulates a write action. Returns the size of data actually written.
+   *
+   *  FIXME: reading from a remotely mounted disk is not implemented yet. Any storage is considered as local, and no network communication ever occur.
+   */
+  sg_size_t write(sg_size_t size);
+
+  /** Allows to store user data on that host */
+  void set_userdata(void *data) {p_userdata = data;}
+  /** Retrieves the previously stored data */
+  void* userdata() {return p_userdata;}
private:
private:
-       void *p_userdata=NULL;
+  void *p_userdata=NULL;

public:

public:
-       /** Retrieve the datasize */
-       sg_size_t size();
-
-       /** Sets the file head to the given position. */
-       void seek(sg_size_t pos);
-       /** Retrieves the current file position */
-       sg_size_t tell();
-
-       /** Rename a file
-        *
-        * WARNING: It is forbidden to move the file to another mount point */
-       void move(const char*fullpath);
-
-       /** Remove a file from disk */
-
-       /* FIXME: add these to the S4U API:
-       XBT_PUBLIC(const char *) MSG_file_get_name(msg_file_t file);
-       XBT_PUBLIC(msg_error_t) MSG_file_rcopy(msg_file_t fd, msg_host_t host, const char* fullpath);
-       XBT_PUBLIC(msg_error_t) MSG_file_rmove(msg_file_t fd, msg_host_t host, const char* fullpath);
-       */
+  /** Retrieve the datasize */
+  sg_size_t size();
+
+  /** Sets the file head to the given position. */
+  void seek(sg_size_t pos);
+  /** Retrieves the current file position */
+  sg_size_t tell();
+
+  /** Rename a file
+   *
+   * WARNING: It is forbidden to move the file to another mount point */
+  void move(const char*fullpath);
+
+  /** Remove a file from disk */
+
+  /* FIXME: add these to the S4U API:
+  XBT_PUBLIC(const char *) MSG_file_get_name(msg_file_t file);
+  XBT_PUBLIC(msg_error_t) MSG_file_rcopy(msg_file_t fd, msg_host_t host, const char* fullpath);
+  XBT_PUBLIC(msg_error_t) MSG_file_rmove(msg_file_t fd, msg_host_t host, const char* fullpath);
+  */

};

};

index 65960a8..20e5e7d 100644 (file)
@@ -41,70 +41,70 @@ XBT_PUBLIC_CLASS Host :
public simgrid::xbt::Extendable<Host> {

private:
public simgrid::xbt::Extendable<Host> {

private:
-       Host(const char *name);
+  Host(const char *name);
public: // TODO, make me private
public: // TODO, make me private
-       ~Host();
+  ~Host();
public:

static Host* by_name_or_null(const char* name);
static Host* by_name_or_create(const char* name);
public:

static Host* by_name_or_null(const char* name);
static Host* by_name_or_create(const char* name);
-       /** Retrieves an host from its name. */
-       static s4u::Host *by_name(std::string name);
-       /** Retrieves the host on which the current actor is running */
-       static s4u::Host *current();
-
-       simgrid::xbt::string const& name() const { return name_; }
-
-       /** Turns that host on if it was previously off
-        *
-        * All actors on that host which were marked autorestart will be restarted automatically.
-        * This call does nothing if the host is already on.
-        */
-       void turn_on();
-       /** Turns that host off. All actors are forcefully stopped. */
-       void turn_off();
-       /** Returns if that host is currently up and running */
-       bool is_on();
-       bool is_off() { return !is_on(); }
-
-       double speed();
-       int core_count();
-       xbt_dict_t properties();
-       xbt_swag_t processes();
-       double current_power_peak();
-       double power_peak_at(int pstate_index);
-       void set_pstate(int pstate_index);
-       int pstates_count() const;
-       int pstate();
-       void get_parameters(vm_params_t params);
-       void set_parameters(vm_params_t params);
-       xbt_dict_t mounted_storages_as_dict(); // HACK
-       xbt_dynar_t attached_storages();
-
-       /** Get an associative list [mount point]->[Storage] off all local mount points.
-        *
-        *      This is defined in the platform file, and cannot be modified programatically (yet).
-        */
-       boost::unordered_map<std::string, Storage*> const &mounted_storages();
+  /** Retrieves an host from its name. */
+  static s4u::Host *by_name(std::string name);
+  /** Retrieves the host on which the current actor is running */
+  static s4u::Host *current();
+
+  simgrid::xbt::string const& name() const { return name_; }
+
+  /** Turns that host on if it was previously off
+   *
+   * All actors on that host which were marked autorestart will be restarted automatically.
+   * This call does nothing if the host is already on.
+   */
+  void turn_on();
+  /** Turns that host off. All actors are forcefully stopped. */
+  void turn_off();
+  /** Returns if that host is currently up and running */
+  bool is_on();
+  bool is_off() { return !is_on(); }
+
+  double speed();
+  int core_count();
+  xbt_dict_t properties();
+  xbt_swag_t processes();
+  double current_power_peak();
+  double power_peak_at(int pstate_index);
+  void set_pstate(int pstate_index);
+  int pstates_count() const;
+  int pstate();
+  void get_parameters(vm_params_t params);
+  void set_parameters(vm_params_t params);
+  xbt_dict_t mounted_storages_as_dict(); // HACK
+  xbt_dynar_t attached_storages();
+
+  /** Get an associative list [mount point]->[Storage] off all local mount points.
+   *
+   *  This is defined in the platform file, and cannot be modified programatically (yet).
+   */
+  boost::unordered_map<std::string, Storage*> const &mounted_storages();

private:

private:
-       simgrid::xbt::string name_ = "noname";
-       boost::unordered_map<std::string, Storage*> *mounts = NULL; // caching
+  simgrid::xbt::string name_ = "noname";
+  boost::unordered_map<std::string, Storage*> *mounts = NULL; // caching

public:

public:
-       // FIXME: these should be protected, but it leads to many errors
-       // Use the extensions stuff for this? Go through simgrid::surf::Host?
+  // FIXME: these should be protected, but it leads to many errors
+  // Use the extensions stuff for this? Go through simgrid::surf::Host?
// TODO, this could be a unique_ptr
// TODO, this could be a unique_ptr
-       surf::Cpu     *pimpl_cpu = nullptr;
-       surf::NetCard *pimpl_netcard = nullptr;
+  surf::Cpu     *pimpl_cpu = nullptr;
+  surf::NetCard *pimpl_netcard = nullptr;

public:

public:
-       /*** Called on each newly created object */
-       static simgrid::xbt::signal<void(Host&)> onCreation;
-       /*** Called just before destructing an object */
-       static simgrid::xbt::signal<void(Host&)> onDestruction;
-       /*** Called when the machine is turned on or off */
-       static simgrid::xbt::signal<void(Host&)> onStateChange;
+  /*** Called on each newly created object */
+  static simgrid::xbt::signal<void(Host&)> onCreation;
+  /*** Called just before destructing an object */
+  static simgrid::xbt::signal<void(Host&)> onDestruction;
+  /*** Called when the machine is turned on or off */
+  static simgrid::xbt::signal<void(Host&)> onStateChange;
};

}} // namespace simgrid::s4u
};

}} // namespace simgrid::s4u
@@ -134,75 +134,75 @@ import org.simgrid.msg.Storage;
Host jacquelin;

try {
Host jacquelin;

try {
-       jacquelin = Host.getByName("Jacquelin");
+  jacquelin = Host.getByName("Jacquelin");
} catch(HostNotFoundException e) {
} catch(HostNotFoundException e) {
-       System.err.println(e.toString());
+  System.err.println(e.toString());
}
...
\endverbatim
*
*/
public class Host {
}
...
\endverbatim
*
*/
public class Host {
-       /**
-        * This static method returns all of the hosts of the installed platform.
-        *
-        * @return                      An array containing all the hosts installed.
-        *
-        */
-       public native static Host[] all();
-
-       /**
-        * This static method sets a mailbox to receive in asynchronous mode.
-
-        * All messages sent to this mailbox will be transferred to
-        * The receive call will still be necessary to use the received data.
-        * If there is a need to receive some messages asynchronously, and some not,
-        * two different mailboxes should be used.
-        *
-        * @param mailboxName The name of the mailbox
-        */
-       public static native void setAsyncMailbox(String mailboxName);
-
-       /**
-        * This method returns the number of tasks currently running on a host.
-        * The external load (comming from an availability trace) is not taken in account.
-        *
-        * @return                      The number of tasks currently running on a host.
-        */
-
-       /**
-        * This method returns the speed of the processor of a host,
-        * regardless of the current load of the machine.
-        *
-        * @return                      The speed of the processor of the host in flops.
-        *
-        */
-       public native double getSpeed();
-
-       /**
-        * This method returns the number of core of a host.
-        *
-        * @return                      The speed of the processor of the host in flops.
-        *
-        */
-       public native double getCoreNumber();
-
-       /**
-        * Returns the value of a given host property (set from the platform file).
-        */
-       public native String getProperty(String name);
-
-       /**
-        * Change the value of a given host property.
-        */
-       public native void setProperty(String name, String value);
-
-       /** This methods returns the list of storages attached to an host
-        * @return An array containing all storages (name) attached to the host
-        */
-       public native String[] getAttachedStorage();
+  /**
+   * This static method returns all of the hosts of the installed platform.
+   *
+   * @return      An array containing all the hosts installed.
+   *
+   */
+  public native static Host[] all();
+
+  /**
+   * This static method sets a mailbox to receive in asynchronous mode.
+   *
+   * All messages sent to this mailbox will be transferred to
+   * The receive call will still be necessary to use the received data.
+   * If there is a need to receive some messages asynchronously, and some not,
+   * two different mailboxes should be used.
+   *
+   * @param mailboxName The name of the mailbox
+   */
+  public static native void setAsyncMailbox(String mailboxName);
+
+  /**
+   * This method returns the number of tasks currently running on a host.
+   * The external load (comming from an availability trace) is not taken in account.
+   *
+   * @return      The number of tasks currently running on a host.
+   */
+
+  /**
+   * This method returns the speed of the processor of a host,
+   * regardless of the current load of the machine.
+   *
+   * @return      The speed of the processor of the host in flops.
+   *
+   */
+  public native double getSpeed();
+
+  /**
+   * This method returns the number of core of a host.
+   *
+   * @return      The speed of the processor of the host in flops.
+   *
+   */
+  public native double getCoreNumber();
+
+  /**
+   * Returns the value of a given host property (set from the platform file).
+   */
+  public native String getProperty(String name);
+
+  /**
+   * Change the value of a given host property.
+   */
+  public native void setProperty(String name, String value);
+
+  /** This methods returns the list of storages attached to an host
+   * @return An array containing all storages (name) attached to the host
+   */
+  public native String[] getAttachedStorage();

}

}
index 1962201..a2311c7 100644 (file)
@@ -23,26 +23,26 @@ namespace s4u {
*/
XBT_PUBLIC_CLASS Mailbox {
*/
XBT_PUBLIC_CLASS Mailbox {
-       friend Comm;
+  friend Comm;

private:

private:
-       Mailbox(const char*name, smx_rdv_t inferior);
+  Mailbox(const char*name, smx_rdv_t inferior);
public:
public:
-       ~Mailbox();
-
+  ~Mailbox();
+
protected:
protected:
-       smx_rdv_t getInferior() { return p_inferior; }
+  smx_rdv_t getInferior() { return p_inferior; }

public:

public:
-       /** Get the name of that mailbox */
-       const char *getName();
-       /** Retrieve the mailbox associated to the given string */
-       static Mailbox *byName(const char *name);
+  /** Get the name of that mailbox */
+  const char *getName();
+  /** Retrieve the mailbox associated to the given string */
+  static Mailbox *byName(const char *name);

private:

private:
-       std::string p_name;
-       smx_rdv_t p_inferior;
-       static boost::unordered_map<std::string, Mailbox *> *mailboxes;
+  std::string p_name;
+  smx_rdv_t p_inferior;
+  static boost::unordered_map<std::string, Mailbox *> *mailboxes;
};
}} // namespace simgrid::s4u

};
}} // namespace simgrid::s4u

index 66547b8..193a6d2 100644 (file)
@@ -17,18 +17,18 @@ namespace s4u {

XBT_PUBLIC_CLASS Storage {
private:

XBT_PUBLIC_CLASS Storage {
private:
-       Storage(std::string name, smx_storage_t inferior);
-       virtual ~Storage();
+  Storage(std::string name, smx_storage_t inferior);
+  virtual ~Storage();
public:
public:
-       /** Retrieve a Storage by its name. It must exist in the platform file */
-       static Storage &byName(const char* name);
-       const char *name();
-       sg_size_t size_free();
-       sg_size_t size_used();
-       /** Retrieve the total amount of space of this storage element */
-       sg_size_t size();
-
-       /* TODO: missing API:
+  /** Retrieve a Storage by its name. It must exist in the platform file */
+  static Storage &byName(const char* name);
+  const char *name();
+  sg_size_t size_free();
+  sg_size_t size_used();
+  /** Retrieve the total amount of space of this storage element */
+  sg_size_t size();
+
+  /* TODO: missing API:
XBT_PUBLIC(xbt_dict_t) MSG_storage_get_properties(msg_storage_t storage);
XBT_PUBLIC(void) MSG_storage_set_property_value(msg_storage_t storage, const char *name, char *value,void_f_pvoid_t free_ctn);
XBT_PUBLIC(const char *)MSG_storage_get_property_value(msg_storage_t storage, const char *name);
XBT_PUBLIC(xbt_dict_t) MSG_storage_get_properties(msg_storage_t storage);
XBT_PUBLIC(void) MSG_storage_set_property_value(msg_storage_t storage, const char *name, char *value,void_f_pvoid_t free_ctn);
XBT_PUBLIC(const char *)MSG_storage_get_property_value(msg_storage_t storage, const char *name);
@@ -36,20 +36,20 @@ XBT_PUBLIC(xbt_dynar_t) MSG_storages_as_dynar(void);
XBT_PUBLIC(xbt_dict_t) MSG_storage_get_content(msg_storage_t storage);
XBT_PUBLIC(msg_error_t) MSG_storage_file_move(msg_file_t fd, msg_host_t dest, char* mount, char* fullname);
XBT_PUBLIC(const char *) MSG_storage_get_host(msg_storage_t storage);
XBT_PUBLIC(xbt_dict_t) MSG_storage_get_content(msg_storage_t storage);
XBT_PUBLIC(msg_error_t) MSG_storage_file_move(msg_file_t fd, msg_host_t dest, char* mount, char* fullname);
XBT_PUBLIC(const char *) MSG_storage_get_host(msg_storage_t storage);
-        */
+   */
protected:
protected:
-       smx_storage_t inferior();
+  smx_storage_t inferior();
private:
private:
-       static boost::unordered_map<std::string, Storage *> *storages;
-       std::string p_name;
-       smx_storage_t p_inferior;
+  static boost::unordered_map<std::string, Storage *> *storages;
+  std::string p_name;
+  smx_storage_t p_inferior;

public:

public:
-       void set_userdata(void *data) {p_userdata = data;}
-       void *userdata() {return p_userdata;}
+  void set_userdata(void *data) {p_userdata = data;}
+  void *userdata() {return p_userdata;}
private:
private:
-       void *p_userdata = NULL;
+  void *p_userdata = NULL;

};

};

index a1fa369..1180007 100644 (file)
@@ -13,7 +13,7 @@

/* Define _GNU_SOURCE for getline, isfinite, etc. */
#ifndef _GNU_SOURCE

/* Define _GNU_SOURCE for getline, isfinite, etc. */
#ifndef _GNU_SOURCE
-       #define _GNU_SOURCE
+  #define _GNU_SOURCE
#endif

/* Attributes are only in recent versions of GCC */
#endif

/* Attributes are only in recent versions of GCC */
#endif

#ifdef _MSC_VER /* MSVC has no ssize_t, and I fail to use the SSIZE_T declared in BaseTsd.h */
#endif

#ifdef _MSC_VER /* MSVC has no ssize_t, and I fail to use the SSIZE_T declared in BaseTsd.h */
-       #if defined(_WIN64)
-               typedef __int64 ssize_t;
-       #else
-               typedef long ssize_t;
-       #endif
+  #if defined(_WIN64)
+    typedef __int64 ssize_t;
+  #else
+    typedef long ssize_t;
+  #endif

/* Microsoft wants to improve the code quality blah blah blah */
/* See: https://msdn.microsoft.com/en-us/library/8ef0s5kh.aspx */

/* Microsoft wants to improve the code quality blah blah blah */
/* See: https://msdn.microsoft.com/en-us/library/8ef0s5kh.aspx */
-       /* warning C4996: '_strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. */
-       #define _CRT_NONSTDC_NO_WARNINGS
-       /* warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. */
-       #define _CRT_SECURE_NO_WARNINGS
+  /* warning C4996: '_strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. */
+  #define _CRT_NONSTDC_NO_WARNINGS
+  /* warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. */
+  #define _CRT_SECURE_NO_WARNINGS
#endif

#if !defined (max) && !defined(__cplusplus)
#endif

#if !defined (max) && !defined(__cplusplus)
index 78a4815..fbde8e2 100644 (file)
@@ -460,51 +460,51 @@ extern xbt_log_layout_t xbt_log_default_layout;
*  @brief Log an event at the DEBUG priority on the specified category with these args.
*/
#define XBT_CDEBUG(categ, ...) \
*  @brief Log an event at the DEBUG priority on the specified category with these args.
*/
#define XBT_CDEBUG(categ, ...) \
-                 do {                                                                  \
-                   if (XBT_LOG_ISENABLED (categ, xbt_log_priority_debug)) {            \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = &(_XBT_LOGV(categ));                                \
-                     _log_ev.priority = xbt_log_priority_debug;                        \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (XBT_LOG_ISENABLED (categ, xbt_log_priority_debug)) {            \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = &(_XBT_LOGV(categ));                                \
+          _log_ev.priority = xbt_log_priority_debug;                        \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the VERB priority on the specified category with these args.
*/
#define XBT_CVERB(categ, ...)  \

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the VERB priority on the specified category with these args.
*/
#define XBT_CVERB(categ, ...)  \
-                 do {                                                                  \
-                   if (XBT_LOG_ISENABLED (categ, xbt_log_priority_verbose)) {          \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = &(_XBT_LOGV(categ));                                \
-                     _log_ev.priority = xbt_log_priority_verbose;                      \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (XBT_LOG_ISENABLED (categ, xbt_log_priority_verbose)) {          \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = &(_XBT_LOGV(categ));                                \
+          _log_ev.priority = xbt_log_priority_verbose;                      \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the INFO priority on the specified category with these args.
*/
#define XBT_CINFO(categ, ...) \

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the INFO priority on the specified category with these args.
*/
#define XBT_CINFO(categ, ...) \
-                 do {                                                                  \
-                   if (XBT_LOG_ISENABLED (categ, xbt_log_priority_info)) {             \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = &(_XBT_LOGV(categ));                                \
-                     _log_ev.priority = xbt_log_priority_info;                         \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (XBT_LOG_ISENABLED (categ, xbt_log_priority_info)) {             \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = &(_XBT_LOGV(categ));                                \
+          _log_ev.priority = xbt_log_priority_info;                         \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log

/** @ingroup XBT_log
@@ -512,17 +512,17 @@ extern xbt_log_layout_t xbt_log_default_layout;
*  @brief Log an event at the WARN priority on the specified category with these args.
*/
#define XBT_CWARN(categ, ...) \
*  @brief Log an event at the WARN priority on the specified category with these args.
*/
#define XBT_CWARN(categ, ...) \
-                 do {                                                                  \
-                   if (XBT_LOG_ISENABLED (categ, xbt_log_priority_warning)) {          \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = &(_XBT_LOGV(categ));                                \
-                     _log_ev.priority = xbt_log_priority_warning;                      \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (XBT_LOG_ISENABLED (categ, xbt_log_priority_warning)) {          \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = &(_XBT_LOGV(categ));                                \
+          _log_ev.priority = xbt_log_priority_warning;                      \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log

/** @ingroup XBT_log
@@ -530,34 +530,34 @@ extern xbt_log_layout_t xbt_log_default_layout;
*  @brief Log an event at the ERROR priority on the specified category with these args.
*/
#define XBT_CERROR(categ, ...) \
*  @brief Log an event at the ERROR priority on the specified category with these args.
*/
#define XBT_CERROR(categ, ...) \
-                 do {                                                                  \
-                   if (XBT_LOG_ISENABLED (categ, xbt_log_priority_error)) {            \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = &(_XBT_LOGV(categ));                                \
-                     _log_ev.priority = xbt_log_priority_error;                        \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (XBT_LOG_ISENABLED (categ, xbt_log_priority_error)) {            \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = &(_XBT_LOGV(categ));                                \
+          _log_ev.priority = xbt_log_priority_error;                        \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the CRITICAL priority on the specified category with these args (CCRITICALn exists for any n<10).
*/
#define XBT_CCRITICAL(categ, ...) \

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the CRITICAL priority on the specified category with these args (CCRITICALn exists for any n<10).
*/
#define XBT_CCRITICAL(categ, ...) \
-                 do {                                                                  \
-                   if (XBT_LOG_ISENABLED (categ, xbt_log_priority_critical)) {         \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = &(_XBT_LOGV(categ));                                \
-                     _log_ev.priority = xbt_log_priority_critical;                     \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (XBT_LOG_ISENABLED (categ, xbt_log_priority_critical)) {         \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = &(_XBT_LOGV(categ));                                \
+          _log_ev.priority = xbt_log_priority_critical;                     \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log
*  @hideinitializer

/** @ingroup XBT_log
*  @hideinitializer
@@ -565,108 +565,108 @@ extern xbt_log_layout_t xbt_log_default_layout;
*  @brief Log an event at the DEBUG priority on the default category with these args.
*/
#define XBT_DEBUG(...) \
*  @brief Log an event at the DEBUG priority on the default category with these args.
*/
#define XBT_DEBUG(...) \
-                 do {                                                                  \
-                   if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
-                                               xbt_log_priority_debug)) {                  \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = _simgrid_log_category__default;                     \
-                     _log_ev.priority = xbt_log_priority_debug;                        \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
+                            xbt_log_priority_debug)) {                  \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = _simgrid_log_category__default;                     \
+          _log_ev.priority = xbt_log_priority_debug;                        \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the VERB priority on the default category with these args.
*/
#define XBT_VERB(...) \

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the VERB priority on the default category with these args.
*/
#define XBT_VERB(...) \
-                 do {                                                                  \
-                   if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
-                                               xbt_log_priority_verbose)) {                \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = _simgrid_log_category__default;                     \
-                     _log_ev.priority = xbt_log_priority_verbose;                      \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
+                            xbt_log_priority_verbose)) {                \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = _simgrid_log_category__default;                     \
+          _log_ev.priority = xbt_log_priority_verbose;                      \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the INFO priority on the default category with these args.
*/
#define XBT_INFO(...) \

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the INFO priority on the default category with these args.
*/
#define XBT_INFO(...) \
-                 do {                                                                  \
-                   if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
-                                               xbt_log_priority_info)) {                   \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = _simgrid_log_category__default;                     \
-                     _log_ev.priority = xbt_log_priority_info;                         \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
+                            xbt_log_priority_info)) {                   \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = _simgrid_log_category__default;                     \
+          _log_ev.priority = xbt_log_priority_info;                         \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the WARN priority on the default category with these args.
*/
#define XBT_WARN(...) \

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the WARN priority on the default category with these args.
*/
#define XBT_WARN(...) \
-                 do {                                                                  \
-                   if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
-                                               xbt_log_priority_warning)) {                \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = _simgrid_log_category__default;                     \
-                     _log_ev.priority = xbt_log_priority_warning;                      \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
+                            xbt_log_priority_warning)) {                \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = _simgrid_log_category__default;                     \
+          _log_ev.priority = xbt_log_priority_warning;                      \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the ERROR priority on the default category with these args.
*/
#define XBT_ERROR(...) \

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the ERROR priority on the default category with these args.
*/
#define XBT_ERROR(...) \
-                 do {                                                                  \
-                   if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
-                                               xbt_log_priority_error)) {                  \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = _simgrid_log_category__default;                     \
-                     _log_ev.priority = xbt_log_priority_error;                        \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
+                            xbt_log_priority_error)) {                  \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = _simgrid_log_category__default;                     \
+          _log_ev.priority = xbt_log_priority_error;                        \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the CRITICAL priority on the default category with these args.
*/
#define XBT_CRITICAL(...) \

/** @ingroup XBT_log
*  @hideinitializer
*  @brief Log an event at the CRITICAL priority on the default category with these args.
*/
#define XBT_CRITICAL(...) \
-                 do {                                                                  \
-                   if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
-                                               xbt_log_priority_critical)) {               \
-                     s_xbt_log_event_t _log_ev;                                        \
-                     _log_ev.cat = _simgrid_log_category__default;                     \
-                     _log_ev.priority = xbt_log_priority_critical;                     \
-                     _log_ev.fileName = __FILE__;                                      \
-                     _log_ev.functionName = _XBT_FUNCTION;                             \
-                     _log_ev.lineNum = __LINE__;                                       \
-                     _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
-                   }                                                                   \
-                 }  while (0)
+      do {                                                                  \
+        if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default,            \
+                            xbt_log_priority_critical)) {               \
+          s_xbt_log_event_t _log_ev;                                        \
+          _log_ev.cat = _simgrid_log_category__default;                     \
+          _log_ev.priority = xbt_log_priority_critical;                     \
+          _log_ev.fileName = __FILE__;                                      \
+          _log_ev.functionName = _XBT_FUNCTION;                             \
+          _log_ev.lineNum = __LINE__;                                       \
+          _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
+        }                                                                   \
+      }  while (0)

#define _XBT_IN_OUT(...) \
_XBT_IF_ONE_ARG(_XBT_IN_OUT_ARG1, _XBT_IN_OUT_ARGN, __VA_ARGS__)(__VA_ARGS__)

#define _XBT_IN_OUT(...) \
_XBT_IF_ONE_ARG(_XBT_IN_OUT_ARG1, _XBT_IN_OUT_ARGN, __VA_ARGS__)(__VA_ARGS__)
@@ -25,14 +25,14 @@ JNIEnv *get_current_thread_env(void);
void jmsg_throw_status(JNIEnv *env, msg_error_t status);

/*
void jmsg_throw_status(JNIEnv *env, msg_error_t status);

/*
- * Class               org_simgrid_msg_Msg
- * Method              getClock
- * Signature   ()D
+ * Class    org_simgrid_msg_Msg
+ * Method    getClock
+ * Signature  ()D
*/
JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv *, jclass);
/**
*/
JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv *, jclass);
/**
- * Class               org_simgrid_msg_Msg
- * Method              run
+ * Class    org_simgrid_msg_Msg
+ * Method    run
*/
JNIEXPORT void JNICALL
JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls);
*/
JNIEXPORT void JNICALL
JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls);
index ea88343..2d92f7a 100644 (file)
@@ -18,34 +18,34 @@ jfieldID jfile_field_bind;
void jfile_bind(JNIEnv *env, jobject jfile, msg_file_t fd);
msg_file_t jfile_get_native(JNIEnv *env, jobject jfile);
/**
void jfile_bind(JNIEnv *env, jobject jfile, msg_file_t fd);
msg_file_t jfile_get_native(JNIEnv *env, jobject jfile);
/**
- * Class                       org_simgrid_msg_File
- * Method                      nativeInit
- * Signature   ()V
+ * Class      org_simgrid_msg_File
+ * Method      nativeInit
+ * Signature  ()V
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_File_nativeInit(JNIEnv*, jclass);
/**
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_File_nativeInit(JNIEnv*, jclass);
/**
- * Class                       org_simgrid_msg_File
- * Method                      open
- * Signature   (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+ * Class      org_simgrid_msg_File
+ * Method      open
+ * Signature  (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_File_open(JNIEnv*, jobject, jobject);
/**
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_File_open(JNIEnv*, jobject, jobject);
/**
- * Class                       org_simgrid_msg_File
+ * Class       org_simgrid_msg_File
*/
JNIEXPORT jlong JNICALL
/**
*/
JNIEXPORT jlong JNICALL
/**
- * Class                       org_simgrid_msg_File
- * Method                      write
+ * Class      org_simgrid_msg_File
+ * Method      write
*/
JNIEXPORT jlong JNICALL
Java_org_simgrid_msg_File_write(JNIEnv*, jobject, jlong);
/**
*/
JNIEXPORT jlong JNICALL
Java_org_simgrid_msg_File_write(JNIEnv*, jobject, jlong);
/**
- * Class                       org_simgrid_msg_File
- * Method                      close
+ * Class      org_simgrid_msg_File
+ * Method      close
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_File_close(JNIEnv*, jobject);
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_File_close(JNIEnv*, jobject);
index 55cc4a1..1d6e240 100644 (file)
@@ -72,8 +72,8 @@ Java_org_simgrid_msg_Host_getByName(JNIEnv * env, jclass cls,

/* get the C string from the java string */
if (jname == NULL) {

/* get the C string from the java string */
if (jname == NULL) {
-       jxbt_throw_null(env,bprintf("No host can have a null name"));
-       return NULL;
+    jxbt_throw_null(env,bprintf("No host can have a null name"));
+    return NULL;
}
const char *name = env->GetStringUTFChars(jname, 0);
/* get the host by name       (the hosts are created during the grid resolution) */
}
const char *name = env->GetStringUTFChars(jname, 0);
/* get the host by name       (the hosts are created during the grid resolution) */
@@ -267,29 +267,29 @@ Java_org_simgrid_msg_Host_getMountedStorage(JNIEnv * env, jobject jhost){
}

int index = 0;
}

int index = 0;
-       jobjectArray jtable;
-       xbt_dict_t dict =  MSG_host_get_mounted_storage_list(host);
-       int count = xbt_dict_length(dict);
-       jclass cls = env->FindClass("org/simgrid/msg/Storage");
+  jobjectArray jtable;
+  xbt_dict_t dict =  MSG_host_get_mounted_storage_list(host);
+  int count = xbt_dict_length(dict);
+  jclass cls = env->FindClass("org/simgrid/msg/Storage");

-       jtable = env->NewObjectArray((jsize) count, cls, NULL);
+  jtable = env->NewObjectArray((jsize) count, cls, NULL);

-       if (!jtable) {
-        jxbt_throw_jni(env, "Storages table allocation failed");
-        return NULL;
-       }
+  if (!jtable) {
+   jxbt_throw_jni(env, "Storages table allocation failed");
+   return NULL;
+  }

-       xbt_dict_cursor_t cursor=NULL;
-       const char *mount_name, *storage_name;
+  xbt_dict_cursor_t cursor=NULL;
+  const char *mount_name, *storage_name;

-       xbt_dict_foreach(dict,cursor,mount_name,storage_name) {
-               jname = env->NewStringUTF(storage_name);
-         jstorage = Java_org_simgrid_msg_Storage_getByName(env,cls,jname);
-         env->SetObjectArrayElement(jtable, index, jstorage);
+  xbt_dict_foreach(dict,cursor,mount_name,storage_name) {
+    jname = env->NewStringUTF(storage_name);
+    jstorage = Java_org_simgrid_msg_Storage_getByName(env,cls,jname);
+    env->SetObjectArrayElement(jtable, index, jstorage);
index++;
index++;
-       }
-       xbt_dict_free(&dict);
-       return jtable;
+  }
+  xbt_dict_free(&dict);
+  return jtable;
}

JNIEXPORT jobjectArray JNICALL
}

JNIEXPORT jobjectArray JNICALL
@@ -363,7 +363,7 @@ Java_org_simgrid_msg_Host_all(JNIEnv * env, jclass cls_arg)
jname = env->NewStringUTF(MSG_host_get_name(host));

jhost =
jname = env->NewStringUTF(MSG_host_get_name(host));

jhost =
-               Java_org_simgrid_msg_Host_getByName(env, cls_arg, jname);
+          Java_org_simgrid_msg_Host_getByName(env, cls_arg, jname);
/* FIXME: leak of jname ? */
}

/* FIXME: leak of jname ? */
}

index 5a342f2..327940c 100644 (file)
@@ -17,14 +17,14 @@ SG_BEGIN_DECL()
/**
* This function returns a new java host instance.
*
/**
* This function returns a new java host instance.
*
- * @param env                  The environment of the current thread
+ * @param env      The environment of the current thread
*
*
- * @return                             A new java host object.
+ * @return        A new java host object.
*
*
- * @exception                  If the class Host is not found the function throws
- *                                             the ClassNotFoundException. If the constructor of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchMethodException.
+ * @exception      If the class Host is not found the function throws
+ *            the ClassNotFoundException. If the constructor of
+ *            this class is not found the function throws the exception
+ *            NotSuchMethodException.
*/
jobject jhost_new_instance(JNIEnv * env);

*/
jobject jhost_new_instance(JNIEnv * env);

@@ -32,58 +32,58 @@ jobject jhost_new_instance(JNIEnv * env);
* This function returns a global reference to the  java host instance
* specified by the parameter jhost.
*
* This function returns a global reference to the  java host instance
* specified by the parameter jhost.
*
- * @param jhost                        The original java host instance.
- * @param env                  The environment of the current thread
+ * @param jhost      The original java host instance.
+ * @param env      The environment of the current thread
*
*
- * @return                             The global reference to the original java host
- *                                             instance.
+ * @return        The global reference to the original java host
+ *            instance.
*/
jobject jhost_ref(JNIEnv * env, jobject jhost);
/**
* This function delete a global reference to a java host instance.
*
*/
jobject jhost_ref(JNIEnv * env, jobject jhost);
/**
* This function delete a global reference to a java host instance.
*
- * @param                              The global refernce to delete.
- * @param env                  The environment of the current thread
+ * @param        The global refernce to delete.
+ * @param env      The environment of the current thread
*/
void jhost_unref(JNIEnv * env, jobject jhost);

/**
* This function associated a native host to a java host instance.
*
*/
void jhost_unref(JNIEnv * env, jobject jhost);

/**
* This function associated a native host to a java host instance.
*
- * @param jhost                        The java host instance.
- * @param host                 The native host to bind.
- * @param env                  The environment of the current thread
+ * @param jhost      The java host instance.
+ * @param host      The native host to bind.
+ * @param env      The environment of the current thread
*
*
- * @exception                  If the class Host is not found the function throws
- *                                             the ClassNotFoundException. If the field bind of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Host is not found the function throws
+ *            the ClassNotFoundException. If the field bind of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*/
void jhost_bind(jobject jhost, msg_host_t host, JNIEnv * env);

/**
* This function returns a native host from a java host instance.
*
*/
void jhost_bind(jobject jhost, msg_host_t host, JNIEnv * env);

/**
* This function returns a native host from a java host instance.
*
- * @param jhost                        The java host object from which get the native host.
- * @param env                  The environment of the current thread
+ * @param jhost      The java host object from which get the native host.
+ * @param env      The environment of the current thread
*
*
- * @return                             The function returns the native host associated to the
- *                                             java host object.
+ * @return        The function returns the native host associated to the
+ *            java host object.
*
*
- * @exception                  If the class Host is not found the function throws
- *                                             the ClassNotFoundException. If the field bind of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Host is not found the function throws
+ *            the ClassNotFoundException. If the field bind of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*/
msg_host_t jhost_get_native(JNIEnv * env, jobject jhost);

/**
* This function returns the name of a MSG host.
*
*/
msg_host_t jhost_get_native(JNIEnv * env, jobject jhost);

/**
* This function returns the name of a MSG host.
*
- * @param jhost                        A java host object.
- * @param env                  The environment of the current thread
+ * @param jhost      A java host object.
+ * @param env      The environment of the current thread
*
*
- * @return                             The name of the host.
+ * @return        The name of the host.
*/
const char *jhost_get_name(jobject jhost, JNIEnv * env);

*/
const char *jhost_get_name(jobject jhost, JNIEnv * env);

@@ -91,25 +91,25 @@ const char *jhost_get_name(jobject jhost, JNIEnv * env);
* This function tests if a java host instance is valid.
* A java host object is valid if it is bind to a native host.
*
* This function tests if a java host instance is valid.
* A java host object is valid if it is bind to a native host.
*
- * @param jhost                        The host to test the validity.
- * @param env                  The environment of the current thread
+ * @param jhost      The host to test the validity.
+ * @param env      The environment of the current thread
*
*
- * @return                             If the java host is valid the function returns true.
- *                                             Otherwise the function returns false.
+ * @return        If the java host is valid the function returns true.
+ *            Otherwise the function returns false.
*/
jboolean jhost_is_valid(jobject jhost, JNIEnv * env);
/*
*/
jboolean jhost_is_valid(jobject jhost, JNIEnv * env);
/*
- * Class               org_simgrid_msg_Host
- * Method              nativeInit
- * Signature   ();
+ * Class    org_simgrid_msg_Host
+ * Method    nativeInit
+ * Signature  ();
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Host_nativeInit(JNIEnv *env, jclass cls);

/*
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Host_nativeInit(JNIEnv *env, jclass cls);

/*
- * Class               org_simgrid_msg_Host
- * Method              getByName
- * Signature   (Ljava/lang/String;)Lsimgrid/msg/Host;
+ * Class    org_simgrid_msg_Host
+ * Method    getByName
+ * Signature  (Ljava/lang/String;)Lsimgrid/msg/Host;
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_getByName
(JNIEnv *, jclass, jstring);
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_getByName
(JNIEnv *, jclass, jstring);
@@ -117,8 +117,8 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_getByName
/**
* This function start the host if it is off
*
/**
* This function start the host if it is off
*
- * @param jhost                        The host to test the validity.
- * @param env                  The environment of the current thread
+ * @param jhost      The host to test the validity.
+ * @param env      The environment of the current thread
*
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_on(JNIEnv *env, jobject jhost);
*
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_on(JNIEnv *env, jobject jhost);
@@ -126,38 +126,38 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_on(JNIEnv *env, jobject jhost);
/**
* This function stop the host if it is on
*
/**
* This function stop the host if it is on
*
- * @param jhost                        The host to test the validity.
- * @param env                  The environment of the current thread
+ * @param jhost      The host to test the validity.
+ * @param env      The environment of the current thread
*
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_off(JNIEnv *env, jobject jhost);

/*
*
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_off(JNIEnv *env, jobject jhost);

/*
- * Class               org_simgrid_msg_Host
- * Method              currentHost
- * Signature   ()Lsimgrid/msg/Host;
+ * Class    org_simgrid_msg_Host
+ * Method    currentHost
+ * Signature  ()Lsimgrid/msg/Host;
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_currentHost
(JNIEnv *, jclass);
/*
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Host_currentHost
(JNIEnv *, jclass);
/*
- * Class               org_simgrid_msg_Host
- * Method              getCount
- * Signature   ()I
+ * Class    org_simgrid_msg_Host
+ * Method    getCount
+ * Signature  ()I
*/
JNIEXPORT jint JNICALL Java_org_simgrid_msg_Host_getCount
(JNIEnv *, jclass);

/*
*/
JNIEXPORT jint JNICALL Java_org_simgrid_msg_Host_getCount
(JNIEnv *, jclass);

/*
- * Class               org_simgrid_msg_Host
- * Method              getSpeed
- * Signature   ()D
+ * Class    org_simgrid_msg_Host
+ * Method    getSpeed
+ * Signature  ()D
*/
JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Host_getSpeed
(JNIEnv *, jobject);
/*
*/
JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Host_getSpeed
(JNIEnv *, jobject);
/*
- * Class               org_simgrid_msg_Host
- * Method              getCoreNumber
- * Signature   ()D
+ * Class    org_simgrid_msg_Host
+ * Method    getCoreNumber
+ * Signature  ()D
*/
JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Host_getCoreNumber
(JNIEnv *, jobject);
*/
JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Host_getCoreNumber
(JNIEnv *, jobject);
@@ -176,30 +176,30 @@ Java_org_simgrid_msg_Host_getProperty(JNIEnv *env, jobject jhost, jobject jname)
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Host_setProperty(JNIEnv *env, jobject jhost, jobject jname, jobject jvalue);
/*
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Host_setProperty(JNIEnv *env, jobject jhost, jobject jname, jobject jvalue);
/*
- * Class               org_simgrid_msg_Host
- * Method              isOn
- * Signature   ()Z
+ * Class    org_simgrid_msg_Host
+ * Method    isOn
+ * Signature  ()Z
*/
JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Host_isOn
(JNIEnv *, jobject);

/*
*/
JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Host_isOn
(JNIEnv *, jobject);

/*
- * Class               org_simgrid_msg_Host
- * Method              getMountedStorage
+ * Class    org_simgrid_msg_Host
+ * Method    getMountedStorage
* Signature: ()[Lorg/simgrid/msg/Storage;
*/
JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_getMountedStorage(JNIEnv * env, jobject jhost);

/*
* Signature: ()[Lorg/simgrid/msg/Storage;
*/
JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_getMountedStorage(JNIEnv * env, jobject jhost);

/*
- * Class               org_simgrid_msg_Host
- * Method              getAttachedStorageList
+ * Class    org_simgrid_msg_Host
+ * Method    getAttachedStorageList
*/
JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_getAttachedStorage(JNIEnv * env, jobject jhost);

/*
*/
JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_getAttachedStorage(JNIEnv * env, jobject jhost);

/*
- * Class               org_simgrid_msg_Host
- * Method              getStorageContent
+ * Class    org_simgrid_msg_Host
+ * Method    getStorageContent
*/
JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_getStorageContent(JNIEnv * env, jobject jhost);

*/
JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_Host_getStorageContent(JNIEnv * env, jobject jhost);

index 601733f..05491e3 100644 (file)
@@ -49,10 +49,10 @@ void jprocess_delete_global_ref(jobject jprocess, JNIEnv * env)

void jprocess_join(jobject jprocess, JNIEnv * env)
{

void jprocess_join(jobject jprocess, JNIEnv * env)
{
-       msg_process_t process = jprocess_to_native_process(jprocess,env);
-       simgrid::java::JavaContext* context =
+  msg_process_t process = jprocess_to_native_process(jprocess,env);
+  simgrid::java::JavaContext* context =
(simgrid::java::JavaContext*) MSG_process_get_smx_ctx(process);
(simgrid::java::JavaContext*) MSG_process_get_smx_ctx(process);
}

msg_process_t jprocess_to_native_process(jobject jprocess, JNIEnv * env)
}

msg_process_t jprocess_to_native_process(jobject jprocess, JNIEnv * env)
@@ -161,9 +161,9 @@ Java_org_simgrid_msg_Process_create(JNIEnv * env,
simgrid::java::java_main_jprocess(jprocess);
return 0;
}, jprocess,
simgrid::java::java_main_jprocess(jprocess);
return 0;
}, jprocess,
-                                               host,
-                                               /*argc, argv, properties*/
-                                               0, NULL, NULL);
+            host,
+            /*argc, argv, properties*/
+            0, NULL, NULL);
MSG_process_set_kill_time(process, (double)jkill);
/* bind the java process instance to the native process */
jprocess_bind(jprocess, process, env);
MSG_process_set_kill_time(process, (double)jkill);
/* bind the java process instance to the native process */
jprocess_bind(jprocess, process, env);
@@ -376,14 +376,14 @@ JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_kill(JNIEnv * env,
jobject jprocess)
{
Java_org_simgrid_msg_Process_kill(JNIEnv * env,
jobject jprocess)
{
-       /* get the native instances from the java ones */
+  /* get the native instances from the java ones */
msg_process_t process = jprocess_to_native_process(jprocess, env);
if (!process) {
jxbt_throw_notbound(env, "process", jprocess);
return;
}

msg_process_t process = jprocess_to_native_process(jprocess, env);
if (!process) {
jxbt_throw_notbound(env, "process", jprocess);
return;
}

-       MSG_process_kill(process);
+  MSG_process_kill(process);
}
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_migrate(JNIEnv * env,
}
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_migrate(JNIEnv * env,
@@ -414,8 +414,8 @@ Java_org_simgrid_msg_Process_migrate(JNIEnv * env,
}
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_setKillTime (JNIEnv *env , jobject jprocess, jdouble jkilltime) {
}
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_setKillTime (JNIEnv *env , jobject jprocess, jdouble jkilltime) {
-       msg_process_t process = jprocess_to_native_process(jprocess, env);
-       MSG_process_set_kill_time(process, (double)jkilltime);
+  msg_process_t process = jprocess_to_native_process(jprocess, env);
+  MSG_process_set_kill_time(process, (double)jkilltime);
}

JNIEXPORT jint JNICALL
}

JNIEXPORT jint JNICALL
index 7cd3c65..145f830 100644 (file)
@@ -34,11 +34,11 @@ jobject native_to_java_process(msg_process_t process);
* This function returns a global reference to the  java process instance
* specified by the parameter jprocess.
*
* This function returns a global reference to the  java process instance
* specified by the parameter jprocess.
*
- * @param jprocess             The original java process instance.
- * @param env                  The env of the current thread
+ * @param jprocess    The original java process instance.
+ * @param env      The env of the current thread
*
*
- * @return                             The global reference to the original java process
- *                                             instance.
+ * @return        The global reference to the original java process
+ *            instance.
*/
jobject jprocess_new_global_ref(jobject jprocess, JNIEnv * env);

*/
jobject jprocess_new_global_ref(jobject jprocess, JNIEnv * env);

@@ -46,11 +46,11 @@ jobject jprocess_new_global_ref(jobject jprocess, JNIEnv * env);
* This function delete a global reference to a java process instance.
* If the java process is alive the function joins it and stops it before.
*
* This function delete a global reference to a java process instance.
* If the java process is alive the function joins it and stops it before.
*
- * @param                              The global refernce to delete.
- * @param env                  The env of the current thread
+ * @param        The global refernce to delete.
+ * @param env      The env of the current thread
*
*
- * @see                                        jprocess_join()
- * @see                                        jprocess_exit()
+ * @see          jprocess_join()
+ * @see          jprocess_exit()
*/
void jprocess_delete_global_ref(jobject jprocess, JNIEnv * env);

*/
void jprocess_delete_global_ref(jobject jprocess, JNIEnv * env);

@@ -58,58 +58,58 @@ void jprocess_delete_global_ref(jobject jprocess, JNIEnv * env);
/**
* This function waits for a java process to terminate.
*
/**
* This function waits for a java process to terminate.
*
- * @param jprocess             The java process ot wait for.
- * @param env                  The env of the current thread
+ * @param jprocess    The java process ot wait for.
+ * @param env      The env of the current thread
*
*
- * @exception                  If the class Process is not found the function throws
- *                                             the ClassNotFoundException. If the methos join() of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchMethodException.
+ * @exception      If the class Process is not found the function throws
+ *            the ClassNotFoundException. If the methos join() of
+ *            this class is not found the function throws the exception
+ *            NotSuchMethodException.
*
*/
void jprocess_join(jobject jprocess, JNIEnv * env);
/**
* This function associated a native process to a java process instance.
*
*
*/
void jprocess_join(jobject jprocess, JNIEnv * env);
/**
* This function associated a native process to a java process instance.
*
- * @param jprocess             The java process instance.
- * @param process              The native process to bind.
- * @param env                  The env of the current thread
+ * @param jprocess    The java process instance.
+ * @param process    The native process to bind.
+ * @param env      The env of the current thread
*
*
- * @exception                  If the class Process is not found the function throws
- *                                             the ClassNotFoundException. If the field bind of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Process is not found the function throws
+ *            the ClassNotFoundException. If the field bind of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*/
void jprocess_bind(jobject jprocess, msg_process_t process, JNIEnv * env);

/**
* This function returns a native process from a java process instance.
*
*/
void jprocess_bind(jobject jprocess, msg_process_t process, JNIEnv * env);

/**
* This function returns a native process from a java process instance.
*
- * @param jprocess             The java process object from which get the native process.
- * @param env                  The env of the current thread
+ * @param jprocess    The java process object from which get the native process.
+ * @param env      The env of the current thread
*
*
- * @return                             The function returns the native process associated to the
- *                                             java process object.
+ * @return        The function returns the native process associated to the
+ *            java process object.
*
*
- * @exception                  If the class Process is not found the function throws
- *                                             the ClassNotFoundException. If the field bind of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Process is not found the function throws
+ *            the ClassNotFoundException. If the field bind of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*/
msg_process_t jprocess_to_native_process(jobject jprocess, JNIEnv * env);

/**
* This function gets the id of the specified java process.
*
*/
msg_process_t jprocess_to_native_process(jobject jprocess, JNIEnv * env);

/**
* This function gets the id of the specified java process.
*
- * @param jprocess             The java process to get the id.
- * @param env                  The env of the current thread
+ * @param jprocess    The java process to get the id.
+ * @param env      The env of the current thread
*
*
- * @exception                  If the class Process is not found the function throws
- *                                             the ClassNotFoundException. If the field id of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Process is not found the function throws
+ *            the ClassNotFoundException. If the field id of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*
*
- * @return                             The id of the specified java process.
+ * @return        The id of the specified java process.
*/
jlong jprocess_get_id(jobject jprocess, JNIEnv * env);

*/
jlong jprocess_get_id(jobject jprocess, JNIEnv * env);

@@ -118,41 +118,41 @@ jlong jprocess_get_id(jobject jprocess, JNIEnv * env);
* A java process object is valid if it is bind to a native
* process.
*
* A java process object is valid if it is bind to a native
* process.
*
- * @param jprocess             The java process to test the validity.
- * @param env                  The env of the current thread
+ * @param jprocess    The java process to test the validity.
+ * @param env      The env of the current thread
*
*
- * @return                             If the java process is valid the function returns true.
- *                                             Otherwise the function returns false.
+ * @return        If the java process is valid the function returns true.
+ *            Otherwise the function returns false.
*/
jboolean jprocess_is_valid(jobject jprocess, JNIEnv * env);

/**
* This function gets the name of the specified java process.
*
*/
jboolean jprocess_is_valid(jobject jprocess, JNIEnv * env);

/**
* This function gets the name of the specified java process.
*
- * @param jprocess             The java process to get the name.
- * @param env                  The env of the current thread
+ * @param jprocess    The java process to get the name.
+ * @param env      The env of the current thread
*
*
- * @exception                  If the class Process is not found the function throws
- *                                             the ClassNotFoundException. If the field name of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Process is not found the function throws
+ *            the ClassNotFoundException. If the field name of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*
*
- * @return                             The name of the specified java process.
+ * @return        The name of the specified java process.
*/
jstring jprocess_get_name(jobject jprocess, JNIEnv * env);

/*
*/
jstring jprocess_get_name(jobject jprocess, JNIEnv * env);

/*
- * Class               org_simgrid_msg_Process
- * Method              nativeInit
- * Signature   ();
+ * Class    org_simgrid_msg_Process
+ * Method    nativeInit
+ * Signature  ();
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_nativeInit(JNIEnv *env, jclass cls);

/*
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_nativeInit(JNIEnv *env, jclass cls);

/*
- * Class               org_simgrid_msg_Process
- * Method              create
- * Signature   (Lorg/simgrid/msg/Host;)V
+ * Class    org_simgrid_msg_Process
+ * Method    create
+ * Signature  (Lorg/simgrid/msg/Host;)V
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_create(JNIEnv * env,
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_create(JNIEnv * env,
@@ -160,17 +160,17 @@ Java_org_simgrid_msg_Process_create(JNIEnv * env,
jobject jhostname);

/*
jobject jhostname);

/*
- * Class               org_simgrid_msg_Process
- * Method              killAll
- * Signature   (I)I
+ * Class    org_simgrid_msg_Process
+ * Method    killAll
+ * Signature  (I)I
*/
JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_killAll
(JNIEnv *, jclass, jint);

/*
*/
JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_killAll
(JNIEnv *, jclass, jint);

/*
- * Class               org_simgrid_msg_Process
- * Method              fromPID
- * Signature   (I)Lorg/simgrid/msg/Process;
+ * Class    org_simgrid_msg_Process
+ * Method    fromPID
+ * Signature  (I)Lorg/simgrid/msg/Process;
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_fromPID
(JNIEnv *, jclass, jint);
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_fromPID
(JNIEnv *, jclass, jint);
@@ -182,24 +182,24 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_fromPID
JNIEXPORT jobject JNICALL
Java_org_simgrid_msg_Process_getProperty(JNIEnv *env, jobject jprocess, jobject jname);
/*
JNIEXPORT jobject JNICALL
Java_org_simgrid_msg_Process_getProperty(JNIEnv *env, jobject jprocess, jobject jname);
/*
- * Class               org_simgrid_msg_Process
- * Method              currentProcess
- * Signature   ()Lorg/simgrid/msg/Process;
+ * Class    org_simgrid_msg_Process
+ * Method    currentProcess
+ * Signature  ()Lorg/simgrid/msg/Process;
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_getCurrentProcess
(JNIEnv *, jclass);
/*
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_getCurrentProcess
(JNIEnv *, jclass);
/*
- * Class               org_simgrid_msg_Process
- * Method              suspend
- * Signature   (Lorg/simgrid/msg/Process;)V
+ * Class    org_simgrid_msg_Process
+ * Method    suspend
+ * Signature  (Lorg/simgrid/msg/Process;)V
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_suspend(JNIEnv * env,
jobject jprocess);
/*
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Process_suspend(JNIEnv * env,
jobject jprocess);
/*
- * Class               org_simgrid_msg_Process
- * Method              resume
- * Signature   (Lorg/simgrid/msg/Process;)V
+ * Class    org_simgrid_msg_Process
+ * Method    resume
+ * Signature  (Lorg/simgrid/msg/Process;)V
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_resume
(JNIEnv *, jobject);
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_resume
(JNIEnv *, jobject);
@@ -219,46 +219,46 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_restart
(JNIEnv *, jobject);

/*
(JNIEnv *, jobject);

/*
- * Class               org_simgrid_msg_Process
- * Method              isSuspended
- * Signature   (Lorg/simgrid/msg/Process;)Z
+ * Class    org_simgrid_msg_Process
+ * Method    isSuspended
+ * Signature  (Lorg/simgrid/msg/Process;)Z
*/
JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Process_isSuspended
(JNIEnv *, jobject);
/*
*/
JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Process_isSuspended
(JNIEnv *, jobject);
/*
- * Class               org_simgrid_msg_Process
- * Method              sleep
- * Signature   (DI)V
+ * Class    org_simgrid_msg_Process
+ * Method    sleep
+ * Signature  (DI)V
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_sleep
(JNIEnv *, jclass, jlong, jint);

/*
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_sleep
(JNIEnv *, jclass, jlong, jint);

/*
- * Class               org_simgrid_msg_Process
- * Method              waitFor
- * Signature   (D)V
+ * Class    org_simgrid_msg_Process
+ * Method    waitFor
+ * Signature  (D)V
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_waitFor
(JNIEnv *, jobject, jdouble);
/*
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_waitFor
(JNIEnv *, jobject, jdouble);
/*
- * Class               org_simgrid_msg_Process
- * Method              kill
- * Signature   (Lorg/simgrid/msg/Process;)V
+ * Class    org_simgrid_msg_Process
+ * Method    kill
+ * Signature  (Lorg/simgrid/msg/Process;)V
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_kill
(JNIEnv *, jobject);

/*
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_kill
(JNIEnv *, jobject);

/*
- * Class               org_simgrid_msg_Process
- * Method              migrate
- * Signature   (Lorg/simgrid/msg/Host;)V
+ * Class    org_simgrid_msg_Process
+ * Method    migrate
+ * Signature  (Lorg/simgrid/msg/Host;)V
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_migrate
(JNIEnv *, jobject, jobject);
/*
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_migrate
(JNIEnv *, jobject, jobject);
/*
- * Class               org_simgrid_msg_Process
- * Method              setKillTime
- * Signature   (D)V
+ * Class    org_simgrid_msg_Process
+ * Method    setKillTime
+ * Signature  (D)V
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_setKillTime
(JNIEnv *, jobject, jdouble);
*/
JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_setKillTime
(JNIEnv *, jobject, jdouble);
index 299b34a..cc3b39b 100644 (file)
@@ -65,8 +65,8 @@ Java_org_simgrid_msg_Storage_getByName(JNIEnv * env, jclass cls,

/* get the C string from the java string */
if (jname == NULL) {

/* get the C string from the java string */
if (jname == NULL) {
-       jxbt_throw_null(env,bprintf("No host can have a null name"));
-       return NULL;
+    jxbt_throw_null(env,bprintf("No host can have a null name"));
+    return NULL;
}
const char *name = env->GetStringUTFChars(jname, 0);
storage = MSG_storage_get_by_name(name);
}
const char *name = env->GetStringUTFChars(jname, 0);
storage = MSG_storage_get_by_name(name);
@@ -170,7 +170,7 @@ Java_org_simgrid_msg_Storage_getProperty(JNIEnv *env, jobject jstorage, jobject

JNIEXPORT void JNICALL
Java_org_simgrid_msg_Storage_setProperty(JNIEnv *env, jobject jstorage, jobject jname, jobject jvalue) {

JNIEXPORT void JNICALL
Java_org_simgrid_msg_Storage_setProperty(JNIEnv *env, jobject jstorage, jobject jname, jobject jvalue) {
-       msg_storage_t storage = jstorage_get_native(env, jstorage);
+  msg_storage_t storage = jstorage_get_native(env, jstorage);

if (!storage) {
jxbt_throw_notbound(env, "storage", jstorage);

if (!storage) {
jxbt_throw_notbound(env, "storage", jstorage);
index 739a930..ac617ca 100644 (file)
@@ -16,28 +16,28 @@ SG_BEGIN_DECL()
/**
* This function returns a new java storage instance.
*
/**
* This function returns a new java storage instance.
*
- * @param env                  The environment of the current thread
+ * @param env      The environment of the current thread
*
*
- * @return                             A new java storage object.
+ * @return        A new java storage object.
*
*
- * @exception                  If the class Storage is not found the function throws
- *                                             the ClassNotFoundException. If the constructor of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchMethodException.
+ * @exception      If the class Storage is not found the function throws
+ *            the ClassNotFoundException. If the constructor of
+ *            this class is not found the function throws the exception
+ *            NotSuchMethodException.
*/
jobject jstorage_new_instance(JNIEnv * env);

/**
* This function associated a native storage to a java storage instance.
*
*/
jobject jstorage_new_instance(JNIEnv * env);

/**
* This function associated a native storage to a java storage instance.
*
- * @param jstorage                     The java storage instance.
- * @param storage                      The native storage to bind.
- * @param env                  The environment of the current thread
+ * @param jstorage      The java storage instance.
+ * @param storage      The native storage to bind.
+ * @param env      The environment of the current thread
*
*
- * @exception                  If the class Storage is not found the function throws
- *                                             the ClassNotFoundException. If the field bind of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Storage is not found the function throws
+ *            the ClassNotFoundException. If the field bind of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*/
void jstorage_bind(jobject jstorage, msg_storage_t storage, JNIEnv * env);

*/
void jstorage_bind(jobject jstorage, msg_storage_t storage, JNIEnv * env);

@@ -45,24 +45,24 @@ void jstorage_bind(jobject jstorage, msg_storage_t storage, JNIEnv * env);
/**
* This function returns a native storage from a java storage instance.
*
/**
* This function returns a native storage from a java storage instance.
*
- * @param jstorage                     The java storage object from which get the native storage.
- * @param env                  The environment of the current thread
+ * @param jstorage      The java storage object from which get the native storage.
+ * @param env      The environment of the current thread
*
*
- * @return                             The function returns the native storage associated to the
- *                                             java storage object.
+ * @return        The function returns the native storage associated to the
+ *            java storage object.
*
*
- * @exception                  If the class Storage is not found the function throws
- *                                             the ClassNotFoundException. If the field bind of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Storage is not found the function throws
+ *            the ClassNotFoundException. If the field bind of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*/
msg_storage_t jstorage_get_native(JNIEnv * env, jobject jstorage);

/**
*/
msg_storage_t jstorage_get_native(JNIEnv * env, jobject jstorage);

/**
- * Class                       org_simgrid_msg_Storage
- * Method                      nativeInit
- * Signature   ()V
+ * Class      org_simgrid_msg_Storage
+ * Method      nativeInit
+ * Signature  ()V
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Storage_nativeInit(JNIEnv*, jclass);
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_Storage_nativeInit(JNIEnv*, jclass);
@@ -72,56 +72,56 @@ Java_org_simgrid_msg_Storage_nativeInit(JNIEnv*, jclass);
* This function returns a global reference to the  java storage instance
* specified by the parameter jstorage.
*
* This function returns a global reference to the  java storage instance
* specified by the parameter jstorage.
*
- * @param jstorage                     The original java storage instance.
- * @param env                  The environment of the current thread
+ * @param jstorage      The original java storage instance.
+ * @param env      The environment of the current thread
*
*
- * @return                             The global reference to the original java storage
- *                                             instance.
+ * @return        The global reference to the original java storage
+ *            instance.
*/
jobject jstorage_ref(JNIEnv * env, jobject jstorage);
/**
* This function delete a global reference to a java storage instance.
*
*/
jobject jstorage_ref(JNIEnv * env, jobject jstorage);
/**
* This function delete a global reference to a java storage instance.
*
- * @param                              The global reference to delete.
- * @param env                  The environment of the current thread
+ * @param        The global reference to delete.
+ * @param env      The environment of the current thread
*/
void jstorage_unref(JNIEnv * env, jobject jstorage);

/**
* This function returns the name of a MSG storage.
*
*/
void jstorage_unref(JNIEnv * env, jobject jstorage);

/**
* This function returns the name of a MSG storage.
*
- * @param jstorage                     A java storage object.
- * @param env                  The environment of the current thread
+ * @param jstorage      A java storage object.
+ * @param env      The environment of the current thread
*
*
- * @return                             The name of the storage.
+ * @return        The name of the storage.
*/
const char *jstorage_get_name(jobject jstorage, JNIEnv * env);

/*
*/
const char *jstorage_get_name(jobject jstorage, JNIEnv * env);

/*
- * Class               org_simgrid_msg_Storage
- * Method              getByName
- * Signature   (Ljava/lang/String;)Lsimgrid/msg/Storage;
+ * Class    org_simgrid_msg_Storage
+ * Method    getByName
+ * Signature  (Ljava/lang/String;)Lsimgrid/msg/Storage;
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getByName(JNIEnv *, jclass, jstring);

/*
*/
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getByName(JNIEnv *, jclass, jstring);

/*
- * Class               org_simgrid_msg_Storage
- * Method              getSize
- * Signature   ()D
+ * Class    org_simgrid_msg_Storage
+ * Method    getSize
+ * Signature  ()D
*/
JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getSize(JNIEnv *, jobject);

/*
*/
JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getSize(JNIEnv *, jobject);

/*
- * Class               org_simgrid_msg_Storage
- * Method              getFreeSize
- * Signature   ()D
+ * Class    org_simgrid_msg_Storage
+ * Method    getFreeSize
+ * Signature  ()D
*/
JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getFreeSize(JNIEnv *, jobject);

/*
*/
JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getFreeSize(JNIEnv *, jobject);

/*
- * Class               org_simgrid_msg_Storage
- * Method              getUsedSize
- * Signature   ()D
+ * Class    org_simgrid_msg_Storage
+ * Method    getUsedSize
+ * Signature  ()D
*/
JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getUsedSize(JNIEnv *, jobject);

*/
JNIEXPORT jlong JNICALL Java_org_simgrid_msg_Storage_getUsedSize(JNIEnv *, jobject);

index fb1a948..7c6cb4a 100644 (file)
@@ -261,7 +261,7 @@ Java_org_simgrid_msg_Task_getSender(JNIEnv * env,

if (process == NULL) {

if (process == NULL) {
-       return NULL;
+    return NULL;
}
return (jobject) native_to_java_process(process);
}
}
return (jobject) native_to_java_process(process);
}
@@ -280,7 +280,7 @@ Java_org_simgrid_msg_Task_getSource(JNIEnv * env,

if (host == NULL) {

if (host == NULL) {
-       return NULL;
+    return NULL;
}
if (!host->extension(JAVA_HOST_LEVEL)) {
}
if (!host->extension(JAVA_HOST_LEVEL)) {

JNIEXPORT void JNICALL

JNIEXPORT void JNICALL

-               return;
-       }
-       const char *name = env->GetStringUTFChars((jstring) jname, 0);
+    return;
+  }
+  const char *name = env->GetStringUTFChars((jstring) jname, 0);

-       env->ReleaseStringUTFChars((jstring) jname, name);
+  env->ReleaseStringUTFChars((jstring) jname, name);
}
JNIEXPORT void JNICALL
}
JNIEXPORT void JNICALL
@@ -331,26 +331,26 @@ Java_org_simgrid_msg_Task_setPriority(JNIEnv * env,
}
JNIEXPORT void JNICALL
}
JNIEXPORT void JNICALL
-               (JNIEnv *env, jobject jtask, jdouble computationAmount) {
+    (JNIEnv *env, jobject jtask, jdouble computationAmount) {

return;
return;
-       }
+  }
}
JNIEXPORT void JNICALL
}
JNIEXPORT void JNICALL
-               (JNIEnv *env, jobject jtask, jdouble dataSize) {
+    (JNIEnv *env, jobject jtask, jdouble dataSize) {

return;
return;
-       }
+  }
}

JNIEXPORT void JNICALL
}

JNIEXPORT void JNICALL

JNIEXPORT jobject JNICALL
Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass cls, jstring jmailbox) {

JNIEXPORT jobject JNICALL
Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass cls, jstring jmailbox) {
-       msg_comm_t comm;
-       const char *mailbox;
-       jclass comm_class;
-       //pointer to store the task object pointer.
-       /* There should be a cache here */
-       comm_class = env->FindClass("org/simgrid/msg/Comm");
+  msg_comm_t comm;
+  const char *mailbox;
+  jclass comm_class;
+  //pointer to store the task object pointer.
+  /* There should be a cache here */
+  comm_class = env->FindClass("org/simgrid/msg/Comm");

-       if (!comm_class) {
-               jxbt_throw_native(env,bprintf("fieldID or methodID or class not found."));
-               return NULL;
-       }
+  if (!comm_class) {
+    jxbt_throw_native(env,bprintf("fieldID or methodID or class not found."));
+    return NULL;
+  }

-       jobject jcomm = env->NewObject(comm_class, jtask_method_Comm_constructor);
-       if (!jcomm) {
-               jxbt_throw_native(env,bprintf("Can't create a Comm object."));
-               return NULL;
-       }
+  jobject jcomm = env->NewObject(comm_class, jtask_method_Comm_constructor);
+  if (!jcomm) {
+    jxbt_throw_native(env,bprintf("Can't create a Comm object."));
+    return NULL;
+  }

-       mailbox = env->GetStringUTFChars(jmailbox, 0);
+  mailbox = env->GetStringUTFChars(jmailbox, 0);

-       env->ReleaseStringUTFChars(jmailbox, mailbox);
+  env->ReleaseStringUTFChars(jmailbox, mailbox);

-       return jcomm;
+  return jcomm;
}

}

JNIEXPORT jobject JNICALL

JNIEXPORT jobject JNICALL
-               jstring jmailbox, jdouble rate) {
-       msg_comm_t comm;
-       const char *mailbox;
-       jclass comm_class;
-       //pointer to store the task object pointer.
-       /* There should be a cac hee */
-       comm_class = env->FindClass("org/simgrid/msg/Comm");
+    jstring jmailbox, jdouble rate) {
+  msg_comm_t comm;
+  const char *mailbox;
+  jclass comm_class;
+  //pointer to store the task object pointer.
+  /* There should be a cac hee */
+  comm_class = env->FindClass("org/simgrid/msg/Comm");

-       if (!comm_class) {
-               jxbt_throw_native(env,bprintf("fieldID or methodID or class not found."));
-               return NULL;
-       }
+  if (!comm_class) {
+    jxbt_throw_native(env,bprintf("fieldID or methodID or class not found."));
+    return NULL;
+  }

-       jobject jcomm = env->NewObject(comm_class, jtask_method_Comm_constructor);
-       if (!jcomm) {
-               jxbt_throw_native(env,bprintf("Can't create a Comm object."));
-               return NULL;
-       }
+  jobject jcomm = env->NewObject(comm_class, jtask_method_Comm_constructor);
+  if (!jcomm) {
+    jxbt_throw_native(env,bprintf("Can't create a Comm object."));
+    return NULL;
+  }

-       mailbox = env->GetStringUTFChars(jmailbox, 0);
+  mailbox = env->GetStringUTFChars(jmailbox, 0);

-       env->ReleaseStringUTFChars(jmailbox, mailbox);
+  env->ReleaseStringUTFChars(jmailbox, mailbox);

-       return jcomm;
+  return jcomm;
}

JNIEXPORT jobject JNICALL
}

JNIEXPORT jobject JNICALL

JNIEXPORT void JNICALL

JNIEXPORT void JNICALL

-           return;
-         }
+      return;
+    }

}

}

index 6509dc0..2a89b6e 100644 (file)
@@ -17,30 +17,30 @@ SG_BEGIN_DECL()
/**
* This function associated a native task to a java task instance.
*
/**
* This function associated a native task to a java task instance.
*
- * @param env                  The environment of the current thread.
+ * @param env      The environment of the current thread.
*
*
- * @exception                  If the class Task is not found the function throws
- *                                             the ClassNotFoundException. If the field bind of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Task is not found the function throws
+ *            the ClassNotFoundException. If the field bind of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*/

/**
* This function returns a native task from a java task instance.
*
*/

/**
* This function returns a native task from a java task instance.
*
- * @param env                  The environment of the current thread.
+ * @param env      The environment of the current thread.
*
*
- * @return                             The function returns the native task associated to the
+ * @return        The function returns the native task associated to the
*
*
- * @exception                  If the class Task is not found the function throws
- *                                             the ClassNotFoundException. If the field bind of
- *                                             this class is not found the function throws the exception
- *                                             NotSuchFieldException.
+ * @exception      If the class Task is not found the function throws
+ *            the ClassNotFoundException. If the field bind of
+ *            this class is not found the function throws the exception
+ *            NotSuchFieldException.
*/

*/

* A java task object is valid if it is bind to a native
*
* A java task object is valid if it is bind to a native
*
- * @param env                  The environment of the current thread.
+ * @param env      The environment of the current thread.
*
*
- * @return                             If the java task is valid the function returns true.
- *                                             Otherwise the function returns false.
+ * @return        If the java task is valid the function returns true.
+ *            Otherwise the function returns false.
*/

/*
*/

/*
- * Method              nativeInit
- * Signature   ();
+ * Method    nativeInit
+ * Signature  ();
*/
JNIEXPORT void JNICALL

/*
*/
JNIEXPORT void JNICALL

/*
- * Method              create
+ * Method    create
*/
JNIEXPORT void JNICALL
*/
JNIEXPORT void JNICALL
-               (JNIEnv * env, jobject jtask, jstring jname, jdouble jcomputeDuration, jdouble jmessageSize);
+    (JNIEnv * env, jobject jtask, jstring jname, jdouble jcomputeDuration, jdouble jmessageSize);
JNIEXPORT void JNICALL
/*
JNIEXPORT void JNICALL
/*
- * Method              parallelCreate
+ * Method    parallelCreate
*/
JNIEXPORT void JNICALL
*/
JNIEXPORT void JNICALL
-               (JNIEnv *, jobject,
+    (JNIEnv *, jobject,
jstring, jobjectArray,
jdoubleArray,
jdoubleArray);
/*
jstring, jobjectArray,
jdoubleArray,
jdoubleArray);
/*
- * Method              destroy
+ * Method    destroy
*/
/* JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_destroy */
/*     (JNIEnv *, jobject); */

/*
*/
/* JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_destroy */
/*     (JNIEnv *, jobject); */

/*
- * Method              cancel
- * Signature   ()V
+ * Method    cancel
+ * Signature  ()V
*/
(JNIEnv *, jobject);

/*
*/
(JNIEnv *, jobject);

/*
- * Method              execute
- * Signature   ()V
+ * Method    execute
+ * Signature  ()V
*/
(JNIEnv *, jobject);

/*
*/
(JNIEnv *, jobject);

/*
- * Method              setBound
- * Signature   ()V
+ * Method    setBound
+ * Signature  ()V
*/
(JNIEnv *, jobject, jdouble);

/*
*/
(JNIEnv *, jobject, jdouble);

/*
- * Method              getName
- * Signature   ()Ljava/lang/String;
+ * Method    getName
+ * Signature  ()Ljava/lang/String;
*/
(JNIEnv *, jobject);

/*
*/
(JNIEnv *, jobject);

/*
- * Method              getSender
- * Signature   ()Lsimgrid/msg/Process;
+ * Method    getSender
+ * Signature  ()Lsimgrid/msg/Process;
*/
(JNIEnv *, jobject);
/*
*/
(JNIEnv *, jobject);
/*
- * Method              getSource
- * Signature   ()Lsimgrid/msg/Host;
+ * Method    getSource
+ * Signature  ()Lsimgrid/msg/Host;
*/
(JNIEnv *, jobject);
/*
*/
(JNIEnv *, jobject);
/*
- * Method              getFlopsAmount
- * Signature   ()D
+ * Method    getFlopsAmount
+ * Signature  ()D
*/
(JNIEnv *, jobject);

/**
*/
(JNIEnv *, jobject);

/**
- * Method              setName
- * Signature   (Ljava/lang/string;)V
+ * Method    setName
+ * Signature  (Ljava/lang/string;)V
*/
JNIEXPORT void JNICALL
/*
*/
JNIEXPORT void JNICALL
/*
- * Method              setPriority
- * Signature   (D)V
+ * Method    setPriority
+ * Signature  (D)V
*/
(JNIEnv *, jobject, jdouble);
/**
*/
(JNIEnv *, jobject, jdouble);
/**
- * Method              setComputeDuration
- * Signature   (D)V
+ * Method    setComputeDuration
+ * Signature  (D)V
*/
JNIEXPORT void JNICALL
*/
JNIEXPORT void JNICALL
-               (JNIEnv *env, jobject jtask, jdouble computationAmount);
-
-               /**
- * Method              setDataSize
- * Signature   (D)V
+    (JNIEnv *env, jobject jtask, jdouble computationAmount);
+
+    /**
+ * Method    setDataSize
+ * Signature  (D)V
*/
JNIEXPORT void JNICALL
*/
JNIEXPORT void JNICALL
-               (JNIEnv *env, jobject jtask, jdouble dataSize);
-
+    (JNIEnv *env, jobject jtask, jdouble dataSize);
+
/**
/**
- * Method              send
+ * Method    send
*/
JNIEXPORT void JNICALL
(JNIEnv *, jobject, jstring, jdouble);

/**
*/
JNIEXPORT void JNICALL
(JNIEnv *, jobject, jstring, jdouble);

/**
- * Method              sendBounded
+ * Method    sendBounded
*/
JNIEXPORT void JNICALL
*/
JNIEXPORT void JNICALL
@@ -196,81 +196,81 @@ JNIEXPORT void JNICALL

/**

/**
*/
JNIEXPORT jobject JNICALL
(JNIEnv *, jclass, jstring, jdouble, jobject);

/**
*/
JNIEXPORT jobject JNICALL
(JNIEnv *, jclass, jstring, jdouble, jobject);

/**
- * Method              irecv
- * Signature   (Ljava/lang/String;)Lorg/simgrid/msg/Comm;
+ * Method    irecv
+ * Signature  (Ljava/lang/String;)Lorg/simgrid/msg/Comm;
*/
JNIEXPORT jobject JNICALL
Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass cls, jstring jmailbox);
/**
*/
JNIEXPORT jobject JNICALL
Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass cls, jstring jmailbox);
/**
*/
JNIEXPORT jobject JNICALL
jstring jalias, jdouble jtimeout,
jobject jhost, jdouble rate);
/**
*/
JNIEXPORT jobject JNICALL
jstring jalias, jdouble jtimeout,
jobject jhost, jdouble rate);
/**
- * Method              irecvBounded
+ * Method    irecvBounded
*/
JNIEXPORT jobject JNICALL
jstring jmailbox, jdouble rate);
/**
*/
JNIEXPORT jobject JNICALL
jstring jmailbox, jdouble rate);
/**
- * Method              isend
+ * Method    isend
*/
JNIEXPORT jobject JNICALL
/**
*/
JNIEXPORT jobject JNICALL
/**
- * Method              isendBounded
+ * Method    isendBounded
*/
JNIEXPORT jobject JNICALL

/**
*/
JNIEXPORT jobject JNICALL

/**
- * Method              dsend
+ * Method    dsend
*/
JNIEXPORT void JNICALL
jstring jalias);

/**
*/
JNIEXPORT void JNICALL
jstring jalias);

/**
- * Method              dsendBounded
+ * Method    dsendBounded
*/
JNIEXPORT void JNICALL
jstring jalias, jdouble maxrate);

/**
*/
JNIEXPORT void JNICALL
jstring jalias, jdouble maxrate);

/**
- * Method              listen
+ * Method    listen
*/
JNIEXPORT jboolean JNICALL
/**
*/
JNIEXPORT jboolean JNICALL
/**
- * Method              listenFromHost
+ * Method    listenFromHost
*/
JNIEXPORT jint JNICALL
jobject);
/**
*/
JNIEXPORT jint JNICALL
jobject);
/**
- * Method              listenFrom
+ * Method    listenFrom
*/
JNIEXPORT jint JNICALL
*/
JNIEXPORT jint JNICALL
index 2d2b382..81da0b2 100644 (file)
@@ -29,7 +29,7 @@ JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_nativeInit(JNIEnv *env, jclass cls) {
jclass jprocess_class_VM = env->FindClass("org/simgrid/msg/VM");
jvm_field_bind = jxbt_get_jfield(env, jprocess_class_VM, "bind", "J");
Java_org_simgrid_msg_VM_nativeInit(JNIEnv *env, jclass cls) {
jclass jprocess_class_VM = env->FindClass("org/simgrid/msg/VM");
jvm_field_bind = jxbt_get_jfield(env, jprocess_class_VM, "bind", "J");
-  if (!jvm_field_bind  ) {
+  if (!jvm_field_bind  ) {
jxbt_throw_native(env,bprintf("Can't find some fields in Java class. You should report this bug."));
}
}
jxbt_throw_native(env,bprintf("Can't find some fields in Java class. You should report this bug."));
}
}
@@ -79,14 +79,14 @@ Java_org_simgrid_msg_VM_isRestoring(JNIEnv * env, jobject jvm) {
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jint load) {

JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jint load) {

-       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_t vm = jvm_get_native(env,jvm);
+  double bound = MSG_get_host_speed(vm) * load / 100;
+  MSG_vm_set_bound(vm, bound);
}

JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_create(JNIEnv *env, jobject jvm, jobject jhost, jstring jname,
}

JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_create(JNIEnv *env, jobject jvm, jobject jhost, jstring jname,
-                              jint jncore, jint jramsize, jint jnetcap, jstring jdiskpath, jint jdisksize, jint jmig_netspeed, jint jdp_intensity) {
+                   jint jncore, jint jramsize, jint jnetcap, jstring jdiskpath, jint jdisksize, jint jmig_netspeed, jint jdp_intensity) {

msg_host_t host = jhost_get_native(env, jhost);

msg_host_t host = jhost_get_native(env, jhost);

@@ -100,7 +100,7 @@ Java_org_simgrid_msg_VM_create(JNIEnv *env, jobject jvm, jobject jhost, jstring
// disk_path = xbt_strdup(disk_path);

msg_vm_t vm = MSG_vm_create(host, name, (int) jncore, (int) jramsize,
// disk_path = xbt_strdup(disk_path);

msg_vm_t vm = MSG_vm_create(host, name, (int) jncore, (int) jramsize,
-                 (int) jnetcap, NULL, (int) jdisksize, (int) jmig_netspeed, (int) jdp_intensity);
+      (int) jnetcap, NULL, (int) jdisksize, (int) jmig_netspeed, (int) jdp_intensity);

jvm_bind(env,jvm,vm);
}

jvm_bind(env,jvm,vm);
}
index 6168766..1ed5e3b 100644 (file)
@@ -18,73 +18,73 @@ void jvm_bind(JNIEnv *env, jobject jvm, msg_vm_t vm);
msg_vm_t jvm_get_native(JNIEnv *env, jobject jvm);

/*
msg_vm_t jvm_get_native(JNIEnv *env, jobject jvm);

/*
- * Class                       org_simgrid_msg_VM
- * Method                      nativeInit
- * Signature   ()V
+ * Class      org_simgrid_msg_VM
+ * Method      nativeInit
+ * Signature  ()V
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_nativeInit(JNIEnv *env, jclass);

/**
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_nativeInit(JNIEnv *env, jclass);

/**
- * Class                       org_simgrid_msg_VM
- * Method                      isCreated
- * Signature   ()B
+ * Class      org_simgrid_msg_VM
+ * Method      isCreated
+ * Signature  ()B
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isCreated(JNIEnv *env, jobject jvm);
/**
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isCreated(JNIEnv *env, jobject jvm);
/**
- * Class                       org_simgrid_msg_VM
- * Method                      isRunning
- * Signature   ()B
+ * Class      org_simgrid_msg_VM
+ * Method      isRunning
+ * Signature  ()B
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isRunning(JNIEnv *env, jobject jvm);
/**
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isRunning(JNIEnv *env, jobject jvm);
/**
- * Class                       org_simgrid_msg_VM
- * Method                      isMigrating
- * Signature   ()B
+ * Class      org_simgrid_msg_VM
+ * Method      isMigrating
+ * Signature  ()B
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isMigrating(JNIEnv *env, jobject jvm);
/**
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isMigrating(JNIEnv *env, jobject jvm);
/**
- * Class                       org_simgrid_msg_VM
- * Method                      isSuspended
- * Signature   ()B
+ * Class      org_simgrid_msg_VM
+ * Method      isSuspended
+ * Signature  ()B
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isSuspended(JNIEnv *env, jobject jvm);
/**
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isSuspended(JNIEnv *env, jobject jvm);
/**
- * Class                       org_simgrid_msg_VM
- * Method                      isResuming
- * Signature   ()B
+ * Class      org_simgrid_msg_VM
+ * Method      isResuming
+ * Signature  ()B
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isResuming(JNIEnv *env, jobject jvm);
/**
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isResuming(JNIEnv *env, jobject jvm);
/**
- * Class                       org_simgrid_msg_VM
- * Method                      isSuspended
- * Signature   ()B
+ * Class      org_simgrid_msg_VM
+ * Method      isSuspended
+ * Signature  ()B
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isSaving(JNIEnv *env, jobject jvm);
/**
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isSaving(JNIEnv *env, jobject jvm);
/**
- * Class                       org_simgrid_msg_VM
- * Method                      isSave
- * Signature   ()B
+ * Class      org_simgrid_msg_VM
+ * Method      isSave
+ * Signature  ()B
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isSaved(JNIEnv *env, jobject jvm);
/**
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isSaved(JNIEnv *env, jobject jvm);
/**
- * Class                       org_simgrid_msg_VM
- * Method                      isResuming
- * Signature   ()B
+ * Class      org_simgrid_msg_VM
+ * Method      isResuming
+ * Signature  ()B
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isRestoring(JNIEnv *env, jobject jvm);
/**
*/
JNIEXPORT jint JNICALL
Java_org_simgrid_msg_VM_isRestoring(JNIEnv *env, jobject jvm);
/**
- * Class                       org_simgrid_msg_VM
- * Method                      setBound
- * Signature   ()B
+ * Class      org_simgrid_msg_VM
+ * Method      setBound
+ * Signature  ()B
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jint load);
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jint load);
@@ -96,7 +96,7 @@ Java_org_simgrid_msg_VM_setBound(JNIEnv *env, jobject jvm, jint load);
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_create(JNIEnv *env, jobject jvm, jobject jhost, jstring jname,
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_create(JNIEnv *env, jobject jvm, jobject jhost, jstring jname,
-                              jint jncore, jint jramsize, jint jnetcap, jstring jdiskpath, jint jdisksize, jint dprate, jint mig_netspeed);
+              &nb