[gem5-users] Re: Gem5 - garnet 3.0 - Mesh_XY - Deadlock
Change the virtual network for request, forward, and response to a single vnet (0) in the following files and then set the src/mem/ruby/protocol/Garnet_standalone-cache.sm src/mem/ruby/protocol/Garnet_standalone-dir.sm Then restrict the number of vnets to 1 in configs/ruby/Garnet_standalone.py Make sure you do a clean build as you are changing the SLICC files. Srikant On Sat, Mar 25, 2023 at 1:13 AM Karim Soliman wrote: > Yes, please can you help me to modify the files into src/mem/ruby/ > as I understand till now, inside garnet 3.0 we have 3 types of > messages/classes > >- requests >- forward >- response. > > Each one of these classes has its own virtual network separated from the > other classes. > >- requests, and forward are control packets and with size 8 bytes - >and they use virtual network 0 and 1 (1-flit) size. >- responses are considered as data packets with size = 72 bytes and >using virtual network 2 (5-flit) size. > > So, according to this structure, deadlock may never happen, how can I > force all the three classes to use only one virtual channel ? > > Best Regards, > *Eng. Karim Soliman* > Teaching Assistant > Computer Engineering Department > Pharos University in Alexandria (P.U.A) > > > On Sat, Mar 25, 2023 at 4:00 PM Srikant Bharadwaj > wrote: > >> Hi Karim, >> >> The virtual network is the protocol level sub network. The virtual >> channels indicate the number of parallel buffer streams in each virtual >> network. To achieve a protocol deadlock you will have to set a single >> virtual network and then force the different types of messages (request, >> response, etc.) to go through the single virtual network. >> >> For changing the number of virtual networks, you can modify the quantity >> in configs/Network.py >> Forcing the different messages to take that virtual network requires >> changes in the protocol file in src/mem/ruby/ files. >> >> Let me know if you have any questions about changing them . >> >> Srikant >> >> On Sat, Mar 25, 2023 at 12:15 AM Karim Soliman via gem5-users < >> gem5-users@gem5.org> wrote: >> >>> Hey everyone, >>> For learning purposes, I'm trying to understand the deadlock and virtual >>> channels, so in gem5/garnet 3.0 in file >>> mem/ruby/network/garnet/InputUnit.cc >>> I have tried to output the following: >>> std::cout << " - VCs " << m_router->get_num_vcs() << " Vnetworks: " << >>> m_router->get_num_vnets() << " VCs per Vnet: " << m_router-> >>> get_vc_per_vnet() << " - route.vnet: " << route.vnet << std::endl; >>> Using Mesh_XY topology to inspect the variables. >>> I'm also used the options –-vcs-per-vnet and –-inj-vnet >>> >>> The following is my simulation command: >>> sudo build/NULL/gem5.debug configs/example/garnet_synth_traffic.py >>> --network=garnet --topology=Mesh_XY --mesh-rows=4 --num-cpus=16 >>> --num-dirs=16 --sim-cycles=500 --injectionrate=0.2 >>> --synthetic=uniform_random --vcs-per-vnet=1 --inj-vnet=0 >>> >>> the variables output are >>> m_router->get_num_vcs() = 5 >>> m_router->get_num_vnets() = 5 >>> m_router->get_vc_per_vnet = 1 >>> >>> My questions are, Why is the output 5 virtual channels? and what's the >>> virtual network? >>> Also, I'm trying to force the simulation to get into deadlock by >>> increasing the injectinorate and always using only 1 virtual channel per >>> link. >>> but the simulation never went to a deadlock, why? I'm using only one >>> virtual channel. >>> >>> >>> Best Regards, >>> *Eng. Karim Soliman* >>> Teaching Assistant >>> Computer Engineering Department >>> Pharos University in Alexandria (P.U.A) >>> ___ >>> 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
[gem5-users] Re: Gem5 - garnet 3.0 - Mesh_XY - Deadlock
Yes, please can you help me to modify the files into src/mem/ruby/ as I understand till now, inside garnet 3.0 we have 3 types of messages/classes - requests - forward - response. Each one of these classes has its own virtual network separated from the other classes. - requests, and forward are control packets and with size 8 bytes - and they use virtual network 0 and 1 (1-flit) size. - responses are considered as data packets with size = 72 bytes and using virtual network 2 (5-flit) size. So, according to this structure, deadlock may never happen, how can I force all the three classes to use only one virtual channel ? Best Regards, *Eng. Karim Soliman* Teaching Assistant Computer Engineering Department Pharos University in Alexandria (P.U.A) On Sat, Mar 25, 2023 at 4:00 PM Srikant Bharadwaj wrote: > Hi Karim, > > The virtual network is the protocol level sub network. The virtual > channels indicate the number of parallel buffer streams in each virtual > network. To achieve a protocol deadlock you will have to set a single > virtual network and then force the different types of messages (request, > response, etc.) to go through the single virtual network. > > For changing the number of virtual networks, you can modify the quantity > in configs/Network.py > Forcing the different messages to take that virtual network requires > changes in the protocol file in src/mem/ruby/ files. > > Let me know if you have any questions about changing them . > > Srikant > > On Sat, Mar 25, 2023 at 12:15 AM Karim Soliman via gem5-users < > gem5-users@gem5.org> wrote: > >> Hey everyone, >> For learning purposes, I'm trying to understand the deadlock and virtual >> channels, so in gem5/garnet 3.0 in file >> mem/ruby/network/garnet/InputUnit.cc >> I have tried to output the following: >> std::cout << " - VCs " << m_router->get_num_vcs() << " Vnetworks: " << >> m_router->get_num_vnets() << " VCs per Vnet: " << m_router-> >> get_vc_per_vnet() << " - route.vnet: " << route.vnet << std::endl; >> Using Mesh_XY topology to inspect the variables. >> I'm also used the options –-vcs-per-vnet and –-inj-vnet >> >> The following is my simulation command: >> sudo build/NULL/gem5.debug configs/example/garnet_synth_traffic.py >> --network=garnet --topology=Mesh_XY --mesh-rows=4 --num-cpus=16 >> --num-dirs=16 --sim-cycles=500 --injectionrate=0.2 >> --synthetic=uniform_random --vcs-per-vnet=1 --inj-vnet=0 >> >> the variables output are >> m_router->get_num_vcs() = 5 >> m_router->get_num_vnets() = 5 >> m_router->get_vc_per_vnet = 1 >> >> My questions are, Why is the output 5 virtual channels? and what's the >> virtual network? >> Also, I'm trying to force the simulation to get into deadlock by >> increasing the injectinorate and always using only 1 virtual channel per >> link. >> but the simulation never went to a deadlock, why? I'm using only one >> virtual channel. >> >> >> Best Regards, >> *Eng. Karim Soliman* >> Teaching Assistant >> Computer Engineering Department >> Pharos University in Alexandria (P.U.A) >> ___ >> 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
[gem5-users] Re: Gem5 - garnet 3.0 - Mesh_XY - Deadlock
Hi Karim, The virtual network is the protocol level sub network. The virtual channels indicate the number of parallel buffer streams in each virtual network. To achieve a protocol deadlock you will have to set a single virtual network and then force the different types of messages (request, response, etc.) to go through the single virtual network. For changing the number of virtual networks, you can modify the quantity in configs/Network.py Forcing the different messages to take that virtual network requires changes in the protocol file in src/mem/ruby/ files. Let me know if you have any questions about changing them . Srikant On Sat, Mar 25, 2023 at 12:15 AM Karim Soliman via gem5-users < gem5-users@gem5.org> wrote: > Hey everyone, > For learning purposes, I'm trying to understand the deadlock and virtual > channels, so in gem5/garnet 3.0 in file > mem/ruby/network/garnet/InputUnit.cc > I have tried to output the following: > std::cout << " - VCs " << m_router->get_num_vcs() << " Vnetworks: " << > m_router->get_num_vnets() << " VCs per Vnet: " << m_router-> > get_vc_per_vnet() << " - route.vnet: " << route.vnet << std::endl; > Using Mesh_XY topology to inspect the variables. > I'm also used the options –-vcs-per-vnet and –-inj-vnet > > The following is my simulation command: > sudo build/NULL/gem5.debug configs/example/garnet_synth_traffic.py > --network=garnet --topology=Mesh_XY --mesh-rows=4 --num-cpus=16 > --num-dirs=16 --sim-cycles=500 --injectionrate=0.2 > --synthetic=uniform_random --vcs-per-vnet=1 --inj-vnet=0 > > the variables output are > m_router->get_num_vcs() = 5 > m_router->get_num_vnets() = 5 > m_router->get_vc_per_vnet = 1 > > My questions are, Why is the output 5 virtual channels? and what's the > virtual network? > Also, I'm trying to force the simulation to get into deadlock by > increasing the injectinorate and always using only 1 virtual channel per > link. > but the simulation never went to a deadlock, why? I'm using only one > virtual channel. > > > Best Regards, > *Eng. Karim Soliman* > Teaching Assistant > Computer Engineering Department > Pharos University in Alexandria (P.U.A) > ___ > 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
[gem5-users] Re: Gem5 - garnet 3.0 - Mesh_XY - Deadlock
hi, The virtual networks are mainly used for avoiding protocol deadlocks, i.e., one message type per vnet. the output 5 virtual channels is because you set vcs-per-vnet=1(i.e., one virtual channel per vnet) and the garnet model has 5 virtual networks (I think so) As for the last problem, it's because your cmd line set the routing algorithm to XY by default. So the deadlock will never occur. Maybe you can change the routing algorithm to a random oblivious or adaptive algorithm that is not deadlock-free. I guess you can see a warning message that shows a deadlock occurred. Best wishes, Zifeng Zhao --Original-- From: "KarimSolimanviagem5-users"; Date: 2023年3月25日(星期六) 下午3:18 To: "gem5-users"; Cc: "Karim Soliman"; Subject: [gem5-users] Gem5 - garnet 3.0 - Mesh_XY - Deadlock Hey everyone,For learning purposes, I'm trying to understand the deadlock and virtual channels, so in gem5/garnet 3.0 in file mem/ruby/network/garnet/InputUnit.cc I have tried to output the following: std::cout << " - VCs " << m_router-get_num_vcs() << " Vnetworks: " << m_router-get_num_vnets() << " VCs per Vnet: " << m_router-get_vc_per_vnet() << " - route.vnet: " << route.vnet << std::endl; Using Mesh_XY topology to inspect the variables. I'm also used the options –-vcs-per-vnet and–-inj-vnet The following is my simulation command: sudo build/NULL/gem5.debug configs/example/garnet_synth_traffic.py --network=garnet --topology=Mesh_XY --mesh-rows=4 --num-cpus=16 --num-dirs=16 --sim-cycles=500 --injectionrate=0.2 --synthetic=uniform_random --vcs-per-vnet=1 --inj-vnet=0 the variables output are m_router-get_num_vcs() = 5 m_router-get_num_vnets() = 5 m_router-get_vc_per_vnet = 1 My questions are, Why is the output 5 virtual channels? and what's the virtual network? Also, I'm trying to force the simulation to get into deadlock by increasing the injectinorate and always using only 1 virtual channel per link. but the simulation never went to a deadlock, why? I'm using only one virtual channel. Best Regards,Eng. Karim Soliman Teaching Assistant Computer Engineering Department Pharos University in Alexandria (P.U.A)___ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org