Skip to content

Commit

Permalink
adding exception so that it finishes cleanly if the measured program …
Browse files Browse the repository at this point in the history
…has error
  • Loading branch information
sekkariaamer12 committed Mar 25, 2024
1 parent 615feb4 commit fc240b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deep_learning_power_measure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ def main():
exp = experiment.Experiment(driver)
p, q = exp.measure_yourself(period=args.period, measurement_period=args.measurement_period)
## calling the experiment script
subprocess.run(cmd, shell=True, check=True)
try:
subprocess.run(cmd, shell=True, check=True)
except:
print("ERROR : in the measured program, see log before this message" )
q.put(experiment.STOP_MESSAGE)
driver = parsers.JsonParser(output_folder)
exp_result = experiment.ExpResults(driver)
Expand Down

0 comments on commit fc240b9

Please sign in to comment.