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 when running test_multiple_accelerators example with default settings #19

Closed isaar-ahmad closed 4 years ago

isaar-ahmad commented 4 years ago

I ran the default run.sh script for test_multiple_accelerators example and got the following error:

root@ed4c7a3ad50b:/workspace/gem5-aladdin/src/aladdin/integration-test/with-cpu/test_multiple_accelerators# sh run.sh 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "build/X86/python/m5/main.py", line 468, in main
  File "/workspace/gem5-aladdin/src/aladdin/../../configs/aladdin/aladdin_se.py", line 398, in <module>
    system.find_all(SystolicArray)[0]) == len(system.ruby._cpu_ports))
AssertionError

On investigating further, I found the assertion error is due to "ruby" option in run.sh.

The failing assertion was: assert(options.num_cpus + 3*len(system.find_all(HybridDatapath)[0] + \ system.find_all(SystolicArray)[0]) == len(system.ruby._cpu_ports))

I printed the str(arg) of each of the arguments in the assertion. These are the values. str(options.num_cpus) = 1, str(len(system.find_all(HybridDatapath)[0]) ) = 4, str (system.find_all(SystolicArray)[0]) ) = [], str (len(system.ruby._cpu_ports) ) = 1 Hope this helps. Also, can you comment why len(system.ruby._cpu_ports) equals 1 ?

Thanks, Isaar

yaoyuannnn commented 4 years ago

Did you build with the ruby protocol specified as follow?

scons build/X86/gem5.opt PROTOCOL=MESI_Two_Level_aladdin

isaar-ahmad commented 4 years ago

Hi Yuan, After building with the above flag MESI_Two_Level_aladdin , the example ran successfully. This issue seems resolved. Thanks, Isaar