Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 21ff939c authored by Thomas Lavocat's avatar Thomas Lavocat
Browse files

Add exec rank for ventilator

parent a693596c
......@@ -7,9 +7,10 @@ from .numbered_group import NumberedGroup
class Ventilator(Executor):
def __init__(self, name, commands, group, end=False, timeout=-1,
fail_threshold=0, encoding=consts.encoding) :
fail_threshold=0, encoding=consts.encoding, exec_rank="") :
Executor.__init__(self, group, end, name, timeout, encoding)
self.commands = commands
self.exec_rank= exec_rank
self.to_exec = len(commands)
self.busy_map = dict()
self.nbfail = 0
......@@ -19,8 +20,11 @@ class Ventilator(Executor):
def got_spawn_list(data) :
decoded_data = json.loads(data)
spawn_list = decoded_data[consts.DATA]
for spawn in spawn_list :
self.busy_map[spawn] = []
if self.exec_rank == "" :
for spawn in spawn_list :
self.busy_map[spawn] = []
else :
self.busy_map[self.exec_rank] = []
while self.assign_a_task() :
pass
self.framework.acquire_spawn_list(self.group.ID,self.group.root_r,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment