Python Memory Size Issue

Description

Hello,

I am trying to run the new version of garnet in synthetic mode and am getting the following error. The issue only appears when I include the 'mesh-rows', 'routing-algorithm' and 'topology' parameters.

command line: ./build/ARM/gem5.opt configs/example/garnet_synth_traffic.py --num-cpus=4 --num-dirs=4 --topology=Mesh_XY --network=garnet --mesh-rows=2 --sim-cycles=200000 --synthetic=uniform_random --injectionrate=0.3 --routing-algorithm=1 --vcs-per-vnet=4

Traceback (most recent call last):
File "build/ARM/python/m5/util/convert.py", line 102, in convert
return converter(val)
File "build/ARM/python/m5/util/convert.py", line 131, in <lambda>
intifier = lambda x: int(x, 0)
ValueError: invalid literal for int() with base 0: '134217728.0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "build/ARM/python/m5/main.py", line 457, in main
exec(filecode, scope)
File "configs/example/garnet_synth_traffic.py", line 126, in <module>
Ruby.create_system(options, False, system)
File "/home/DREXEL/aw868/research/new_aw868_gem5/configs/ruby/Ruby.py", line 204, in create_system
topology.registerTopology(options)
File "/home/DREXEL/aw868/research/new_aw868_gem5/configs/topologies/Mesh_XY.py", line 181, in registerTopology
MemorySize(options.mem_size) / options.num_cpus, i)
File "/home/DREXEL/aw868/research/new_aw868_gem5/configs/common/FileSystemConfig.py", line 178, in register_node
toMemorySize(str(mem))/kibi))
File "build/ARM/python/m5/util/convert.py", line 191, in toMemorySize
return toBinaryInteger(value, 'memory size', 'B')
File "build/ARM/python/m5/util/convert.py", line 138, in toBinaryInteger
return toInteger(value, target_type, units, binary_prefixes)
File "build/ARM/python/m5/util/convert.py", line 132, in toInteger
return toNum(value, target_type, units, prefixes, intifier)
File "build/ARM/python/m5/util/convert.py", line 110, in toNum
return convert(value)
File "build/ARM/python/m5/util/convert.py", line 105, in convert
"cannot convert '%s' to %s" % (value, target_type))
ValueError: cannot convert '134217728.0' to memory size
[aw868@bowser new_aw868_gem5]$ ./build/ARM/gem5.opt configs/example/garnet_synth_traffic.py --num-cpus=4 --num-dirs=4 --topology=Mesh_XY --network=garnet --mesh-rows=2 --sim-cycles=200000 --synthetic=uniform_random --injectionrate=0.3 --routing-algorithm=1 --vcs-per-vnet=4
return toNum(value, target_type, units, prefixes, intifier)
File "build/ARM/python/m5/util/convert.py", line 110, in toNum
return convert(value)
File "build/ARM/python/m5/util/convert.py", line 105, in convert
"cannot convert '%s' to %s" % (value, target_type))
ValueError: cannot convert '134217728.0' to memory sizegem5 Simulator System. http://gem5.org

Environment

None

Activity

Show:
Angela Wei
November 9, 2020, 4:23 PM

Hi Daniel,

Yes, it now runs without error! Thank you very much for your help

Daniel
November 8, 2020, 2:41 PM
Edited

Thank you for the report, Angela.

Does the following patch solve the issue?
https://gem5-review.googlesource.com/c/public/gem5/+/37255

Done

Assignee

Daniel

Reporter

Angela Wei

Priority

High

Affects versions

Fix versions

Epic Link

None

Components

Labels

None