Hoa Nguyen has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/44449 )

Change subject: util: Fix checkpoint-tester.py checkpoint parameter
......................................................................

util: Fix checkpoint-tester.py checkpoint parameter

Previously, the inputs to `--take-checkpoints X,Y` was
`(interval, interval)` with attention to restore the N^th checkpoint
and to run the simulation for `interval` ticks.

Currently, the parameter `X` is the starting tick of the simulation,
while `Y` is the number of ticks to be simulated after tick `X`.
Therefore, `X` should be the starting tick of the N^th checkpont.

Change-Id: I1fd7c91c9454f42a4fb98aa878fb5e4ac7d238f3
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
---
M util/checkpoint-tester.py
1 file changed, 4 insertions(+), 3 deletions(-)



diff --git a/util/checkpoint-tester.py b/util/checkpoint-tester.py
index e2051cd..7b37c0d 100755
--- a/util/checkpoint-tester.py
+++ b/util/checkpoint-tester.py
@@ -93,12 +93,12 @@

 options = args[1:]

-initial_args = ['--take-checkpoints', '%d,%d' % (interval, interval)]
+checkpoint_args = ['--take-checkpoints', '%d,%d' % (interval, interval)]

 cptdir = os.path.join(top_dir, 'm5out')

 print('===> Running initial simulation.')
-subprocess.call([m5_binary] + ['-red', cptdir] + options + initial_args)
+subprocess.call([m5_binary] + ['-red', cptdir] + options + checkpoint_args)

 dirs = os.listdir(cptdir)
 expr = re.compile('cpt\.([0-9]*)')
@@ -116,8 +116,9 @@
 # less than tha number of checkpoints.
 for i in range(1, len(cpts)):
     print('===> Running test %d of %d.' % (i, len(cpts)-1))
+    checkpoint_args = ['--take-checkpoints', '%d,%d' % (cpts[i], interval)]
     mydir = os.path.join(top_dir, 'test.%d' % i)
- subprocess.call([m5_binary] + ['-red', mydir] + options + initial_args + + subprocess.call([m5_binary] + ['-red', mydir] + options + checkpoint_args +
                     ['--max-checkpoints' , '1', '--checkpoint-dir', cptdir,
                      '--checkpoint-restore', str(i)])
     cpt_name = 'cpt.%d' % cpts[i]

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44449
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: I1fd7c91c9454f42a4fb98aa878fb5e4ac7d238f3
Gerrit-Change-Number: 44449
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to