[gem5-users] garnet - garnet synthetic traffic - Mesh_XY routing algorithm

2023-03-08 Thread Karim Soliman via gem5-users
Hi, for my research I'm trying to implement a custom routing algorithm in
gem5/garnet.
Someone from the mailing list recommended that I should go for the Mexh_XY
routing algorithm to understand how it's working.

The mesh topology i'm using contains only 4 cpus and 4 dirs and number of
mesh rows is 2, and the routing-algorithm option is set to 1

here is the full simulation command i'm using

*sudo build/NULL/gem5.debug --debug-flags=RubyNetwork
configs/example/garnet_synth_traffic.py --num-cpus=4 --num-dirs=4
--mesh-rows=2 --network=garnet --routing-algorithm=1 --topology=Mesh_XY
--synthetic=uniform_random --injectionrate=0.1*

In the file mem/ruby/garnet/RoutingUnit.cc --> the function outportComputeXY

 int RoutingUnit::outportComputeXY(RouteInfo route, int inport,
PortDirection inport_dirn)

I'm trying to get some output during the simulation to understand the
routing table at each router and how the lookup table works.

The following is my code. I'm using a file to get the data during the
simulation
So, the file will print the following:

[RouterId] [DestinationRouter] [hops_x] [hops_y] [InportDirn] -->
[outport_dirn] [router_x, router_y] [des_x, dest_y].
and output the lookup table attached to the router.

std::ofstream myfile;
// open the file in appending mode
myfile.open ("routing_output.txt", std::ios_base::app);
myfile << m_router->get_id() << "\t" <<  route.dest_router << " |
hops_x: " << x_hops << " | hops_y: " << y_hops << "\t";
myfile << inport_dirn << " --> " << outport_dirn << "\t" <<
m_outports_dirn2idx[outport_dirn] << "\t" << my_x << ", " << my_y;
myfile << " --> "<< dest_x << ", " << dest_y << std::endl;
// iterate over the outports table map and write the data to the file.
std::map, int>::iterator it;
for(it = m_outports_dirn2idx.begin(); it != m_outports_dirn2idx.end();
it++)
{
myfile << it->first << "\t" << it->second << std::endl;
}
myfile.close();

Here are some samples of my output file and also the full txt file is
attached.

[image: image.png]

I don't really know how the packets are routed and also how the lookup
table works. also i can't imagine the connections between the nodes i tried
to draw a flow chart for each router
but some of the output data doesn't match the drawing -- like a packet from
router #2 will go east !!
[image: image.png]
Can anyone explain to me? or if there is any documentation I can check to
understand this.

Best Regards,
*Eng. Karim Soliman*
Teaching Assistant
Computer Engineering Department
Pharos University in Alexandria (P.U.A)
0   1 | hops_x: 1 | hops_y: 0   Local --> East  2   0, 0 --> 1, 0
East2
Local   1
North   3
1   2 | hops_x: 1 | hops_y: 1   Local --> West  2   1, 0 --> 0, 1
Local   1
North   3
West2
0   2 | hops_x: 0 | hops_y: 1   East --> North  3   0, 0 --> 0, 1
East2
Local   1
North   3
2   1 | hops_x: 1 | hops_y: 1   Local --> East  3   0, 1 --> 1, 0
East3
Local   1
South   2
3   1 | hops_x: 0 | hops_y: 1   West --> South  2   1, 1 --> 1, 0
Local   1
South   2
West3
1   3 | hops_x: 0 | hops_y: 1   Local --> North 3   1, 0 --> 1, 1
Local   1
North   3
West2
3   1 | hops_x: 0 | hops_y: 1   Local --> South 2   1, 1 --> 1, 0
Local   1
South   2
West3
0   1 | hops_x: 1 | hops_y: 0   Local --> East  2   0, 0 --> 1, 0
East2
Local   1
North   3
2   1 | hops_x: 1 | hops_y: 1   Local --> East  3   0, 1 --> 1, 0
East3
Local   1
South   2
3   1 | hops_x: 0 | hops_y: 1   West --> South  2   1, 1 --> 1, 0
Local   1
South   2
West3
0   3 | hops_x: 1 | hops_y: 1   Local --> East  2   0, 0 --> 1, 1
East2
Local   1
North   3
1   3 | hops_x: 0 | hops_y: 1   West --> North  3   1, 0 --> 1, 1
Local   1
North   3
West2
3   0 | hops_x: 1 | hops_y: 1   Local --> West  3   1, 1 --> 0, 0
Local   1
South   2
West3
2   0 | hops_x: 0 | hops_y: 1   East --> South  2   0, 1 --> 0, 0
East3
Local   1
South   2
0   3 | hops_x: 1 | hops_y: 1   Local --> East  2   0, 0 --> 1, 1
East2
Local   1
North   3
1   3 | hops_x: 0 | hops_y: 1   West --> North  3   1, 0 --> 1, 1
Local   1
North   3
West2
3   1 | hops_x: 0 | hops_y: 1   Local --> South 2   1, 1 --> 1, 0
Local   1
South   2
West3
3   0 | hops_x: 1 | hops_y: 1   Local --> West  3   1, 1 --> 0, 0
Local   1
South   2
West3
2   0 | hops_x: 0 | hops_y: 1   East --> South  2   0, 1 --> 0, 0
East3
Local   1
South   2
2   1 | hops_x: 1 | hops_y: 1   Local --> East  3   0, 1 --> 1, 0
East3
Local   1
South   2
3   1 | hops_x: 0 | hops_y: 1   West --> South  2   1, 1 --> 1, 0
Local   1
South   2
West3
2   0 | hops_x: 0 | hops_y: 1   Local --> South 2   0, 1 --> 0, 0
East3
Local   1
South   2
1   0 | hops_x: 1 | hops_y: 0   

[gem5-users] Re: Capturing SimPoint and running on ARM CycleModel

2023-03-08 Thread Jonathan Kang via gem5-users
Thanks Giacomo,

A few questions:


  1.  Who is Jason? So that I can contact him 
  2.  Regarding ELFie, I found these:
 *   
https://github.com/UT-LCA/Scalability-Phase-Simpoint-of-SPEC-CPU2017/releases
 *   https://github.com/intel/pinball2elf

#2 would seem to be able to generate ELFies from the x86 pinballs that were 
captured. However, I’m unfamiliar with how ELFies work. Do they still capture 
state and thus need to inject processor state prior to simulation? In which 
case the problem still exists that the ARM Cycle Model is incompatible….

Thanks,

Jonathan.

From: Giacomo Travaglini 
Date: Wednesday, March 8, 2023 at 6:26 AM
To: The gem5 Users mailing list 
Cc: Jonathan Kang 
Subject: Re: [gem5-users] Capturing SimPoint and running on ARM CycleModel
Hi Jonathan On 08/03/2023 01: 43, Jonathan Kang via gem5-users wrote: Hi all, 
I’m attempting to get SPEC 2k17 to run on our performance model that uses an 
ARM Cycle Model (A55). Obviously it’d take forever to run the whole binary so I 
was wondering
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
ZjQcmQRYFpfptBannerEnd

Hi Jonathan
On 08/03/2023 01:43, Jonathan Kang via gem5-users wrote:
Hi all,

I’m attempting to get SPEC 2k17 to run on our performance model that uses an 
ARM Cycle Model (A55). Obviously it’d take forever to run the whole binary so I 
was wondering if anyone has had experience capturing SimPoints using Gem5 and 
then running the resulting reduced binary on a Cycle Model. I know you can do 
it easily on Gem5 simple CPU in SE mode but I need it to work with our more 
accurate model.



You can easily generate SimPoints with gem5 as you correctly said. The problem 
is the checkpoint incompatibility between gem5 and Cycle Model. (restoring the 
gem5 checkpoint from the CA simulator).

It would be nice if we could generate an ELFie [1] from a gem5 checkpoint. As I 
have recently seen some commits mentioning ELFies you could ask Jason and his 
group if there's something going on...



Kind Regards



Giacomo



[1]: 
https://dl.acm.org/doi/abs/10.1109/CGO51591.2021.9370340



Thanks in advance!

Jonathan Kang.



___

gem5-users mailing list -- gem5-users@gem5.org

To unsubscribe send an email to 
gem5-users-le...@gem5.org
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Capturing SimPoint and running on ARM CycleModel

2023-03-08 Thread Giacomo Travaglini via gem5-users

Hi Jonathan

On 08/03/2023 01:43, Jonathan Kang via gem5-users wrote:
Hi all,

I’m attempting to get SPEC 2k17 to run on our performance model that uses an 
ARM Cycle Model (A55). Obviously it’d take forever to run the whole binary so I 
was wondering if anyone has had experience capturing SimPoints using Gem5 and 
then running the resulting reduced binary on a Cycle Model. I know you can do 
it easily on Gem5 simple CPU in SE mode but I need it to work with our more 
accurate model.


You can easily generate SimPoints with gem5 as you correctly said. The problem 
is the checkpoint incompatibility between gem5 and Cycle Model. (restoring the 
gem5 checkpoint from the CA simulator).

It would be nice if we could generate an ELFie [1] from a gem5 checkpoint. As I 
have recently seen some commits mentioning ELFies you could ask Jason and his 
group if there's something going on...


Kind Regards


Giacomo


[1]: https://dl.acm.org/doi/abs/10.1109/CGO51591.2021.9370340


Thanks in advance!

Jonathan Kang.



___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to 
gem5-users-le...@gem5.org


IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Capturing SimPoint and running on ARM CycleModel

2023-03-08 Thread 봉하승 via gem5-users
Hi Jonathan,

I have experience simulating SimPoint area through O3CPU in se mode.(use
the checkpoint function of gem5)
I don't know if it's only in my case, but not all Benchmarks in spec2017
had a smooth simulation process with SimPoint.
I'm still looking for a way to fix some of the workloads.

Regards,
Haseung

2023년 3월 8일 (수) 오전 10:46, Jonathan Kang via gem5-users 님이
작성:

> Hi all,
>
>
>
> I’m attempting to get SPEC 2k17 to run on our performance model that uses
> an ARM Cycle Model (A55). Obviously it’d take forever to run the whole
> binary so I was wondering if anyone has had experience capturing SimPoints
> using Gem5 and then running the resulting reduced binary on a Cycle Model.
> I know you can do it easily on Gem5 simple CPU in SE mode but I need it to
> work with our more accurate model.
>
>
>
> Thanks in advance!
>
>
>
> Jonathan Kang.
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org