summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon.c b/daemon.c
index ea1ffaa..5c50f94 100644
--- a/daemon.c
+++ b/daemon.c
@@ -35,6 +35,10 @@ void *load_balance_thread(void *arg) {
if ((max - min) > (avg / 2)) {
printf("[daemon] Triggering migration: max load node %d -> min load node %d\n", max_id, min_id);
// Call external script/function to checkpoint, scp, and restart
+ char cmd[512];
+ snprintf(cmd, sizeof(cmd), "mpirun -np 1 -host node%d checkpointandbalance.sh %d &", min_id, max_id);
+ printf("[daemon] Running on node%d: %s\n", node_id, cmd);
+ system(cmd);
char cmd[512];
snprintf(cmd, sizeof(cmd), "ssh node%d \"./migrate_heavy_job.sh %d %d\"", max_id, max_id, min_id);
system(cmd);