8000 Patch version 0.7.1 by iangneal · Pull Request #6 · efeslab/lapidary · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lapidary/tools/GDBProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ def __init__(self, arg_list,
env['CHECKPOINT_COMPRESS'] = str(compress)
env['CHECKPOINT_CONVERT'] = str(convert)
env['CHECKPOINT_KEYFRAMES'] = str(keyframes)
# By setting the python path, we preserve the import paths of the
# virtual environment, as sys.path is populated in part from the
# $PYTHONPATH environment variable.
env['PYTHONPATH'] = ':'.join(sys.path)

if ld_path is not None:
assert ld_path.exists()
Expand All @@ -74,7 +78,7 @@ def __init__(self, arg_list,
self.env = env

def run(self):
subprocess.run(self.args)
subprocess.run(self.args, env=self.env)


def add_arguments(parser):
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
8000
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
wheel
diff-match-patch
elftools
ipython
jinja2
matplotlib
Expand All @@ -8,4 +8,5 @@ pandas
pathlib
progressbar2
pyelftools
pyyaml
pyyaml
wheel
18 changes: 16 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
#! /usr/bin/env python3
import setuptools
import shlex
import subprocess

def install_python2_requirements():
cmd = 'python2.7 -m pip install --user -r requirements2.txt'
args = shlex.split(cmd)
subprocess.call(args)


def main():
install_python2_requirements()

with open('README.md', 'r') as f:
long_description = f.read()

Expand All @@ -10,15 +20,19 @@ def main():

setuptools.setup(
name='lapidary',
version='0.7.0',
version='0.7.1',
author='Ian Glen Neal',
author_email='iangneal@umich.com',
description='A tool for scalable Gem5 Simulation',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/efeslab/lapidary',
packages=setuptools.find_packages(),
package_data={'lapidary': ['config/schema.yaml']},
package_data={'lapidary': [
'config/schema.yaml',
'checkpoint/get_brk.c',
'checkpoint/get_fs_base.c'
]},
setup_requires=['wheel'],
install_requires=install_requires,
classifiers=[
Expand Down
26 changes: 20 additions & 6 deletions test/src/test.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
/**
* Test program for Lapidary simulations.
*
* Before you come yelling at me, yes, I know, this is not the best way to
* compute the fibonacci sequence. I just wanted a simple program that took
* several seconds to finish running so that 78A7 realistic checkpoints could be
* created from it.
*/
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>

void ding(void) { printf("DING!\n"); }
void dong(void) { printf("DONG!\n"); }
uint64_t fib(uint64_t i) {
if (i <= 1) {
return i;
}

return fib(i - 1) + fib(i - 2);
}

int main(int argc, char **argv) {
ding();
dong();
ding();
dong();
for (uint64_t i = 0; i < 50; ++i) {
printf("fib(%lu) = %lu\n", i, fib(i));
}

return 0;
}
0