Unverified Commit 789df39b authored by Jakob Görgen's avatar Jakob Görgen
Browse files

more explicit instantiation copy

parent 4b276d42
...@@ -350,8 +350,6 @@ def main(): ...@@ -350,8 +350,6 @@ def main():
for index in range(args.firstrun, args.firstrun + args.runs): for index in range(args.firstrun, args.firstrun + args.runs):
inst_copy = inst.copy() inst_copy = inst.copy()
inst_copy.preserve_tmp_folder = False inst_copy.preserve_tmp_folder = False
inst_copy.create_checkpoint = inst.create_checkpoint
inst_copy.restore_checkpoint = inst.restore_checkpoint
if index == args.firstrun + args.runs - 1: if index == args.firstrun + args.runs - 1:
inst_copy._preserve_checkpoints = False inst_copy._preserve_checkpoints = False
add_exp(instantiation=inst_copy, rt=rt, prereq=prereq) add_exp(instantiation=inst_copy, rt=rt, prereq=prereq)
......
...@@ -337,6 +337,12 @@ class Instantiation(): ...@@ -337,6 +337,12 @@ class Instantiation():
def copy(self) -> Instantiation: def copy(self) -> Instantiation:
cop = Instantiation(sim=self.simulation, env=self.env) cop = Instantiation(sim=self.simulation, env=self.env)
cop.simulation = copy.deepcopy(self.simulation) # maybe there is a smarter way of achieving this... cop.simulation = copy.deepcopy(self.simulation) # maybe there is a smarter way of achieving this...
cop._create_checkpoint = self._create_checkpoint
cop._restore_checkpoint = self._restore_checkpoint
cop._preserve_checkpoints = self._preserve_checkpoints
cop.preserve_tmp_folder = self.preserve_tmp_folder
cop._socket_per_interface = {}
cop._sim_dependency = {}
return cop return cop
def out_base_dir(self) -> str: def out_base_dir(self) -> str:
......
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