harvard-acc / gem5-aladdin

End-to-end SoC simulation: integrating the gem5 system simulator with the Aladdin accelerator simulator.
BSD 3-Clause "New" or "Revised" License
210 stars 59 forks source link

Error while generating sweeps #7

Closed noureddine-as closed 5 years ago

noureddine-as commented 5 years ago

Hello, I'm discovering Aladdin and Gem5-aladdin, and I'd like to try some examples from the SHOC benchmark suite. The example provided in https://github.com/ysshao/ALADDIN cites the SHOC/triadexample. So I'd like to generate other configurations using Xenon.

For shoc.xe and machsuite.xe I get the following error, did I miss something in my way? (I also mention that cortexsuite is not in the repo).

Thanks for the help! Best regards,

root@ef5b091eb106:/workspace/gem5-aladdin/sweeps# python generate_design_sweeps.py benchmarks/shoc.xe     
Traceback (most recent call last):
  File "generate_design_sweeps.py", line 31, in <module>
    main()
  File "generate_design_sweeps.py", line 28, in main
    run(args.xenon_file)
  File "generate_design_sweeps.py", line 12, in run
    genfiles = interpreter.run()
  File "/workspace/gem5-aladdin/sweeps/xenon/xenon_interpreter.py", line 85, in run
    self.execute()
  File "/workspace/gem5-aladdin/sweeps/xenon/xenon_interpreter.py", line 64, in execute
    current_sweep = command(current_sweep)
  File "/workspace/gem5-aladdin/sweeps/xenon/base/commands.py", line 39, in __call__
    return self.execute(*args)
  File "/workspace/gem5-aladdin/sweeps/xenon/base/commands.py", line 245, in execute
    selected_objs = self.selection(sweep_obj)
  File "/workspace/gem5-aladdin/sweeps/xenon/base/commands.py", line 39, in __call__
    return self.execute(*args)
  File "/workspace/gem5-aladdin/sweeps/xenon/base/commands.py", line 58, in execute
    return self.select(env)
  File "/workspace/gem5-aladdin/sweeps/xenon/base/commands.py", line 55, in select
    return common.getSelectedObjs(self.tokens, env)
  File "/workspace/gem5-aladdin/sweeps/xenon/base/common.py", line 35, in getSelectedObjs
    current_view = getattr(current_view, token)
TypeError: getattr(): attribute name must be string

Related https://github.com/ysshao/ALADDIN/issues/16 .

xyzsam commented 5 years ago

Did you modify shoc.xe? I cannot reproduce this issue at HEAD.

noureddine-as commented 5 years ago

Actually I'm using the online Dockerfile image, and apparently it points to commit 43f59720bb9cef0325995d29c029531f0c7463e9 which is far from the actual commit. I'll try to build the Docker image from scratch and get and get back to you.

Thanks!

noureddine-as commented 5 years ago
noureddine-as commented 5 years ago

I confirm that it's due to the Python and PyParsing versions. Just got back to python 2.7.6 and everything works well. Thanks @xyzsam !

geraldofojunior commented 5 years ago

How did you solve the problem? I'm having the same error. I changed the python version from 2.7.12 to 2.7.6, then I installed pyparsing pytest numpy. However, I still face the same problem. Thanks.

noureddine-as commented 5 years ago

@gearaldojunior actually I just created a separate Docker image, based on the given Dockerfile, I only changed the base image (first line) with FROM gbrowdy/python-2.7.6 then added another line to install Numpy. Other things pyparsing ..etc. are already installed there.

geraldofojunior commented 5 years ago

@gearaldojunior actually I just created a separate Docker image, based on the given Dockerfile, I only changed the base image (first line) with FROM gbrowdy/python-2.7.6 then added another line to install Numpy. Other things pyparsing ..etc. are already installed there.

Thanks! It worked :)

noureddine-as commented 5 years ago

Glad it helped :)