The same program produces different results in Classical and Ruby memory system!


I run a program both in se and fs mode in classical memory system, the result is correct. However, when I run the same program with same conditions but Ruby memory system, the result is wrong.

The program is dual-thread with page rank algorithm, and compiled with aarch64-linux-gnu-g++-10. And the Ruby cache coherence protocol is MESI_Two_Level.

I wonder why the same program has different results in different memory systems. Is it possible for Ruby memory systems to produce incorrect results?

The command is shown below:
Classical Memory system:
./build/ARM_MESI_Two_Level/gem5.opt ./configs/example/ \
--cmd=./PR_aarch64 --options="-s -round 0 ./rMatGraph_J_5_100" \
--num-cpus=2 --cpu-type=TimingSimpleCPU \
--caches --l2cache --l1d_size=64kB --l1i_size=16kB

Ruby memory system:
./build/ARM_MESI_Two_Level/gem5.opt ./configs/example/ \
--cmd=./PR_aarch64 --options="-s -round 0 ./rMatGraph_J_5_100" \
--num-cpus=2 --cpu-type=TimingSimpleCPU \
--ruby --caches --l2cache --l1d_size=64kB --l1i_size=16kB




Jason Lowe-Power
April 26, 2021, 3:59 PM

That warning was recently removed. We’ve updated Ruby to be compatible with Arm as of 20.0, IIRC. I’m not sure about the difference between GCC 9 and GCC 10, though.

April 26, 2021, 6:50 AM

I have tired MESI_Three_Level and CHI protocol. However, they work also incorrectly in the ruby memory system but correctly in the classical memory system.

Significantly, when I compiled the program with aarch64-linux-gnu-g++-9 but not aarch64-linux-gnu-g++-10. The result is correct both in classical and ruby memory system. I would guess that some new instructions that produced by aarch64-linux-gnu-g++-10 are not well supported in ruby system.

In addition, when I use ARM in FS mode, it reported a warning that ”You are trying to use Ruby on ARM, which is not working properly yet.” Therefore, if I use Ruby system, is it better to use the x86 architecture? I would consult you why ARM and Ruby may still be incompatible.


Jason Lowe-Power
April 14, 2021, 8:01 PM

I would guess that Ruby MESI_Two_LEevel is not correctly implementing some atomic instruction, but I’m not certain. I believe the default protocol for Arm is now the CHI protocol. I would try that to see if it works correctly or not. You can also try MESI_Three_Level which I believe has been tested with Arm. I’m not sure MESI_Two_Level is tested often (or at all).

may be able to provide more info or point you to someone who can.







Fix versions