Giacomo Travaglini has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/44765 )
Change subject: configs: restore_simpoint_checkpoint should be a boolean
......................................................................
configs: restore_simpoint_checkpoint should be a boolean
The --restore_simpoint_checkpoint option is a boolean;
however if no default value is supplied, optparse sets the
default value to None
This is not valid for argparse. Argparse recognizes the store_true
action and it is automatically treating the option as a boolean,
hence providing a default=False instead of default=None
Change-Id: I6b09edf6911be71a06001730be1232a1b5c8482c
Signed-off-by: Giacomo Travaglini <[email protected]>
---
M configs/common/Options.py
M configs/common/Simulation.py
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/configs/common/Options.py b/configs/common/Options.py
index c48bfe6..b833531 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -305,6 +305,7 @@
parser.add_option("--take-simpoint-checkpoints", action="store",
type="string",
help="<simpoint file,weight file,interval-length,warmup-length>")
parser.add_option("--restore-simpoint-checkpoint", action="store_true",
+ default=False,
help="restore from a simpoint checkpoint taken with " +
"--take-simpoint-checkpoints")
diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py
index 067bc01..3b9efc0 100644
--- a/configs/common/Simulation.py
+++ b/configs/common/Simulation.py
@@ -710,7 +710,7 @@
takeSimpointCheckpoints(simpoints, interval_length, cptdir)
# Restore from SimPoint checkpoints
- elif options.restore_simpoint_checkpoint != None:
+ elif options.restore_simpoint_checkpoint:
restoreSimpointCheckpoint()
else:
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44765
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I6b09edf6911be71a06001730be1232a1b5c8482c
Gerrit-Change-Number: 44765
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s