Interface to integrate TOPAZ network simulator (http://code.google.com/p/tpzsimul/) within GEM5-RUBY
Review Request #1095 - Created March 11, 2012 and updated
| Information | |
|---|---|
| Valentin Puente | |
| gem5 | |
| Reviewers | |
| Default | |
| beckmann, nilay | |
Interface to integrate TOPAZ network simulator (http://code.google.com/p/tpzsimul/) within GEM5-RUBY. Does not replace ruby's interconnection network simulators (garnet and simple-network). It just adds the hookups required to connect ruby and TOPAZ. You have to download as "ext" TOPAZ from an external repo. To have a better perspective of the changes, you can follow the guide provided in http://code.google.com/p/tpzsimul/wiki/GEM5Integration. In order to integrate the compilation process of both simulators we have to slightly modify main SConstruct and ruby SCons files. All the remaining changes are constrained to Ruby. Main modifications have been done in "src/mem/ruby/network/simple/PerfectSwitch.cc"
Regression test seems to be working for the ruby protocols provided
Issue Summary
| Description | From | Last Updated | Status |
|---|---|---|---|
| Instead of setting each individual parameter here, please create a new Topaz Network model that inherrits from the SimpleNetwork and ... | Brad Beckmann | March 13, 2012, 4:54 a.m. | Open |
| Do not use #ifdefs. | Brad Beckmann | March 13, 2012, 4:54 a.m. | Open |
| Why do you need these functions defined here? Pleaes explain. | Brad Beckmann | March 13, 2012, 4:54 a.m. | Open |
| Instead of using an ifdef here, can you make a separate TopazSwitch object that inherits from PerfectSwitch? I think that ... | Brad Beckmann | March 13, 2012, 4:54 a.m. | Open |
| Again, all this Topaz specific code should be moved to a separate TopazSwitch.cc file. | Brad Beckmann | March 13, 2012, 4:54 a.m. | Open |
| Again, move to a new Topaz network file. | Brad Beckmann | March 13, 2012, 4:54 a.m. | Open |
| Move to a new network oject called TopazNetwork. Stick to 80 char limit per line. | Brad Beckmann | March 13, 2012, 4:54 a.m. | Open |
Description: |
|
|---|
I'm unable to upload a patch with style corrections
Status: Re-opened
Diff: |
Revision 2 (+924 -165) |
|---|
Thanks again for publishing this patch. It is a good start, but a lot of work remains before it is ready to be checked in. It appears that some of these changes are actual improvements to the simple network itself. It may be help to split those up into a separate patch. Please let me know if you have any questions. I'll be happy to take a look at your next rev of the patch when it is ready.
-
TPZSimul.ini (Diff revision 3) -
What files is this .ini file pointing to? They don't seem be included in this patch. Are they necessary? If so, they should be part of the patch. If not, then I don't understand the need for this file? Also can you move this file to a separate Topaz directory underneath ruby/network?
-
build_opts/ALPHA_MOESI_CMP_directory (Diff revision 3) -
I don't think we want to turn on Topaz by default for any protocol.
-
build_opts/ALPHA_Network_test (Diff revision 3) -
Unnecesary whitespace change. Please remove.
-
configs/ruby/Ruby.py (Diff revision 3) -
Please stick to 80 char limit. Also I prefer to see comments on separate lines.
-
configs/ruby/Ruby.py (Diff revision 3) -
Instead of setting each individual parameter here, please create a new Topaz Network model that inherrits from the SimpleNetwork and predefines this values. In general, Topaz need to be a peer network, similar to the Simple and Garnet networks. Not a hacked up version of the simple network.
-
configs/ruby/Ruby.py (Diff revision 3) -
unnecessary whitespace change
-
src/mem/ruby/buffers/MessageBuffer.hh (Diff revision 3) -
Do not use #ifdefs.
-
src/mem/ruby/buffers/MessageBuffer.hh (Diff revision 3) -
Why do you need these functions defined here? Pleaes explain.
-
src/mem/ruby/network/garnet/BaseGarnetNetwork.hh (Diff revision 3) -
I'm confused. I thought Topaz was based off the simple network. Why are you defining Topaz functions in this Garnet file?
-
src/mem/ruby/network/simple/PerfectSwitch.hh (Diff revision 3) -
Instead of using an ifdef here, can you make a separate TopazSwitch object that inherits from PerfectSwitch? I think that would be much cleaner.
-
src/mem/ruby/network/simple/PerfectSwitch.cc (Diff revision 3) -
Again, all this Topaz specific code should be moved to a separate TopazSwitch.cc file.
-
src/mem/ruby/network/simple/PerfectSwitch.cc (Diff revision 3) -
consistent spacing: "int c = 0;" not "int c=0;"
-
src/mem/ruby/network/simple/PerfectSwitch.cc (Diff revision 3) -
Please stick to 80 chars and the correct spacing rules. For example, no spaces on each side of "::".
-
src/mem/ruby/network/simple/PerfectSwitch.cc (Diff revision 3) -
shift left to line up with the rest of this function.
-
src/mem/ruby/network/simple/PerfectSwitch.cc (Diff revision 3) -
Don't delete these lines. They improve the readablity of this code.
-
src/mem/ruby/network/simple/PerfectSwitch.cc (Diff revision 3) -
Don't comment out lines...simply remove them instead.
-
src/mem/ruby/network/simple/PerfectSwitch.cc (Diff revision 3) -
Don't change function definitions. Please stick to the gem5 style guidelines.
-
src/mem/ruby/network/simple/SimpleNetwork.hh (Diff revision 3) -
Again, move to a new Topaz network file.
-
src/mem/ruby/network/simple/SimpleNetwork.cc (Diff revision 3) -
80 char limit
-
src/mem/ruby/network/simple/SimpleNetwork.cc (Diff revision 3) -
Don't add commented out source code.
-
src/mem/ruby/network/simple/SimpleNetwork.py (Diff revision 3) -
Move to a new network oject called TopazNetwork. Stick to 80 char limit per line.
-
src/mem/ruby/network/simple/Switch.cc (Diff revision 3) -
Again, don't change style
-
src/mem/ruby/system/MachineID.hh (Diff revision 3) -
Don't add commented out source code lines.
-
TPZSimul.ini (Diff revision 3) -
We will delete this file. It is there to make it easier to follow the Quick Start Guide of the google code page. Definitely it shouldn't be there. We will put it in TOPAZ
-
configs/ruby/Ruby.py (Diff revision 3) -
It's gona to be a bit hard but we will try to do it,
Change Summary:
Topaz interfaz is fully modularized through an independent network class. It uses a adaptive interface to reduce "computational effort" under low load conditions, using a "SimpleNetwork alike" network. Instead if design it like a derived class of SimpleNetwork and PerfectSwitch we choose to use a class derived from Network and Switch (which is mainly a copy of original classes with the changes required by TOPAZ and to support the adaptive interface). The compilation of the new class is conditional (scons rocks!) and therefore it should be a problem if the user it's not interested in TOPAZ. Some minimal changes (2 bool members and and 4 simple methods) are required in MessageBuffer to identify in/out network queues (required by the adaptive interfaz). It might be done inside the Switch but after some time I wasn't able to figure how to do it elegantly...
Diff: |
Revision 4 (+2910 -822) |
|---|
Status: Re-opened
Diff: |
Revision 6 (+2094 -9) |
|---|
Topaz interfaz is fully modularized through an independent network class. It uses a adaptive interface to reduce "computational effort" under low load conditions, using a "SimpleNetwork alike" network. Instead if design it like a derived class of SimpleNetwork and PerfectSwitch we choose to use a class derived from Network and Switch (which is mainly a copy of original classes with the changes required by TOPAZ and to support the adaptive interface). The compilation of the new class is conditional (scons rocks!) and therefore it should be a problem if the user it's not interested in TOPAZ. Some minimal changes (2 bool members and and 4 simple methods) are required in MessageBuffer to identify in/out network queues (required by the adaptive interfaz). It might be done inside the Switch but after some time I wasn't able to figure how to do it elegantly...
It looks much better. I just a few more comments for improvement. They all should be pretty easy to take care of.
-
src/mem/ruby/network/Network.hh (Diff revision 6) -
Minor comment: Instead of defining the emtpy function as "{return;};", I believe the common convention is to leave it empty "{}" -
src/mem/ruby/network/topaz/SConscript (Diff revision 6) -
For all new files, please modify the copywrite owner to the correct institution.
-
src/mem/ruby/network/topaz/TopazNetwork.hh (Diff revision 6) -
Update copywrite holder
-
src/mem/ruby/network/topaz/TopazNetwork.hh (Diff revision 6) -
Remove all the "//BEGIN TOPAZ" and "//END TOPAZ" comments. They seem needless and confusing.
-
src/mem/ruby/network/topaz/TopazNetwork.hh (Diff revision 6) -
Now that you've added more Topaz files to this patch, do you still need to include the separate TPZSimulator header file? If so, I suspect you make this work by using scons EXTRAS and turning on the USE_TOPAZ command line variable. Can you briefly describe that process here?
-
src/mem/ruby/network/topaz/TopazNetwork.py (Diff revision 6) -
Add copywrite and license to this file
-
src/mem/ruby/network/topaz/TopazSwitch.hh (Diff revision 6) -
Update comment
-
src/mem/ruby/network/topaz/TopazSwitchFlow.hh (Diff revision 6) -
update comment
-
src/mem/ruby/profiler/Profiler.cc (Diff revision 6) -
Why did you have to include this file?
-
src/mem/ruby/profiler/Profiler.cc (Diff revision 6) -
Why did you remove this line? It seems like the changes you make to Profiler.cc are unnecessary.
Change Summary:
Diff has been updated according last changes. Patch is versus changeset 8811 in gem5-dev repo.
Diff: |
Revision 7 (+2084 -7) |
|---|
The patch applies clearly with current "tip" (changeset 8903)
-
configs/ruby/Ruby.py (Diff revision 8) -
80 characters?
-
configs/ruby/Ruby.py (Diff revision 8) -
Odd way of stating what you want.
-
src/mem/ruby/buffers/MessageBuffer.hh (Diff revision 8) -
const?
-
src/mem/ruby/buffers/MessageBuffer.hh (Diff revision 8) -
Prefix with set?
-
src/mem/ruby/network/Topology.cc (Diff revision 8) -
It would be great if the comment explained a bit better what it is really doing.
-
src/mem/ruby/network/topaz/TopazNetwork.hh (Diff revision 8) -
Move up
-
src/mem/ruby/network/topaz/TopazNetwork.hh (Diff revision 8) -
const on all getters
-
src/mem/ruby/network/topaz/TopazNetwork.hh (Diff revision 8) -
Why returning a const unsigned?
-
src/mem/ruby/network/topaz/TopazNetwork.hh (Diff revision 8) -
const on all is/get methods
-
src/mem/ruby/network/topaz/TopazNetwork.py (Diff revision 8) -
Whitespace
-
src/mem/ruby/network/topaz/TopazNetwork.py (Diff revision 8) -
Whitespace
-
src/mem/ruby/network/topaz/TopazNetwork.py (Diff revision 8) -
Whitespace, and 80 char?
I do not intend to sound negative, but what does this patch bring to gem5 and what are the main limitations/assumptions on its use? It is quite a lot of code to maintain and I would really like to understand what works/does not work, and what it brings, and to whom.
Thanks for reviewing the code Andreas. I've corrected your suggestions. I understand your concerns.... and not only the large code but the 50k+ lines of code that that sits out gem5 repo, i.e. TOPAZ network simulator itself. Due to that (let gem5 code depending on some external repository) we reach to the conclusion is to push back this patch and keep a gem5 clone repo in TOPAZ google code site. In the future, we might try to retry it with some kind of "abstractized" interface for external simulators.
